Not compiling hello.bas on Debian 11

Linux specific questions.
Post Reply
idea1407
Posts: 1
Joined: Feb 12, 2022 18:09

Not compiling hello.bas on Debian 11

Post by idea1407 »

So, I just installed FreeBasic on my Debian 11 laptop seemingly successfully. I did this by downloading version 1.09.0 and extracting it in a custom folder. then I executed the ./install.sh -i command as stated in the readme.txt file. Of course, I did install the necessary libraries. I made sure fbc ran in the terminal and that seemed to work okay. Then I opened Geany and loaded hello.bas. I changed the build command to fbc "%f". When I tried to build the code, I got:

Code: Select all

fbc "hello.bas" (in directory: /home/Documents/games/FBC/FreeBASIC-1.09.0-linux-x86_64/examples)
ld: cannot find -ltinfo
ld: cannot find -lm
ld: cannot find -ldl
ld: cannot find -lpthread
ld: cannot find -lc
Compilation failed.
I'm not sure what's going on. Is it that FreeBasic need to be in Home? I can only assume it's not finding the files.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Not compiling hello.bas on Debian 11

Post by Munair »

Welcome to the forum.

Compilation failed because the linker (ld) cannot find library files. They may not be installed or there may be another issue. It's hard to tell without more specifics.

If you installed with ./install.sh then FB is installed in /usr/local, which should be OK.

Keep in mind that installing packages manually on Debian systems may cause package dependency/version problems.
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Not compiling hello.bas on Debian 11

Post by badidea »

idea1407 wrote:...I made sure fbc ran in the terminal and that seemed to work okay. Then I opened Geany and loaded hello.bas...
What command did you run run the terminal? Based on what did you decide that is was ok? Geany does not do any magic, so it does not make much sense to me.

Can you post the output of these 3 commands:
- To check the installed fbc version: fbc --version
- To locate fbc: which fbc
- To locate fbc & show the file details: which fbc | xargs ls -l
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: Not compiling hello.bas on Debian 11

Post by speedfixer »

While fbc may run and show that it executes, if you didn't try to compile something, it didn't need to find files required to link against.

david
ktuee753
Posts: 12
Joined: Mar 23, 2022 17:04

Re: Not compiling hello.bas on Debian 11

Post by ktuee753 »

Did the OP ever manage to solve this problem? I found it's weird. It could fail to find -ltinfo, but -lm, -ldl, -pthread, -lc can't be fail. Otherwise his system should be broken to the state of can't boot into the desktop.
Post Reply