Hi,
On Wed, Jun 16, 2004 at 08:30:38PM +0200, Frank Heckenbach wrote:
> Gert Doering wrote:
>
> > I'm trying to build the gpc-20040516 "beta" snapshopt with GCC-3.3.x on
> > AIX 5.1. GCC-3.x itself supports AIX 5, I have a working version on
> > the system (binary install, not compiled-it-myself).
[..]
> > the line 511 is this one:
> >
> > TARGET_CPU_CPP_BUILTINS ();
> >
> > ...which fully escapes me as for why it might not compile...!??
[..]
> Unless you need very particular system conditionals (Pascal programs
> usually don't), just insert the line
>
> #define rs6000_cpu_cpp_builtins(foo)
>
> in lang.c.
Thanks for your quick reply. Unfortunately, I didn't see it before
today because my spam filter didn't know about the GNU Pascal list
yet (all e-mails with unknown To:/CC: headers are quarantained as
"maybe spam". Stupid me.)
I will try this approach over the weekend.
In the meantime, I tried something else - gcc-3.2.3 with gpc-20040516,
again on AIX 5.1 and additionally on AIX 5.2 (in case AIX 5.1 is broken).
The effect is quite different here. It builds all of xgpc and the
libgpc.a just fine, but then crashes in trying to build "binobj".
The error is this:
gmake[2]: Entering directory `/s1/gpc-build/gcc/p/utils'
../.././xgpc -B../.././ -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -O2 --executable-path=. --unit-path=/s1/gcc-3.2.3/gcc/p/rts --unit-path=/s1/gcc-3.2.3/gcc/p/units `cat needed-options` "/s1/gcc-3.2.3/gcc/p/utils/binobj.pas"
collect2: library libgpc not found
gmake[2]: *** [binobj] Error 1
gmake[2]: Leaving directory `/s1/gpc-build/gcc/p/utils'
gmake[1]: *** [pascal.utils] Error 2
gmake[1]: Leaving directory `/s1/gpc-build/gcc'
If I change the -B invocation to use an absolute path, the library is
found, but the (AIX) ld doesn't really like the result either:
../.././xgpc -B/s1/gpc-build/gcc/ -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -O2 --executable-path=. --unit-path=/s1/gcc-3.2.3/gcc/p/rts --unit-path=/s1/gcc-3.2.3/gcc/p/units `cat needed-options` "/s1/gcc-3.2.3/gcc/p/utils/binobj.pas"
ld: 0711-317 ERROR: Undefined symbol: Tempdirectory.1
ld: 0711-317 ERROR: Undefined symbol: Tempstr.4
ld: 0711-317 ERROR: Undefined symbol: Buffer.8
ld: 0711-317 ERROR: Undefined symbol: Zero.3
ld: 0711-317 ERROR: Undefined symbol: Epoch.6
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
I've checked with "nm", and it looks like all the stuff should be there:
gd@hilb3:/s1/gpc-build/gcc/p/utils> nm ../../libgpc.a | grep Tempdir
Tempdirectory.1 U -
Tempdirectory.1 d 37956 8
Tempdirectory.1.P8 d 37952 4
Tempdirectoryset.0 d 37948 4
Since I had the nagging suspicion that there might be something in the pascal
libraries that the system ld doesn't understand, I tried installing
the GNU binutils, ./configure'd again, and rebuilt.
Built bombed in libgcc (gcc created stuff that gas didn't like).
Removed gas, ./configure'd again, rebuilt.
Same error as above (collect2 not finding libgpc). Trying again with
absolute paths and GNU ld linked into the "-B" directory as "real-ld"
led to a new error:
../.././xgpc -B/gnulocal/src/gcc-3.2.3/gcc/ -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -O2 --executable-path=. --unit-path=/gnulocal/src/gcc-3.2.3/gcc/p/rts --unit-path=/gnulocal/src/gcc-3.2.3/gcc/p/units `cat needed-options` "binobj.pas"
/gnulocal/src/gcc-3.2.3/gcc/libgpc.a(filename.o)(.tc+0x4):filename.pas:
undefined reference to `Tempdirectory.1'
/gnulocal/src/gcc-3.2.3/gcc/libgpc.a(filename.o)(.tc+0x4):filename.pas:
undefined reference to `Tempstr.4'
/gnulocal/src/gcc-3.2.3/gcc/libgpc.a(filename.o)(.tc+0x4):filename.pas:
undefined reference to `Buffer.8'
/gnulocal/src/gcc-3.2.3/gcc/libgpc.a(time.o)(.tc+0x4):time.pas:
undefined reference to `Zero.3'
/gnulocal/src/gcc-3.2.3/gcc/libgpc.a(time.o)(.tc+0x4):time.pas:
undefined reference to `Epoch.6'
collect2: ld returned 1 exit status
(the -B path is different from the example above, because it's a
different system - the other one doesn't have the GNU binutils
installed yet - but don't let that confuse you)
--> so it seems that actually the library itself has unresolved symbols,
and not the "binobj.pas" program it tries to link.
"ranlib" doesn't help either.
Any further ideas how to tackle this? The whole symbol format confuses
me - being a C programmer, I'm used to errors about "_crypt" not found,
but not without a "_" and neither with trailing numbers...
thanks again,
gert
--
Gert Doering gd(a)medat.de
MEDAT Muenchen Tel: 089/126808-0 Fax: -50