public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* 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

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

"Klaus Rudolph" <lts-rudolph@gmx.de> writes:

> 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?


This is interesting and somewhat annoying.  I hope the Ubuntu developers
who chose to move these packages will be willing to share patches with
gcc so that gcc works by default.

It may work if you pass --build=i386-linux-gnu when you configure gcc.

Ian

^ 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-19  0:26 ` Ian Lance Taylor
@ 2011-05-19  4:48   ` Jeffrey Walton
  0 siblings, 0 replies; 16+ messages in thread
From: Jeffrey Walton @ 2011-05-19  4:48 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Klaus Rudolph, Axel Freyn, gcc-help

On Wed, May 18, 2011 at 8:10 PM, Ian Lance Taylor <iant@google.com> wrote:
> "Klaus Rudolph" <lts-rudolph@gmx.de> writes:
>
>> 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?
>
>
> This is interesting and somewhat annoying.  I hope the Ubuntu developers
> who chose to move these packages will be willing to share patches with
> gcc so that gcc works by default.
It gets better - try and find a console under Unity....

Jeff

^ 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-19  7:59           ` Klaus Rudolph
@ 2011-05-19 10:39             ` Kai Ruottu
  0 siblings, 0 replies; 16+ messages in thread
From: Kai Ruottu @ 2011-05-19 10:39 UTC (permalink / raw)
  To: gcc-help

19.5.2011 7:48, Klaus Rudolph kirjoitti:

