LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
LinkBack Search this Thread
Old 05-07-2005, 08:55 PM   #1
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Rep: Reputation: 30
GCC Problems..really need help.


Well, it started off a problem configuring a kernel...and now I can compile nothing.


Firstly, I was trying to recompile my kernel...yet I ran into an unsual problem.

Code:
Linux:/usr/src/linux # make menuconfig
  HOSTCC  scripts/basic/fixdep
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld:/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../libc.so: file format not recognized; treating as linker script
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld:/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../libc.so:5: syntax error
collect2: ld returned 1 exit status
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
Linux:/usr/src/linux #
So, I went through yast...and re-installed glibcc.

..now...same problem as before with configuring the kernel..but I can no longer compile anything.

When I try..this is what happens.

Code:
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.
Needless to say, I'm lost.

Help appreciated...thanks.

-RoaCh
 
Old 05-07-2005, 11:22 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,988

Rep: Reputation: 261Reputation: 261Reputation: 261
Did you check the config.log? It should have the listing of the test program that it failed to compile and the exact error message(s). You could also try compiling a simple C program:

Code:
#include <stdio.h>

int main(void) {
   puts("Hello, world.");
   return 0;
}
eith gcc test.c -o test

and see what errors occur. Chances are, one of the gcc libraries got hosed and you'll need to reinstall the libgcc RPM.

Hopefully this will help some. I hate problems like this...
 
Old 05-07-2005, 11:28 PM   #3
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
-edit

I'll post part of the config.log in a moment

Last edited by RoaCh Of DisCor; 05-07-2005 at 11:30 PM.
 
Old 05-07-2005, 11:32 PM   #4
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
maybe this will help....

Code:
## ----------- ##
## Core tests. ##
## ----------- ##

configure:1289: checking for a BSD-compatible install
configure:1343: result: /usr/bin/install -c
configure:1354: checking whether build environment is sane
configure:1397: result: yes
configure:1430: checking for gawk
configure:1446: found /bin/gawk
configure:1456: result: gawk
configure:1466: checking whether make sets $(MAKE)
configure:1486: result: yes
configure:1665: checking whether NLS is requested
configure:1674: result: yes
configure:1712: checking for msgfmt
configure:1743: result: /usr/bin/msgfmt
configure:1752: checking for gmsgfmt
configure:1783: result: /usr/bin/msgfmt
configure:1822: checking for xgettext
configure:1853: result: /usr/bin/xgettext
configure:1893: checking for msgmerge
configure:1923: result: /usr/bin/msgmerge
configure:1986: checking for style of include used by make
configure:2014: result: GNU
configure:2085: checking for gcc
configure:2111: result: gcc
configure:2355: checking for C compiler version
configure:2358: gcc --version </dev/null >&5
gcc (GCC) 3.3.5 20050117 (prerelease) (SUSE Linux)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2361: $? = 0
configure:2363: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.5/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux
Thread model: posix
gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
configure:2366: $? = 0
configure:2368: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2371: $? = 1
configure:2395: checking for C compiler default output
configure:2398: gcc    conftest.c  >&5
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld:/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../libc.so: file format not recognized; treating as linker script
/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld:/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../libc.so:5: syntax error
collect2: ld returned 1 exit status
configure:2401: $? = 1
configure: failed program was:
| #line 2374 "configure"
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "alsa-utils"
| #define VERSION "1.0.9rc2"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2440: error: C compiler cannot create executables
See `config.log' for more details.
 
Old 05-08-2005, 12:51 AM   #5
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
what is the output of file on those two?


here is how mine is set up:

bash-3.00$ file libc.so.6
libc.so.6: symbolic link to `libc-2.3.4.so'

bash-3.00$ file libc-2.3.4.so
libc-2.3.4.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
 
Old 05-08-2005, 02:32 AM   #6
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Well, I have a few...here's the output..

Code:
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 # file /lib/i686/libc.so.6
/lib/i686/libc.so.6: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 # file /lib/libc.so.6
/lib/libc.so.6: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 # file /lib/tls/libc.so.6
/lib/tls/libc.so.6: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 # file /usr/lib/libc.so
/usr/lib/libc.so: ASCII C program text
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 # file /usr/lib/nptl/libc.so
/usr/lib/nptl/libc.so: ASCII C program text
Linux:/home/ravencrow/Downloads/alsa-utils-1.0.9rc2 #
 
Old 05-08-2005, 02:45 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
not sure about the ASCII text

my suggestion ( keep in mind this is my opinion) would be to try re-installing the development environment and see if that helps
 
Old 05-08-2005, 03:00 AM   #8
chakkaradeepcc
Member
 
Registered: Mar 2005
Posts: 44

Rep: Reputation: 15
hi,
just try this out,

Code:
#echo 'main(){}' > dummy.c
#cc dummy.c [or] gcc dummy.c
#readelf -l a.out | grep ': /lib'
if ur environment is proper u should get this output.,
[Requesting program interpreter: /lib/ld-linux.so.2]

if ur not getting this output, am sorry to tell u that ur development environment is corrupted and only one BEST solution is to re-install ur development environment.....

and remember Glibc doesnt work alone, it is part of The Toolchain which comprises of Binutils,Glibc and GCC.
The dynamic linker for which we are checking in above code is always shipped with Binutils and not with Glibc,Glibc contains the C libraries......
hope i made u clear a little bit..........anyway do post ur reply,

with regards,
C.C.Chakkaradeep
 
Old 05-08-2005, 11:45 AM   #9
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by chakkaradeepcc
hi,
just try this out,

Code:
#echo 'main(){}' > dummy.c
#cc dummy.c [or] gcc dummy.c
#readelf -l a.out | grep ': /lib'
Do I put that in a console and run it? I did that...it didn't do anything.
 
Old 05-08-2005, 01:41 PM   #10
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by __J
not sure about the ASCII text

my suggestion ( keep in mind this is my opinion) would be to try re-installing the development environment and see if that helps
Ok, newbie question..thank god I'm in this forum .

What exactly is the development environment?
 
Old 05-08-2005, 10:17 PM   #11
chakkaradeepcc
Member
 
Registered: Mar 2005
Posts: 44

Rep: Reputation: 15
hi,

just open a Terminal if u r in Graphical Mode or type in the Console if u r Multi-user mode........and try those statements which i have posted before........if u r not getting the output which i have specified,then ur system's dynamic linker is corrupted and BEST way is to re-install linux!

I had this problem and atlast the only option left to me was Re-Installing the system!

with regards,
C.C.Chakkaradeep
 
Old 05-10-2005, 06:14 PM   #12
RoaCh Of DisCor
Member
 
Registered: Apr 2004
Location: Washington State
Distribution: SuSE 9.3 / Slackware-Current
Posts: 701

Original Poster
Rep: Reputation: 30
I reinstalled alot of things..most importantly glibc and gcc...that appeared to fix things
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Compiling Problems With GCC And C++ phnxbn Linux - Software 0 11-02-2004 05:49 PM
GCC problems natm Linux - Newbie 8 10-17-2004 09:42 PM
GCC problems inanna Red Hat 4 04-28-2004 04:20 PM
GCC problems garf12 Linux - Software 1 03-07-2004 09:59 PM
gcc problems 2k. Linux From Scratch 1 07-19-2003 03:20 PM


All times are GMT -5. The time now is 01:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration