ubuntu 64 bits and pureBasic

Linux specific forum
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

I tried 4.20 (beta6) on Fedora 64 bits, and it did not work (the executable couldn't be launched). It works fine on Fedora 32bits (after checking "is executable" for all the executable files in "compilers" folder :)

However I'm starting up on Linux, so I prefered just to stick with 32bits for now :)
Karlos
New User
New User
Posts: 6
Joined: Tue Jun 29, 2004 1:02 pm

Post by Karlos »

got no errors on compiling with 4.2 - but segmentation fault when running a print hello program

******************************************
PureBasic 4.20 (Linux - x86)
******************************************

Loading external modules...
Starting compilation...
2 lines processed.
Creating the executable.
Error: Linker
/usr/bin/ld: warning: i386 architecture of input file `purebasic.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `/usr/share/purebasic/compilers/debugger.a(Debugger.o)' is incompatible with i386:x86-64 output
[root@164661-app4 test]# more test.pb
print ("hello");
[root@164661-app4 test]#
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

hum, 'ld' tried to produce a x64 file, which is not correct. We could add a platform type to ensure it will use i386.
Karlos
New User
New User
Posts: 6
Joined: Tue Jun 29, 2004 1:02 pm

Post by Karlos »

sounds like a plan - i saw something about a -m32 flag or something for ld but unfortunately i'm no expert in linux...

any chance of a preview build so i can test for you

thanks
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Post by moogle »

anyone managed to solve this problem I'm trying on Ubuntu x64 8.04 and I get the same error each time.
Image
Rick
User
User
Posts: 16
Joined: Thu Sep 23, 2004 6:25 am
Location: Portland, Oregon, USA

Post by Rick »

I also get a compile time error.
I'm running Ubuntu Hardy 8.04 64-bit on an Intel Core2 Duo CPU and PureBasic 4.20 (Linux - x86).
I get the following error messages:
/usr/bin/ld: i386 architecture of input file 'purebasic.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file '/home/rick/bin/purebasic/compilers/debugger.a(Debugger.o)' is incompatible with i386:x86-64 output

It's my understanding virtually all CPUs now, on newer motherboards, are 64-bit. Even if they have a 32-bit OS like Windoze installed. With Linux, it just made sense to use the OS matched with the CPU.

If there is any workaround someone knows about, if so, it would be appreciated. This is a complete show-stopper on using Purebasic on my Ubuntu desktop.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Post by moogle »

the only workaround is to use ubuntu x32 to compile and code it. it will still work on the x64 edition after. it's the only way for now until fred fixes it.
Image
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

hmm! i run purebasic via linux32 from commandline. works at least in console if you have the 32 bit libs etc on it. euh i try to resolve what i did first on a fresh install.

Was a bit of a fondle, but then again which programmer doesent ? :lol:
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Rick
User
User
Posts: 16
Joined: Thu Sep 23, 2004 6:25 am
Location: Portland, Oregon, USA

Post by Rick »

moogle wrote:the only workaround is to use ubuntu x32 to compile and code it. it will still work on the x64 edition after. it's the only way for now until fred fixes it.
Good idea. I think I will set up another VirtualBox on Ubuntu Hardy and install the 32-bit version of Ubuntu into it. That way it keeps my 64-bit installation clean. It also will isolate any testing I want to do so I don't muck up my stability. I did this with WindowsXP and works slick. It lets me run both WindowsXP applications (Adobe CS3) and Linux applications at the same time. I'll add 32-bit Linux to the mix. I knew I bought 8 gig of RAM for a reason ;) .
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post by Foz »

Fred wrote:hum, 'ld' tried to produce a x64 file, which is not correct. We could add a platform type to ensure it will use i386.
Will this be added to 4.30?
Rick
User
User
Posts: 16
Joined: Thu Sep 23, 2004 6:25 am
Location: Portland, Oregon, USA

Post by Rick »

moogle wrote:the only workaround is to use ubuntu x32 to compile and code it. it will still work on the x64 edition after. it's the only way for now until fred fixes it.
I found doing this did not produce the results I expected. When I used the ODBC database function, and tested it under 32-bit Ubuntu Hardy 8.04, it worked. When I copied the executable over to my 64-bit Ubuntu Hardy 8.04, it crashed with an error that the told me it was calling the 64-bit ODBC system library with a 32-bit class. I had to install 32-bit ODBC database drivers into my 64-bit system and then edit my odbc config files to add a second definition of the database name with a 32 added to it, pointing to the 32-bit libraries. Then it worked.

Gotcha's like this are a distraction from me focusing on designing and coding my application. It sure would be nice to have a PureBasic that worked clean in a 64-bit environment.
sayanmaster
New User
New User
Posts: 7
Joined: Thu Jun 14, 2007 9:22 am
Location: France

Post by sayanmaster »

Hello,

I successfully compiled with purebasic 4.30 on my ubuntu x64 box.

I installed every lib32*-dev packages availables from synaptic and followed this procedure http://blog.loxal.net/2008/09/how-to-fi ... tible.html.

Hope it helps.

Edit: Sadly it only works for console applications :/
buzzqw
Enthusiast
Enthusiast
Posts: 116
Joined: Sat Aug 27, 2005 10:13 pm
Location: Italy
Contact:

Post by buzzqw »

any news about 64bit support ?

BHH
Violet
Enthusiast
Enthusiast
Posts: 106
Joined: Sun Dec 23, 2007 6:30 pm

Post by Violet »

It still doesn't work here.

Now switching from Ubuntu 8.10 64-Bit to Debian Lenny 32-Bit, just waiting for finish of the torrent downloads, more than 12GB Data... ^^ Somehow only because I want to try out Debian and because PureBasic doesn't work with 64-Bit Version (which doesn't improve so much the speed of my system) and I am slowly getting fed up with C/C++!
best regards,

Violet
buzzqw
Enthusiast
Enthusiast
Posts: 116
Joined: Sat Aug 27, 2005 10:13 pm
Location: Italy
Contact:

Post by buzzqw »

yep.. fedora core 10 here , and i am a little **** to loose my 8gb ram installing a 32 bit OS

now using ubuntu 32bit under virtualbox for PB

but i'll love a 64bit edition of PB (not for making pure 64bit application, but at least able to compile at 32bit!)

BHH
Post Reply