[SUMMARY] and new [Q]: Trouble with gcc and gas

From: Dieter Meinert <dieter.meinert_at_aip.de>
Date: Tue, 10 Mar 1998 15:19:16 +0100 (MET)

-----BEGIN PGP SIGNED MESSAGE-----


My original mail was:

|=> Hello World,
|=> I'm trying to compile gcc (2.7.2.2, 2.7.2.3) on a DEC Alpha
|=> running DU4.0c in order to later use gas with some assembler
|=> programs.
|=>
|=> Following problem, when building stage1:
|=> configuring> ./configure --prefix=/vol/local
|=> This appears to be a alpha-dec-osf4.0 system.
|=> Using `./config/alpha/alpha.c' to output insns.
|=> Using `./config/alpha/alpha.md' as machine description file.
|=> Using `./config/alpha/osf2.h' as target machine macro file.
|=> Using `./config/alpha/xm-alpha.h' as host machine macro file.
|=> Merged alpha/x-alpha.
|=> Merged c++ fragment(s).
|=> Created `./Makefile'.
|=> Merged alpha/x-alpha.
|=> Created `cp/Makefile'.
|=> Links are now set up to build a native compiler for alpha-dec-osf4.0.
|=> making> make LANGUAGES=c
|=> ...skipping until error appears...
|=> if [ -f libgcc2.ready ] ; then \
|=> true; \
|=> else \
|=> touch libgcc2.ready; \
|=> fi
|=> ./xgcc -B./ -DIN_GCC -g -I./include enquire.o -o enquire
|=> inst emulated pid=31003 <ld> va=0x14000f088 pc=0x120046e08 inst=0x282b0000
|=> collect2: ld returned 1 exit status
|=> /lib/libc.a(ldr_atexit.o)(.lita+0x38): undefined reference to `_DYNAMIC_LINK'
|=> /lib/libc.a(find_rtfunc.o)(.lita+0x90): undefined reference to `_gpinfo'
|=> /lib/libc.a(find_rtfunc.o)(.lita+0xa8): undefined reference to `_fpdata_size'
|=> /lib/libc.a(find_rtfunc.o)(.lita+0xb8): undefined reference to `_DYNAMIC_LINK'
|=> /lib/libc.a(ldr_load.o)(.lita+0xa8): undefined reference to `_DYNAMIC_LINK'
|=> make: *** [enquire] Error 1
|=> making>
|=>
|=> Looks like the problem is with the /lib/libc.a, but where are
|=> these functions/arrays defined ?
|=>
|=> BTW, what does the "inst emulated pid=31003 <ld> va=0x14000f088
|=> pc=0x120046e08 inst=0x282b0000" line mean, which appears with
|=> most loading/linking routines on some of our machines but not on
|=> others ? (This does NOT affect the negative result of the
|=> compilation, though.) Also the flags -D_OSF_SOURCE, -D__GNUC__
|=> and -D_POSIX_SOURCE which I added some times, one or the other,
|=> to the Makefile don't change the result.
|=>
|=> P.S. Does anyone experience problems with the bourne shell the
|=> way that it does not find local directories (e.g ./dir is found,
|=> dir is not...)? Looks like a problem with my personal
|=> environment, since it works OK as root.
|=>

I received a handful of answers, namely from:

"system PRIVILEGED account- John F. Marten" <root_at_tigger.oslc.org>
Bernt Christandl <beb_at_mpe.mpg.de>
Becki Kain <beckers_at_josephus.furph.com>

ranging from "I had no problems" to an offer of the binaries
Thx, Folks, but this did not solve my problem.

Still I didn't find a solution, but some more hints:

<STRANGE>
      When configuring I used "./configure --prefix=/vol/local"
      This seems to be the reason for the "/lib/libc.a: ..." undefined
      references, since when configuring with a different prefix (any I
      tried...) I do not get this problem. What is happening here ?
<STRANGE>

I managed to get gcc compiled for a prefix "/usr/local", but when
trying to compile a simple program I get LOTS of unresolved's
from the same library /lib/libc.a:

gcc -o test change-passwd.c util.c
inst emulated pid=17628 <as> va=0x14000eba8 pc=0x12001f118 inst=0x28310000
inst emulated pid=14642 <as> va=0x14000eba8 pc=0x12001f118 inst=0x28310000
inst emulated pid=18037 <ld> va=0x14001a100 pc=0x12001f9b8 inst=0x284a0000
collect2: ld returned 1 exit status
/usr/lib/cmplrs/cc/crt0.o(.pdata+0x4): relocation truncated to fit: SREL32 xdata
/lib/libc.a(exit.o)(.pdata+0x4): relocation truncated to fit: SREL32 xdata
/lib/libc.a(exit.o)(.pdata+0xc): relocation truncated to fit: SREL32 xdata
/lib/libc.a(time.o)(.pdata+0x4): relocation truncated to fit: SREL32 xdata
(and so on, about 200 lines...)

Now I tried to install glibc, but it tells me
"*** The GNU C library is currently not available for this platform."

When trying to install a newer gcc (2.8.0 or 2.8.1) I run into
trouble with gnu-as which is needed by some s/w development system
(configure'd --with-gnu-as --with-gnu-ld):

./xgcc -B./ -DIN_GCC -g -I./include -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 \
  -DSYS_FLOAT_H_WRAP=$SYS_FLOAT_H_WRAP \
  -I. -c ./enquire.c
/tmp/ccaauvua.s: Assembler messages:
/tmp/ccaauvua.s:5: Error: Unknown pseudo-op: `.arch'
/tmp/ccaauvua.s:679: Error: macro requires $at register while noat in effect
/tmp/ccaauvua.s:692: Error: macro requires $at register while noat in effect
and so on (about 200 lines)...

When compiling with DEC as I get it installed but the assembler
messages come with any program I try to compile using GNU-as :-(

Any help is welcome, since we URGENTLY need the complete GNU
development system.

Tschüß,
                                                Dieter
 
  _____________________________*__________________________________
 / * dieter.meinert_at_aip.de \
 \ Dieter Meinert (- ** http://www.obs.aip.de/~dieter/ \
  \__________________A______*__*___________________________________/
         (public pgp key from http://www.obs.aip.de/~dieter/)

-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBNQVL4/YksnFoaQ6JAQGuBgQAn3qwJxIwn+y+DDfWYo2PEX6sWPkaV6Qv
n3c5/kTXSc+CsQtgKpVSh8DZcUC5rNyNXvTsIRY/pkIxO1UtM+7g4BIQEtC5Lf4K
lZyUWCz1lrf3lWPCL5GeW8J+9c/G7qvPjLAZE4xv+lsUjr6VPd4iAwpwPSjOb67I
l8LDcDt38KA=
=iZxO
-----END PGP SIGNATURE-----
Received on Tue Mar 10 1998 - 15:21:29 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT