[plt-dev] Build problems

From: Anton Ertl (anton at mips.complang.tuwien.ac.at)
Date: Mon Nov 2 15:50:51 EST 2009

I plan to work on adding more ports to stuff like GNU Lightning using
a semi-automatic techniques, and MzScheme looks like a good testbed
for that (is it?).  The benefit for MzScheme would be that it would
get additional JIT ports.

So I first tried to build mz-4.2.2 (and then 4.2.2.4, but no change)
on an bunch of machines.  It worked nicely on a IA32 Debian Sarge
system (gcc-3.3.5), but I had trouble on the other systems.  I will
investigate these problems myself, but if this rings a bell for you, I
would be glad for a hint.  Thanks in advance,

- anton

On a PowerPC (shown here) and AMD64 system running Debian Lenny
  (gcc-4.3.2) I see:
make[7]: Entering directory `/localtmp/mz-4.2.2.4/src/build/foreign'
gcc -g -O2  -Wall  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I./../mzscheme -I../../foreign/../mzscheme/include -I../../foreign/../mzscheme/src -Igcc/libffi/include -c ../../foreign/foreign.c -o foreign.o
In file included from ../../foreign/../mzscheme/include/scheme.h:127,
                 from ../../foreign/../mzscheme/src/schpriv.h:21,
                 from ../../foreign/foreign.c:9:
/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory
In file included from /usr/include/stdio.h:75,
                 from ../../foreign/../mzscheme/include/scheme.h:127,
                 from ../../foreign/../mzscheme/src/schpriv.h:21,
                 from ../../foreign/foreign.c:9:
/usr/include/libio.h:53:21: error: stdarg.h: No such file or directory
[and lots more, probably followup errors]

Looks like the include path is broken.


On an Alpha running Debian Etch (gcc-4.1.2) I eventually see:

cd ..; gcc -o mzscheme3m  gc2/main.o libmzscheme3m.a  -ldl -lm  -ldl -lm -rdynamic 
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_mod_1':
../../../mzscheme/src/gmp/gmp.c:4444: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4444: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4469: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:4469: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:4411: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:4411: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_gcd_1':
../../../mzscheme/src/gmp/gmp.c:4507: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4507: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4528: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4528: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4516: undefined reference to `scheme_gmpn_count_leading_zeros'
libmzscheme3m.a(gmp.o):../../../mzscheme/src/gmp/gmp.c:4516: more undefined references to `scheme_gmpn_count_leading_zeros' follow
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_divrem_2':
../../../mzscheme/src/gmp/gmp.c:3710: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3710: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3674: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3674: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o): In function `__gmpn_divmod_1_internal':
../../../mzscheme/src/gmp/gmp.c:3512: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3512: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3529: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3529: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3535: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3535: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_divrem_1':
../../../mzscheme/src/gmp/gmp.c:3593: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3593: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3600: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3600: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3610: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3610: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o): In function `__gmpn_divmod_1_internal':
../../../mzscheme/src/gmp/gmp.c:3449: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3449: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3558: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3558: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3484: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3484: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3455: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o):../../../mzscheme/src/gmp/gmp.c:3455: more undefined references to `scheme_gmpn_invert_limb' follow
libmzscheme3m.a(gmp.o): In function `mpn_sb_get_str':
../../../mzscheme/src/gmp/gmp.c:1905: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:1905: undefined reference to `scheme_gmpn_count_leading_zeros'
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_sb_divrem_mn':
../../../mzscheme/src/gmp/gmp.c:3337: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3337: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3286: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:3286: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_gcd':
../../../mzscheme/src/gmp/gmp.c:4913: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4913: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4916: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4916: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:4939: undefined reference to `scheme_gmpn_count_leading_zeros'
libmzscheme3m.a(gmp.o):../../../mzscheme/src/gmp/gmp.c:4939: more undefined references to `scheme_gmpn_count_leading_zeros' follow
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_tdiv_qr':
../../../mzscheme/src/gmp/gmp.c:2757: undefined reference to `scheme_gmpn_invert_limb'
../../../mzscheme/src/gmp/gmp.c:2757: undefined reference to `scheme_gmpn_invert_limb'
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_sqrtrem':
../../../mzscheme/src/gmp/gmp.c:3064: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:3064: undefined reference to `scheme_gmpn_count_leading_zeros'
libmzscheme3m.a(gmp.o): In function `scheme_gmpn_get_str':
../../../mzscheme/src/gmp/gmp.c:2040: undefined reference to `scheme_gmpn_count_leading_zeros'
../../../mzscheme/src/gmp/gmp.c:2040: undefined reference to `scheme_gmpn_count_leading_zeros'
collect2: ld returned 1 exit status


Posted on the dev mailing list.