Subject: GCC Problem

From: Ian Chilton <[email-masked]>
Date: Mon, 30 Oct 2000 11:50:10 +0000

Hello,

I had a problem compiling egcs 1.0.3a nativly. I had it a few weeks ago, and fixed it, and it worked. Now, I am having exactly the same problem again, and I can't seem to fix it...annoying..

The system has glibc-2.0.6-7lm and binutils-2.8.1. I am using the egcs-1.0.3a-3 patch
Last time I did it, I was using -5lm and the egcs -2 patch..

Here is the problem:

/lfstmp/egcs-1.0.3a/gcc-build/gcc/xgcc -B/lfstmp/egcs-1.0.3a/gcc-build/gcc/ -g -O2 -fno-implicit-templates  -EL -Wl,-soname,libstdc++.so.`echo 2.8.0 | sed 's/\([0-9][.][0-9]\).*/\1/'` -shared -o libstdc++.so.2.8.0 `cat piclist` -lm
/usr/lib/libm.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[4]: *** [libstdc++.so.2.8.0] Error 1
make[4]: Leaving directory `/lfstmp/egcs-1.0.3a/gcc-build/libraries/el/libstdc++'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/lfstmp/egcs-1.0.3a/gcc-build/libraries/libstdc++'
make[2]: *** [multi-all] Error 2
make[2]: Leaving directory `/lfstmp/egcs-1.0.3a/gcc-build/libraries/libstdc++'
make[1]: *** [all-target-libstdc++] Error 2
make[1]: Leaving directory `/lfstmp/egcs-1.0.3a/gcc-build'
make: *** [bootstrap] Error 2

I seem to remember the fix was something like creating symlinks. In /usr/lib, I only had libstdc++.a, so I copied libstdc++.so.2.8.0 from my working /usr/lib dir and made some symlinks as below:

bash-2.04# ls -l /usr/lib/libstdc*
-rw-r--r--   1 root     root      1852098 Oct 28 20:28 /usr/lib/libstdc++.a
lrwxrwxrwx   1 root     root           18 Oct 29 15:40 /usr/lib/libstdc++.so -> libstdc++.so.2.8.0
lrwxrwxrwx   1 root     root           18 Oct 29 15:40 /usr/lib/libstdc++.so.2.8 -> libstdc++.so.2.8.0
-r-xr-xr-x   1 root     root       510594 Oct 29 12:53 /usr/lib/libstdc++.so.2.8.0

I also seem to have all of these OK:

bash-2.04# ls -l /usr/lib/libm*
-rw-r--r--   1 root     root      1240434 Oct 29 15:29 /usr/lib/libm.a
lrwxrwxrwx   1 root     root           19 Oct 29 15:29 /usr/lib/libm.so -> ../../lib/libm.so.6
-rw-r--r--   1 root     root      1255528 Oct 29 15:29 /usr/lib/libm_p.a
-rw-r--r--   1 root     root         3764 Oct 29 15:29 /usr/lib/libmcheck.a
bash-2.04# 

bash-2.04# /sbin/ldconfig
bash-2.04# 

Can someone help me out here, bcause I have had it working, and know it works, but it is frustrating  :)

Just to let you know what I am working on....I hope to have a glibc-2.0.6/egcs 1.0.3a/2.2.14 system AND a glibc-2.2/new gcc/2.4pre9 system available for download in the next week or 2....

Thanks!

Bye for Now,

Ian

                     \|||/ 
                     (o o)
 /----------------ooO-(_)-Ooo----------------\
 |  Ian Chilton                              |
 |  E-Mail : [email-masked]              |
 \-------------------------------------------/

---

From: Keith M Wesolowski <[email-masked]>
Date: Mon, 30 Oct 2000 07:08:46 -0800

On Mon, Oct 30, 2000 at 11:50:10AM +0000, Ian Chilton wrote:

> I had a problem compiling egcs 1.0.3a nativly. I had it a few weeks
> ago, and fixed it, and it worked. Now, I am having exactly the same
> problem again, and I can't seem to fix it...annoying..

> /lfstmp/egcs-1.0.3a/gcc-build/gcc/xgcc
> -B/lfstmp/egcs-1.0.3a/gcc-build/gcc/ -g -O2 -fno-implicit-templates
> -EL -Wl,-soname,libstdc++.so.`echo 2.8.0 | sed
> 's/\([0-9][.][0-9]\).*/\1/'` -shared -o libstdc++.so.2.8.0 `cat
> piclist` -lm /usr/lib/libm.so: could not read symbols: Invalid
> operation collect2: ld returned 1 exit status make[4]: ***
> [libstdc++.so.2.8.0] Error 1

I used to get this too; I think it's simply a bug in old egcs. It
tries to multilib libstdc++, which is usually impossible, since you
would need to have both big and little endian libm.so in the same
place. Since you don't need little-endian (or big-endian, if building
mipsel) libstdc++ anyway, and the big endian one has already been
built, the error is ignorable.

-- 
Keith M Wesolowski			[email-masked]
University of Nevada			http://www.chem.unr.edu
Chemistry Department Systems and Network Administrator