Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
11-10-2009, 09:53 PM
|
#1
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Rep:
|
gcc problem when compiling many games
Hi,
I am getting an error about gcc cannot create executables, I think it is a package I don't have installed.
I think this because it works on other things.
It says this when I try ./configure on one moo:
Quote:
loading cache ./config.cache
checking for bison... bison -y
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot creat
e executables.
brlboy@mtgames:~/MOO-1.8.2g4r1$
|
Then when I look at config.log, it says this:
Quote:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:563: checking for bison
configure:596: checking for gcc
configure:709: checking whether the C compiler (gcc ) works
configure:725: gcc -o conftest conftest.c 1>&5
/usr/bin/ld: cannot find /lib/ld-linux.so.2
collect2: ld returned 1 exit status
configure: failed program was:
#line 720 "configure"
#include "confdefs.h"
main(){return(0);}
|
Any help with figuring out which package is responsible would be apreciated.
-Michael.
P.S. I am using ubuntu 9.10.
|
|
|
11-11-2009, 01:14 AM
|
#2
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
I believe you're missing binutils
cheers
|
|
|
11-11-2009, 06:53 AM
|
#3
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Original Poster
Rep:
|
Oh man, it appears I already have binutils.
Quote:
Reading package lists... Done
Building dependency tree
Reading state information... Done
binutils is already the newest version.
binutils set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
|
-Michael.
|
|
|
11-11-2009, 07:45 AM
|
#4
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
Ooops .. my mistake, according to my system /lib/ld-linux.so.2 belongs to glibc, can you verify the validity of your glibc package ? .. I'm not sure what the command is on your system
cheers
|
|
|
11-11-2009, 09:00 AM
|
#5
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,464
|
Hi
On Ubuntu systems, the package to install is "build-essential".
|
|
|
11-11-2009, 09:17 AM
|
#6
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by lilmike
Code:
/usr/bin/ld: cannot find /lib/ld-linux.so.2
Any help with figuring out which package is responsible would be apreciated.
|
"What package includes the file that some programs complains for lack of?"
That is a common question and you should learn the generic answer, even though in this case Guttorm gave you a better specific answer.
Bookmark this page:
http://packages.ubuntu.com/
Scroll down to where it says Search the contents of packages
Paste the name of the missing file into the box there (I pasted in ld-linux.so.2
Click Search. That brought me to a page that tells me the package name is libc6
In this particular situation, I think it is better to install build-essential.
If you installed libc6, I expect that would fix the problem with ld-linux.so.2 and just get you to the next missing file toward what you want to accomplish. A few rounds of that would get the job done. But installing build-essential is easier and better.
|
|
|
11-11-2009, 02:37 PM
|
#7
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Original Poster
Rep:
|
Hi,
I installed build-essentials
I also tried installing libc6, but it said it was already the latest version.
It still gives an error, it looks like the same error.
Anyway, just in case it isn't. here it is:
Quote:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:563: checking for bison
configure:596: checking for gcc
configure:709: checking whether the C compiler (gcc ) works
configure:725: gcc -o conftest conftest.c 1>&5
/usr/bin/ld: cannot find /lib/ld-linux.so.2
collect2: ld returned 1 exit status
configure: failed program was:
#line 720 "configure"
#include "confdefs.h"
main(){return(0);}
|
I looked for the file on packages.ubuntu.com, and found the same you did.
This mentions something about /usr/ld, could that be a problem?
-Michael.
|
|
|
11-11-2009, 02:43 PM
|
#8
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Original Poster
Rep:
|
very interesting
Hi,
I just did, out of curiosity, sudo ./configure
It, to my utter amazement, worked.
I wonder why you can run it as root, and it works, but you can't as a user?
-Michael.
|
|
|
11-11-2009, 04:19 PM
|
#9
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
That is all confusing. It is not supposed to act that way.
Try
and
What files and symbolic links are listed and what access rights do they have?
If the access rights are limited enough, you might need to sudu just to get that info.
On every system I've used, all that is world readable.
|
|
|
11-11-2009, 04:27 PM
|
#10
|
Senior Member
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
|
maybe the configure script is loading from an old cache?
|
|
|
11-11-2009, 05:42 PM
|
#11
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
May be
sudo apt-get install libc6-dev
.. Or use 'synaptic' for the install
'gcc' really can't create much without this.
Also suggested : sudo apt-get install g++
.....
P.S.: # 10
Quote:
maybe the configure script is loading from an old cache
|
.. Please delete ' config.cache '.
.....
Last edited by knudfl; 11-11-2009 at 05:53 PM.
|
|
|
11-11-2009, 05:47 PM
|
#12
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Original Poster
Rep:
|
Hi,
When I do ls -l /lib/ld*, it returns this:
Quote:
-rwxr-xr-x 1 root root 113320 Oct 7 08:50 /lib/ld-2.10.1.so
lrwxrwxrwx 1 root root 12 Oct 30 17:57 /lib/ld-linux.so.2 -> ld-2.10.1.so
|
When I do file /lib/ld*, it returns this:
Quote:
/lib/ld-2.10.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV),
dynamically linked, stripped
/lib/ld-linux.so.2: symbolic link to `ld-2.10.1.so'
|
It does mention something about /usr/ld in that config.log, do you think that has anything to do with it?
-Michael.
|
|
|
11-11-2009, 06:10 PM
|
#13
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by lilmike
It does mention something about /usr/ld in that config.log, do you think that has anything to do with it?
|
Sorry about ignoring that question before.
/usr/bin/ld is the name of the program that is complaining about the lack of /lib/ld-linux.so.2
But you have shown that /lib/ld-linux.so.2 is readable by non root.
/lib/ld-linux.so.2 is a symbolic link to /lib/ld-2.10.1.so and /lib/ld-2.10.1.so is the 32 bit ELF file it ought to be (assuming you are running 32 bit Ubuntu, not 64 bit Ubuntu).
I don't even have a guess why /usr/bin/ld can find /lib/ld-linux.so.2 when run as root but not when run as non root.
|
|
|
11-11-2009, 08:32 PM
|
#14
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Original Poster
Rep:
|
Hi,
I'm sorry, I thought you meant that I should run ls -l /lib/ld* and file /lib/ld* with sudo, sorry.
Still, the output appears to be the same without sudo.
Here it is, anyway.
Quote:
dragonsmoo@mtgames:~$ ls -l /lib/ld*
-rwxr-xr-x 1 root root 113320 Oct 7 08:50 /lib/ld-2.10.1.so
lrwxrwxrwx 1 root root 12 Oct 30 17:57 /lib/ld-linux.so.2 -> ld-2.10.1.so
dragonsmoo@mtgames:~$ dragonsmoo@mtgames:~$ file /lib/ld*
/lib/ld-2.10.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV),
dynamically linked, stripped
/lib/ld-linux.so.2: symbolic link to `ld-2.10.1.so'
dragonsmoo@mtgames:~$
|
I don't think anything has changed.
Also, I tried apt-get install libc6-dev, and apt-get install g++, and they both returned that they are already the latest version.
Now, I just tried to ./configure on another user, same perms, same group, everything, and, to my disbelief, it worked!
Is there any flag I might need to set on a user to get this to work?
If you aren't sure, is there a way I can compare their attributes, and see what's different?
And then, how can I change the attributes.
Thanks,
-Michael.
|
|
|
11-13-2009, 04:47 PM
|
#15
|
Member
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57
Original Poster
Rep:
|
Hi,
I was wondering if there is a way to check flags, and other things of a user, so I can see if there is something different between the user that can compile the server, and that one that can't.
Thanks,
-Michael.
|
|
|
All times are GMT -5. The time now is 06:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|