gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Bootstrapping GM2 on MacOSX Panther


From: Ed Smith-Rowland
Subject: Re: [Gm2] Bootstrapping GM2 on MacOSX Panther
Date: Thu, 17 Mar 2005 21:20:34 -0500
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Michael H. Lambert wrote:

Ed,

Did you ever get this problem figured out? When I try to build, it appears that stage1/gm2/gm2lcc links, but then I see

gcc -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -o stage1/gm2/gm2l \
              gm2/gm2-compiler-boot/gm2l_init.o \
              gm2/gm2-compiler-boot/m2flex.o \
gm2/gm2-compiler-boot/gm2l.o gm2/gm2-compiler-boot/gm2.a gm2/gm2-libs-boot/libgm2.a gm2/p2c/p2c-src/src/libp2c.a ./intl/libintl.a -liconv ../libiberty/libiberty.a
ld: Undefined symbols:
_M2Reserved_NulName
make[2]: *** [stage1/gm2/gm2l] Error 1
make[2]: Leaving directory `/Users/lambert/gnu/obj/gcc'
cp: stage1/gm2/gm2l: No such file or directory
make[1]: *** [gm2l] Error 1
make[1]: Leaving directory `/Users/lambert/gnu/obj/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/Users/lambert/gnu/obj'

Note that the build of gm2l is getting the error, not gm2lcc.

Thanks,

Michael

On 15 Mar 2005, at 10:07, Ed Smith-Rowland wrote:

I am trying to bootstrap the gcc-3.3.4 + gm2 combo on Mac OS X 10.3.8. This is a BSDish system.



I never got an answer to get past this.
Gaius asked me to:

   find . -name 'M2Reserved.o' -exec nm {} \; -print

and send him the results.

I did and there were two files of this name:
./gcc/gm2/gm2-compiler/M2Reserved.o which did NOT have the symbol _M2Reserved_NulName and
./gcc/gm2/gm2-compiler-boot/M2Reserved.o which DID have that symbol.

I'm not sure which part of the build mine got to relative to yours.

P.S.

Also, in order to get as far as I did I had to do a lot of hacking. Did you run into a lot of problems?

I had to:

1) Fuss with an undefined symbol toupper in the files in ./gcc/gm2/p2c/p2c-src/src: p2c.h and trans.h
I changed an #if 0 to an #if 1 to allow fix for BSD systems.
I also had to edit my_toupper and my_tolower so they actually did stuff rather than call _toupper, etc.


2) run ranlib by on a library file:
building gm2/ppg
ld: archive: p2c/p2c-src/src/libp2c.a has no table of contents, add one with ranlib(1) (can't load from it)


3) There was a missing directory:

cd gm2 ; \
if echo -DIN_GCC  | grep -e -DCROSS_COMPILE; then \
           AR=`echo ar | sed -e "s/^ //"` ; \
           export AR ; \
/bin/sh -c '../../../gcc-3.3.4+gm2-20041222/gcc/gm2/configure --srcdir=../../../gcc-3.3.4+gm2-20041222/gcc/gm2 --target=powerpc-apple-darwin7.8.0 --program-suffix= --includedir=/usr/include' ; \
       else \
/bin/sh -c '../../../gcc-3.3.4+gm2-20041222/gcc/gm2/configure --srcdir=../../../gcc-3.3.4+gm2-20041222/gcc/gm2 --target=powerpc-apple-darwin7.8.0 --program-suffix=' ; \
       fi
/bin/sh: line 1: cd: gm2: No such file or directory
/bin/sh: line 1: ../../../gcc-3.3.4+gm2-20041222/gcc/gm2/configure: No such file or directory
make[2]: *** [gm2/gm2config.h] Error 127
make[1]: *** [stage2_build] Error 2
make: *** [bootstrap] Error 2

I went in and created the gm2 directory in gcc in my build directory by hand.
Went further.


4) There was a missing executable somewhere
cp: stage2/gm2/cc1gm2: No such file or directory
make[2]: *** [cc1gm2] Error 1
make[1]: *** [stage2_build] Error 2
make: *** [bootstrap] Error 2

Found this in ./gcc/stage1/gm2/p2c/p2c-src/src/p2c.proto
and copied it to gcc/gm2/p2c/p2c-src/src


5) Another need to run ranlib

ld: archive: p2c/p2c-src/src/libp2c.a has no table of contents, add one with ranlib(1) (can't load from it)
failed to link gm2/ppg
make[4]: *** [gm2/ppg] Error 1
make[3]: *** [/Users/ed/gcc/obj-3.3.4+gm2-20041222/gcc/gm2/gm2-auto/P2Build.mod] Error 2
cp: stage2/gm2/cc1gm2: No such file or directory
make[2]: *** [cc1gm2] Error 1
make[1]: *** [stage2_build] Error 2
make: *** [bootstrap] Error 2

Run ranlib by hand on obj-3.3.4+gm2-20041222/gcc/gm2/p2c/p2c-src/src/libp2c.a again.


6) A missing target -liconv which turned out to be a library flag. I finally just made a bogus Makefile target.


I'm sure that there were missed opportunities in the configure stage. Unfortunately, I don't know autoconf and automake at all. If I did that would be the most effective way to help.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]