LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-07-2010, 05:21 PM   #1
dbulka
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Rep: Reputation: 0
Question configure: error: C compiler cannot create executables -- New flavor


There are a few threads posted in the past with this problem but mine seems to be of a different flavor. (Most of the others did not have a C compiler installed, but I have gcc.)

Overall, I'm trying to perform the "./configure" step on the Grub source code. The "configure" fails with the subject message. Digging into the "config.log" shows that "configure" is trying to compile a simple C program with the "-m32" flag, and is failing to locate some library:

configure:2421: checking for C compiler default output file name
configure:2424: gcc -m32 conftest.c >&5
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../libc.so when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../libc.a when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libc.so when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libc.a when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: ld returned 1 exit status


I'm running SUSE Linux 10.2
Linux 2.6.26.60
The architecture is x86-64
gcc version 4.1.2
binutils 2.20


As far as I know, the "-m32" flag tells gcc to build a 32-bit executable, so it is probably looking for some 32-bit library on an x86-64 machine.

I then tried to compile my own little "hello.c" program. It worked fine with

# gcc hello.c

but failed with the same error msgs for

# gcc -m32 hello.c


This stuff works okay on RedHat rhel5 (x86-64) so the notion of compiling with "-m32" on x86-64 is mainstream.

Any idea why gcc cannot find the library it is looking for?
 
Old 01-07-2010, 06:20 PM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
maybe you did not install the compatibility libraries. 32 bit programs need 32bit libraries.
 
Old 01-07-2010, 11:13 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
This example is from Suse 9.3 pro x86_64 :

glibc-devel-2.3.4-23.3.x86_64.rpm
glibc-devel-32bit-9.3-7.1.x86_64.rpm

I guess, you are missing the second one, "glibc-devel-32bit"

.....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure: error: C++ compiler cannot create executables dicou Linux - Newbie 19 06-22-2017 04:17 PM
configure: error: C compiler cannot create executables RLH1919 Slackware 6 11-13-2009 07:05 PM
configure: error: C compiler cannot create executables metalforever Linux - Software 1 06-21-2008 12:57 AM
configure: error: C compiler cannot create executables Geneset Linux - Newbie 7 07-13-2007 03:11 PM
configure error - C compiler cannot create executables MrLobster Linux - Software 1 12-24-2005 12:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration