public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* can't run gcc 4.5.3/4.6.0 under ubuntu 11.04
@ 2011-05-18  8:22 Klaus Rudolph
  2011-05-18  9:06 ` Axel Freyn
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Klaus Rudolph @ 2011-05-18  8:22 UTC (permalink / raw)
  To: gcc-help

Hi all,

after I update my ubuntu system to 11.04 I got some strange errors.

Under 10.04 I compiled 4.5.3 and 4.6.0 without any problems and both versions work as expected.

After update to ubuntu 11.04 I got always errors while linking with these compilers:
krud@mauersegler:~/test/c++/compile_ubuntu_11.04$ /opt/_linux-gnu_4.5.3/bin/g++ main.cpp 
/opt/_linux-gnu_4.5.3/bin/../lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lm
/opt/_linux-gnu_4.5.3/bin/../lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status


Also a new compilation from gcc sources on ubuntu 11.04 fails with the same problem: cannot find lc and other libs
/home/krud/work/gcc-4.5.3/build_linux_again/./gcc/xgcc -B/home/krud/work/gcc-4.5.3/build_linux_again/./gcc/ -B/opt/linux-gnu_4.5.3/i686-pc-linux-gnu/bin/ -B/opt/linux-gnu_4.5.3/i686-pc-linux-gnu/lib/ -isystem /opt/linux-gnu_4.5.3/i686-pc-linux-gnu/include -isystem /opt/linux-gnu_4.5.3/i686-pc-linux-gnu/sys-include    -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o tf-signs_s.o unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o gthr-gnat_s.o unwind-c_s.o emutls_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
/opt/linux-gnu_4.5.3/i686-pc-linux-gnu/bin/ld: cannot find -lc

The strace output shows:
1538 2495  brk(0x8569000)                    = 0x8569000
1539 2495  open("/proc/meminfo", O_RDONLY)   = 9
1540 2495  fstat64(9, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
1541 2495  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7785000
1542 2495  read(9, "MemTotal:        3925908 kB\nMemF"..., 1024) = 1024
1543 2495  close(9)                          = 0
1544 2495  munmap(0xb7785000, 4096)          = 0
1545 2495  open("/opt/linux-gnu_4.5.3/lib/gcc/i686-pc-linux-gnu/4.5.3/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or di     rectory)
1546 2495  open("/opt/linux-gnu_4.5.3/lib/gcc/i686-pc-linux-gnu/4.5.3/libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or dir     ectory)
1547 2495  open("/opt/linux-gnu_4.5.3/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/lib/libm.so", O_RDONLY|O_LARGEFIL     E) = -1 ENOENT (No such file or directory)
1548 2495  open("/opt/linux-gnu_4.5.3/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/lib/libm.a", O_RDONLY|O_LARGEFILE     ) = -1 ENOENT (No such file or directory)
1549 2495  open("/opt/linux-gnu_4.5.3/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such f     ile or directory)
1550 2495  open("/opt/linux-gnu_4.5.3/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such fi     le or directory)
1551 2495  open("/opt/linux-gnu_4.5.3/i686-pc-linux-gnu/lib/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1552 2495  open("/opt/linux-gnu_4.5.3/i686-pc-linux-gnu/lib/libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1553 2495  open("/opt/linux-gnu_4.5.3/lib/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1554 2495  open("/opt/linux-gnu_4.5.3/lib/libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1555 2495  open("/usr/local/lib/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1556 2495  open("/usr/local/lib/libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1557 2495  open("/lib/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1558 2495  open("/lib/libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1559 2495  open("/usr/lib/libm.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1560 2495  open("/usr/lib/libm.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
1561 2495  write(2, "/opt/linux-gnu_4.5.3/lib/gcc/i68"..., 89) = 89


---- 

Any ideas?
Thanks!
 Klaus


-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: can't run gcc 4.5.3/4.6.0 under ubuntu 11.04
@ 2011-05-18 10:23 Klaus Rudolph
  2011-05-19  0:26 ` Ian Lance Taylor
  0 siblings, 1 reply; 16+ messages in thread
From: Klaus Rudolph @ 2011-05-18 10:23 UTC (permalink / raw)
  To: Axel Freyn, gcc-help


Axel Freyn wrote: 
> Did you install the development packages? that is, the ubuntu-package
> libc6-dev?
> If not, the compiler is right :)
> If yes -- could you post where on your Ñ•ystem libc.so and libm.so really
> exist?
> 

the packages are installed and running the gcc/g++ compiler which comes with ubuntu runs fine.

The libs could be found:

krud@mauersegler:~$ ls -lsa /usr/lib/i386-linux-gnu/libc.so
4 -rw-r--r-- 1 root root 283 2011-04-11 13:03 /usr/lib/i386-linux-gnu/libc.so
krud@mauersegler:~$ ls -lsa /lib/i386-linux-gnu/libc.so.6
0 lrwxrwxrwx 1 root root 12 2011-05-17 14:27 /lib/i386-linux-gnu/libc.so.6 -> libc-2.13.so
krud@mauersegler:~/test/c++/compile_ubuntu_11.04$ ls -lsa /lib/i386-linux-gnu/libc-2.13.so
1404 -rwxr-xr-x 1 root root 1434180 2011-04-11 13:08 /lib/i386-linux-gnu/libc-2.13.s

The xgcc is not looking inside  /usr/lib/i386-linux-gnu ...

Is there a trick to setup the compiler build (configure??, environment flags) with some additional lib path infos to give xgcc a chance to find the libs?

Regards
 Klaus
 
-- 
Ihr GMX Postfach immer dabei: die kostenlose GMX Mail App für Android.
Komfortabel, sicher und schnell: www.gmx.de/android

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-05-19  7:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18  8:22 can't run gcc 4.5.3/4.6.0 under ubuntu 11.04 Klaus Rudolph
2011-05-18  9:06 ` Axel Freyn
2011-05-18  9:43 ` Marc Glisse
2011-05-18 10:20   ` Klaus Rudolph
2011-05-18 10:41     ` Marc Glisse
2011-05-18 12:18       ` Klaus Rudolph
2011-05-18 13:25         ` Marc Glisse
2011-05-19  7:59           ` Klaus Rudolph
2011-05-19 10:39             ` Kai Ruottu
2011-05-18  9:53 ` Jonathan Wakely
2011-05-18 10:05   ` Klaus Rudolph
2011-05-18 20:52   ` kevin diggs
2011-05-19  0:11     ` Jonathan Wakely
2011-05-18 10:23 Klaus Rudolph
2011-05-19  0:26 ` Ian Lance Taylor
2011-05-19  4:48   ` Jeffrey Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).