FB 0.20 +Ubuntu 8.10 64 - the easy way

Linux specific questions.
afecelis
Posts: 85
Joined: Feb 20, 2009 22:34
Location: Colombia

FB 0.20 +Ubuntu 8.10 64 - the easy way

Postby afecelis » Mar 07, 2009 20:31

Hi guys,
After reading and trying several of the methods suggested here to get Freebasic working on ubuntu 8.10 64 bits, I found the following one to be the easiest and quickest, and works perfectly fine.

Here are the steps:
1. Download the latest Freebasic available, normal install, not standalone:
http://ufpr.dl.sourceforge.net/sourcefo ... nux.tar.gz
Uncompress it and follow the instructions in the readme.txt to install it. Basically, all you gotta do is open up a terminal in your uncompressed folder and type in:
sudo ./install.sh -i


After installing you should be able to open up a terminal and type in "fbc -version" to see which version of the compiler you got. But if you try to compile any .bas file you'll get missing libraries errors. So here comes the solution.

2. Download and install the "getlibs" deb file, which installs the required 32 bit libraries on your 64 bit system. Download it here (BTW, thanks to Cappy for his wonderful deb file; it really does a great job and simplifies the library installation process to the max):
http://www.boundlesssupremacy.com/Cappy ... bs-all.deb
Just double click on it and it and follow the installation steps.

3. Now, the libraries that were missing in my system for freebasic to compile code properly were installed by opening up a terminal and typing:
sudo getlibs -p libxpm-dev

then:
sudo getlibs -p libxrandr-dev

then:
sudo getlibs -p libxrender-dev

and finally:
sudo getlibs -p libncurses5-dev


4. To round things up, and to avoid the libncurses error, also install:
sudo apt-get install lib32ncurses5

and
sudo apt-get install lib32ncurses5-dev


After that, no more library errors when compiling .bas files with freebasic!! :D

hope it helps! This is the safest and easiest way to get it running in ubuntu 8.10 64 bits.

regards,
Alvaro

EDITED: I deliberately changed the code lines to quote lines as they were easier to read this way, and they weren't really code. ;)
afecelis
Posts: 85
Joined: Feb 20, 2009 22:34
Location: Colombia

Postby afecelis » Mar 08, 2009 4:14

After trying out several snippets from the forums involving SDL, OpenGL and other libraries, I noticed my explanation above was getting short, so I updated my fixes in a single document you can download/check here:
http://files.wildspad.com/afecelis/free ... .10_64bits

As I try out new snippets and see they require new libraries, I'll update my tutorial in the link above. ;)

regards,
Alvaro
Last edited by afecelis on Mar 08, 2009 15:15, edited 1 time in total.
Frank Dodd
Posts: 444
Joined: Mar 10, 2006 19:22

Postby Frank Dodd » Mar 08, 2009 12:12

Thanks for the info Alvaro, that's going to make things a lot easier for other people.
afecelis
Posts: 85
Joined: Feb 20, 2009 22:34
Location: Colombia

Postby afecelis » Mar 08, 2009 13:01

Thanks Frank, you know better than anyone how much I want Freebasic to work fine on Linux. ;)
I understand it works right out of the box on 32 bit versions but I wasn't counting with the 64 bit issues, so I guess this doc will get Ubuntu64 users up and running in no time with Freebasic. :D

regards,
Alvaro
BastetFurry
Posts: 255
Joined: Jan 05, 2006 0:56

Postby BastetFurry » Mar 21, 2009 12:36

Sticky?
rCX
Posts: 26
Joined: Jun 29, 2008 19:14
Location: New York or Maryland

Postby rCX » Jun 13, 2009 1:52

Thanks for saving me alot of trouble! I was able to install fb on ubuntu 9.04 with your directions.

Btw the link to getlibs doesn't work anymore. I had to use
http://frozenfox.freehostia.com/cappy/getlibs-all.deb

The names of the libraries have changed so the last 2 lines should be...
sudo apt-get install libncurses5
sudo apt-get install libncurses5-dev

Thanks

Edit to change "apt-Get" to "apt-get"
Last edited by rCX on Jul 26, 2009 18:06, edited 1 time in total.
acidblue
Posts: 9
Joined: Jun 21, 2009 0:21

Postby acidblue » Jun 21, 2009 0:26