> Marc Glisse wrote:
>>
>> If you keep only the system ld (don't install your own) and compile a new
>> gcc, does it work?
>
> Without building own binutils it works.

Yes, the 'ld -> ld.bfd' in Ubuntu 11.04 seems to be patched to search
from more places than the usual '/lib*' and '/usr/lib*'. Using the
command :

    ld -verbose | less

will show the built-in search directories and linker script...

>>> Using system ld instead of system gcc is changing nothing, or?
>>
>> The difference is whether gcc passes different options to ld or ld was
>> compiled with different options (or patches). If you insist on compiling
>> your own, the first thing to do would be to check how the ubuntu versions
>> were compiled.
>>
>
> There is already a bug report for this item:
> https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/738098
>
> In hope the changes for ubuntu could shared with standard binutils or a bugfix for ubuntu will arise.
>
> I will begin with building without own binutils

This whole issue is one-eyed and forgets cross-compiling completely,
with this one as default will :

- use the original Ubuntu 11.04 glibc etc C libraries in their native
   install scheme in a $sysroot

- produce GNU binutils from sources, usually from the Linux ones at
   ftp.kernel.org

- produce GCC from sources, usually from the FSF ones

I wouldn't expect the '--with-sysroot=' changing the default search
paths in 'ld' in the 'i686-ubuntu-linux-gnu' case in any way although
it seems that Ubuntu isn't any normal/standard Linux at all but tries
to be a custom one with customized install paths for its C libraries.

Nothing however disables one to normalize the install directories in
the $sysroot to follow the expected Linux standards...

^ 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 13:25         ` Marc Glisse
@ 2011-05-19  7:59           ` Klaus Rudolph
  2011-05-19 10:39             ` Kai Ruottu
  0 siblings, 1 reply; 16+ messages in thread
From: Klaus Rudolph @ 2011-05-19  7:59 UTC (permalink / raw)
  To: gcc-help

Marc Glisse wrote:
> 
> If you keep only the system ld (don't install your own) and compile a new 
> gcc, does it work?

Without building own binutils it works. 

> 
> > Using system ld instead of system gcc is changing nothing, or?
> 
> The difference is whether gcc passes different options to ld or ld was 
> compiled with different options (or patches). If you insist on compiling 
> your own, the first thing to do would be to check how the ubuntu versions 
> were compiled.
> 

There is already a bug report for this item:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/738098

In hope the changes for ubuntu could shared with standard binutils or a bugfix for ubuntu will arise.

I will begin with building without own binutils

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 20:52   ` kevin diggs
@ 2011-05-19  0:11     ` Jonathan Wakely
  0 siblings, 0 replies; 16+ messages in thread
From: Jonathan Wakely @ 2011-05-19  0:11 UTC (permalink / raw)
  To: kevin diggs; +Cc: Klaus Rudolph, gcc-help

On 18 May 2011 21:31, kevin diggs <diggskevin38@gmail.com> wrote:
> Hi,
>
> On Wed, May 18, 2011 at 4:06 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>
>> Those compilers were configured and built for your 10.04 system so
>> they don't know the correct paths for your 11.04 system
>>
> Just curious:  assuming the build is still around, would a reinstall
> help? Or does he have to rerun configure and redo the build?
>
> kevin
>

I think the paths are set at configure or build time, not when installing.

^ 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  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
  1 sibling, 1 reply; 16+ messages in thread
From: kevin diggs @ 2011-05-18 20:52 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Klaus Rudolph, gcc-help

Hi,

On Wed, May 18, 2011 at 4:06 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> Those compilers were configured and built for your 10.04 system so
> they don't know the correct paths for your 11.04 system
>
Just curious:  assuming the build is still around, would a reinstall
help? Or does he have to rerun configure and redo the build?

kevin

^ 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 12:18       ` Klaus Rudolph
@ 2011-05-18 13:25         ` Marc Glisse
  2011-05-19  7:59           ` Klaus Rudolph
  0 siblings, 1 reply; 16+ messages in thread
From: Marc Glisse @ 2011-05-18 13:25 UTC (permalink / raw)
  To: Klaus Rudolph; +Cc: gcc-help

On Wed, 18 May 2011, Klaus Rudolph wrote:

> Sorry, could you explain what I could test? I thought I should do the same with the system installed tools.

If you keep only the system ld (don't install your own) and compile a new 
gcc, does it work?

> Using system ld instead of system gcc is changing nothing, or?

The difference is whether gcc passes different options to ld or ld was 
compiled with different options (or patches). If you insist on compiling 
your own, the first thing to do would be to check how the ubuntu versions 
were compiled.

-- 
Marc Glisse

^ 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:41     ` Marc Glisse
@ 2011-05-18 12:18       ` Klaus Rudolph
  2011-05-18 13:25         ` Marc Glisse
  0 siblings, 1 reply; 16+ messages in thread
From: Klaus Rudolph @ 2011-05-18 12:18 UTC (permalink / raw)
  To: gcc-help

Marc Glisse wrote:
> >>> /opt/linux-gnu_4.5.3/i686-pc-linux-gnu/bin/ld: cannot find -lc
> >>
> >> Does it work better with the system ld?
> >
> > If I change the line:
> > /home/krud/work/gcc-4.5.3/build_linux_again/./gcc/xgcc .....
> ./libgcc_s.so
> > to
> > gcc ..... ./libgcc_s.so
> >
> > the libgcc_s.so is linked.
> 
> That's not what I asked.

Sorry, could you explain what I could test? I thought I should do the same with the system installed tools. Using system ld instead of system gcc is changing nothing, or? 

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:20   ` Klaus Rudolph
@ 2011-05-18 10:41     ` Marc Glisse
  2011-05-18 12:18       ` Klaus Rudolph
  0 siblings, 1 reply; 16+ messages in thread
From: Marc Glisse @ 2011-05-18 10:41 UTC (permalink / raw)
  To: Klaus Rudolph; +Cc: gcc-help

On Wed, 18 May 2011, Klaus Rudolph wrote:

> Marc Glisse wrote:
>> Yes, Ubuntu moved things around a bit for multiarch support.
> Any way to change that to get a working environment?

Certainly, but that doesn't strike me as a good idea.

>>> /opt/linux-gnu_4.5.3/i686-pc-linux-gnu/bin/ld: cannot find -lc
>>
>> Does it work better with the system ld?
>
> If I change the line:
> /home/krud/work/gcc-4.5.3/build_linux_again/./gcc/xgcc ..... ./libgcc_s.so
> to
> gcc ..... ./libgcc_s.so
>
> the libgcc_s.so is linked.

That's not what I asked.

(note that an ubuntu forum might have people more knowledgeable about the 
recent changes in ubuntu)

-- 
Marc Glisse

^ 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  9:43 ` Marc Glisse
@ 2011-05-18 10:20   ` Klaus Rudolph
  2011-05-18 10:41     ` Marc Glisse
  0 siblings, 1 reply; 16+ messages in thread
From: Klaus Rudolph @ 2011-05-18 10:20 UTC (permalink / raw)
  To: gcc-help

Marc Glisse wrote:
> Yes, Ubuntu moved things around a bit for multiarch support.
> 
Any way to change that to get a working environment?


> > /opt/linux-gnu_4.5.3/i686-pc-linux-gnu/bin/ld: cannot find -lc
> 
> Does it work better with the system ld?

If I change the line:
/home/krud/work/gcc-4.5.3/build_linux_again/./gcc/xgcc ..... ./libgcc_s.so
to
gcc ..... ./libgcc_s.so

the libgcc_s.so is linked. 
Also binutils 2.21 could be build without problems with the installed ubuntu version of gcc.

Regards
 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  9:53 ` Jonathan Wakely
@ 2011-05-18 10:05   ` Klaus Rudolph
  2011-05-18 20:52   ` kevin diggs
  1 sibling, 0 replies; 16+ messages in thread
From: Klaus Rudolph @ 2011-05-18 10:05 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help


Jonathan Wakely wrote:
> 
> You might be able to make the old compilers work by providing the
> correct library paths, but if not you could install the Ubuntu gcc
> package then use that to rebuild gcc 4.5 and 4.6


I exactly did that without success. To compile the 4.6.0 I use the installed compiler from ubuntu. Compiling the binutils 2.21 works fine, but linkung with xgcc did not.

That is the point where I am not able to compile the compiler and also could not use the one compiled on the ubuntu 10.04 version. 

any hints?
 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  8:22 Klaus Rudolph
  2011-05-18  9:06 ` Axel Freyn
  2011-05-18  9:43 ` Marc Glisse
@ 2011-05-18  9:53 ` Jonathan Wakely
  2011-05-18 10:05   ` Klaus Rudolph
  2011-05-18 20:52   ` kevin diggs
  2 siblings, 2 replies; 16+ messages in thread
From: Jonathan Wakely @ 2011-05-18  9:53 UTC (permalink / raw)
  To: Klaus Rudolph; +Cc: gcc-help

On 18 May 2011 07:40, Klaus Rudolph wrote:
> 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

Those compilers were configured and built for your 10.04 system so
they don't know the correct paths for your 11.04 system

> Also a new compilation from gcc sources on ubuntu 11.04 fails with the same problem: cannot find lc and other libs

You might be able to make the old compilers work by providing the
correct library paths, but if not you could install the Ubuntu gcc
package then use that to rebuild gcc 4.5 and 4.6

^ 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  8:22 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  9:53 ` Jonathan Wakely
  2 siblings, 1 reply; 16+ messages in thread
From: Marc Glisse @ 2011-05-18  9:43 UTC (permalink / raw)
  To: Klaus Rudolph; +Cc: gcc-help

On Wed, 18 May 2011, Klaus Rudolph wrote:

> 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

Yes, Ubuntu moved things around a bit for multiarch support.

> /opt/linux-gnu_4.5.3/i686-pc-linux-gnu/bin/ld: cannot find -lc

Does it work better with the system ld?

-- 
Marc Glisse

^ 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  8:22 Klaus Rudolph
@ 2011-05-18  9:06 ` Axel Freyn
  2011-05-18  9:43 ` Marc Glisse
  2011-05-18  9:53 ` Jonathan Wakely
  2 siblings, 0 replies; 16+ messages in thread
From: Axel Freyn @ 2011-05-18  9:06 UTC (permalink / raw)
  To: gcc-help

Hi,
On Wed, May 18, 2011 at 08:40:07AM +0200, Klaus Rudolph wrote:
> 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

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?

Axel

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

* 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

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 10:23 can't run gcc 4.5.3/4.6.0 under ubuntu 11.04 Klaus Rudolph
2011-05-19  0:26 ` Ian Lance Taylor
2011-05-19  4:48   ` Jeffrey Walton
  -- strict thread matches above, loose matches on Subject: below --
2011-05-18  8:22 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

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).