New MLton distribution...

Stephen Weeks sweeks@intertrust.com
Mon, 10 Jul 2000 12:08:49 -0700 (PDT)


> The missing things (__mpn_addmul_1 and __mpn_sub_n) is from the GNU MP library.
> This library gets built as part of the standard MLton build on Linux.  I don't
> know how this would fail.  Is this under Linux (I would guess from the
> mention of glibc that it is.)  Did the link include libgmp.a?

I think he was running a make from with the src directory, so yes.

I ran a make on that distro and observed exactly the same problem.
The errors aren't on the strip command, though.  They are when doing
the following.

lib% gcc -o mlton ../src/mlton.o libmlton.a libgmp.a -lm
libmlton.a(int-inf.o): In function `MLTON_do_quot':
int-inf.o(.text+0xfec): undefined reference to `__mpn_lshift'
int-inf.o(.text+0x1049): undefined reference to `__mpn_lshift'
libmlton.a(int-inf.o): In function `MLTON_do_rem':
int-inf.o(.text+0x1401): undefined reference to `__mpn_lshift'
int-inf.o(.text+0x1466): undefined reference to `__mpn_lshift'
int-inf.o(.text+0x14cd): undefined reference to `__mpn_rshift'
libgmp.a(divrem.o): In function `__mpn_divrem':
divrem.o(.text+0x25b): undefined reference to `__mpn_sub_n'
divrem.o(.text+0x329): undefined reference to `__mpn_submul_1'
divrem.o(.text+0x342): undefined reference to `__mpn_add_n'
libgmp.a(set_str.o): In function `__mpn_set_str':
set_str.o(.text+0x15e): undefined reference to `__mpn_mul_1'
set_str.o(.text+0x2de): undefined reference to `__mpn_mul_1'
libgmp.a(add.o): In function `mpz_add':
add.o(.text+0x9e): undefined reference to `__mpn_sub_n'
add.o(.text+0x14a): undefined reference to `__mpn_sub_n'
add.o(.text+0x17e): undefined reference to `__mpn_sub_n'
add.o(.text+0x1bb): undefined reference to `__mpn_add_n'
libgmp.a(sub.o): In function `mpz_sub':
sub.o(.text+0xa0): undefined reference to `__mpn_sub_n'
sub.o(.text+0x14a): undefined reference to `__mpn_sub_n'
sub.o(.text+0x17e): undefined reference to `__mpn_sub_n'
sub.o(.text+0x1bb): undefined reference to `__mpn_add_n'
libgmp.a(mul.o): In function `__mpn_mul':
mul.o(.text+0x7c): undefined reference to `__mpn_mul_1'
mul.o(.text+0xbd): undefined reference to `__mpn_add_n'
mul.o(.text+0xce): undefined reference to `__mpn_addmul_1'
mul.o(.text+0x18d): undefined reference to `__mpn_add_n'
mul.o(.text+0x267): undefined reference to `__mpn_add_n'
libgmp.a(mul_n.o): In function `__mpn_impn_mul_n_basecase':
mul_n.o(.text+0x4e): undefined reference to `__mpn_mul_1'
mul_n.o(.text+0x7e): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x8c): undefined reference to `__mpn_addmul_1'
libgmp.a(mul_n.o): In function `__mpn_impn_mul_n':
mul_n.o(.text+0xf3): undefined reference to `__mpn_addmul_1'
mul_n.o(.text+0x10c): undefined reference to `__mpn_addmul_1'
mul_n.o(.text+0x1b3): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x1ce): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x207): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x23f): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x2c2): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x2e2): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x318): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x357): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x405): undefined reference to `__mpn_add_n'
libgmp.a(mul_n.o): In function `__mpn_impn_sqr_n_basecase':
mul_n.o(.text+0x4c8): undefined reference to `__mpn_mul_1'
mul_n.o(.text+0x4f7): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x508): undefined reference to `__mpn_addmul_1'
libgmp.a(mul_n.o): In function `__mpn_impn_sqr_n':
mul_n.o(.text+0x566): undefined reference to `__mpn_addmul_1'
mul_n.o(.text+0x57c): undefined reference to `__mpn_addmul_1'
mul_n.o(.text+0x64e): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x6cd): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x6df): undefined reference to `__mpn_sub_n'
mul_n.o(.text+0x721): undefined reference to `__mpn_add_n'
mul_n.o(.text+0x7d5): undefined reference to `__mpn_add_n'
collect2: ld returned 1 exit status