I'm also using Ubuntu 9.04, but infortunately i cannot install FB.
I get this error when I try 'sudo ./install.sh -i
rocko@darkstar:~/Desktop/FreeBASIC$ sudo ./install.sh -i
[sudo] password for rocko:
./install.sh: 117: ./fbc: not found
./install.sh: 119: ./fbc: not found

ERROR: Unable to determine the configured prefix from ./fbc -version
ERROR: Need destination path

I'm trying to install the normal version not the stand alone one, as it staes above to do, should i try the stand alone one ?
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Postby KristopherWindsor » Jun 21, 2009 0:33

I use the standalone version: just put the FreeBASIC folder on the Desktop, and no installation is needed. =)
acidblue
Posts: 9
Joined: Jun 21, 2009 0:21

Postby acidblue » Jun 21, 2009 0:49

No that dosn't work either I get this error:

rocko@darkstar:~/Desktop/FreeBASIC$ fbc
/usr/bin/fbc: 2: /usr/share/freebasic/fbc: not found
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Postby KristopherWindsor » Jun 21, 2009 2:00

Try "./fbc" instead of "fbc"
;)
acidblue
Posts: 9
Joined: Jun 21, 2009 0:21

Postby acidblue » Jun 21, 2009 2:25

After doing a fresh install of Ubuntu 9.04, everything seems ok.
FB installed and i can do fbc -version with out errors.
I'll try compiling some code in the morning, it's late right now and i need some rest.
acidblue
Posts: 9
Joined: Jun 21, 2009 0:21

Postby acidblue » Jun 23, 2009 23:19

After compiling a test.bas file i get this error:
test.bas() error 24: File not found, libsupc++.a
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3//libgcc.a when searching for -lgcc
ld: cannot find -lgcc
Not sure what i should do , libsupc++ ?

EDIT: I un-installed the regular version and installed the 'standalone' one', then followed
these instructions:
http://www.freebasic.net/forum/viewtopic.php?t=13163
It's all good now, can compile and run, Yippie!
All those on 64 bit linux follow those instructions on the post i linked and you should be ok.
TbbW
Posts: 348
Joined: Aug 19, 2005 10:08
Contact:

Postby TbbW » Aug 20, 2009 4:13

Well... if the linker would just check if there is a:
/usr/lib32
folder instead of using
/usr/lib
wich defaults to what arch ur actualy running ( i.e amd64 ) there would not be any problems since in both ubuntu and debian and alot of other dists there are lib, lib32,lib64 folders when other arch then 32bit is used.

Or the even better solution is to actualy add support for 64bit in fb since 32bit is not realy the most used anymore.
And then we dont need to bloat our workstations/servers with 32bit libs just coz of FB does not support it.
BastetFurry
Posts: 255
Joined: Jan 05, 2006 0:56

Postby BastetFurry » Feb 06, 2010 3:01

I couldnt get this to run, no matter what.
But i have a simple solution:
1. sudo apt-get install virtualbox-ose
2. Create new VM
3. Install 32bit Ubuntu on said VM
4. Install fbc in that VM
5. ?????
6. PROFIT! ;)
Pottersson
Posts: 25
Joined: Jun 13, 2008 17:10

.deb does not work

Postby Pottersson » Jul 21, 2010 5:33

I downloaded and installed the .deb, but GDebi reported that all the dependencies were satisfied, and:

Code: Select all

$ fbc test.bas
test.bas() error 24: File not found, libsupc++.a
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3//libgcc.a when searching for -lgcc
ld: cannot find -lgcc
still showed up.

*sigh*.

EDIT: Oops. Didn't see the rest of the post where he said to download the packages.

EDIT: Still doesn't work. Now,

Code: Select all

$ fbc test.bas
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3//libsupc++.a when searching for -lsupc++
ld: cannot find -lsupc++
even though I tried to do getlibs on every library mentioned in the main linux 32-bit instructions as well.

TbbW wrote:Well... if the linker would just check if there is a:
/usr/lib32
folder instead of using
/usr/lib
. . . Or the even better solution is to actualy add support for 64bit in fb since 32bit is not realy the most used anymore. . . .
I think that would be a great idea, to support 64 bit as well. (Then again, I've never worked on a compiler before, so I don't know what that would take.)

On an unrelated topic, why hasn't there been an official .deb package (or rpm) hosted on freebasic.net? That would drastically simplify installation because all the library dependencies would be satisfied by the package manager.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest