Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #34039] Build failure on freebsd 4.9-RELEASE (mpz_*)

12 views
Skip to first unread message

Will Coleda

unread,
Feb 3, 2005, 8:03:47 PM2/3/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Will Coleda
# Please include the string: [perl #34039]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34039 >


bash-2.05b$ gmake
Compiling with:
xx.c
cc -DAPPLLIB_EXP=/usr/local/lib/perl5/5.6.1/BSDPAN -I/usr/local/include -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -Winline -W -Wno-unused -Wsign-compare -I./include -I./blib/include -DHAS_JIT -DI386 -DHAVE_COMPUTED_GOTO -I. -o xx.o -c xx.c
g++ -o parrot -Wl,-E -L/usr/local/lib -g imcc/main.o blib/lib/libparrot.a blib/lib/libicuuc.a blib/lib/libicudata.a -lm -lcrypt -lutil -pthread -lgmp
blib/lib/libparrot.a(bigint.o): In function `bigint_get_long':
/home/coke/research/parrot/classes/bigint.c:83: undefined reference to `mpz_fits_slong_p'
blib/lib/libparrot.a(bigint.o): In function `bigint_div_bigint':
/home/coke/research/parrot/classes/bigint.c:157: undefined reference to `mpz_fits_slong_p'
blib/lib/libparrot.a(bigint.o): In function `bigint_div_bigint_int':
/home/coke/research/parrot/classes/bigint.c:169: undefined reference to `mpz_fits_slong_p'
blib/lib/libparrot.a(bigint.o): In function `bigint_fdiv_bigint':
/home/coke/research/parrot/classes/bigint.c:181: undefined reference to `mpz_fits_slong_p'
blib/lib/libparrot.a(bigint.o): In function `bigint_fdiv_bigint_int':
/home/coke/research/parrot/classes/bigint.c:193: undefined reference to `mpz_fits_slong_p'
blib/lib/libparrot.a(bigint.o):/home/coke/research/parrot/classes/bigint.c:204: more undefined references to `mpz_fits_slong_p' follow

bash-2.05b$ perl -v

This is perl, v5.6.1 built for i386-freebsd

Adriano Ferreira

unread,
Feb 4, 2005, 7:41:47 AM2/4/05
to perl6-i...@perl.org
Hey, I've already seen that one. You need to install GNU MP (The GNU
Multiple Precision Arithmetic Library) in FreeBSD (at least 4.10)
before this succeeding.

The usual installation mantra in FreeBSD should do it:

# cd /usr/ports
# make search name=libgmp

# cd (whatever adequate path the search found for you)
# make
# make install

Regards,
Adriano.

Will Coleda

unread,
Feb 4, 2005, 7:49:05 AM2/4/05
to Adriano Ferreira, perl6-i...@perl.org
Adriano Ferreira writes:

> Hey, I've already seen that one. You need to install GNU MP (The GNU
> Multiple Precision Arithmetic Library) in FreeBSD (at least 4.10)
> before this succeeding.
>

While that may fix the symptom, it doesn't fix the problem - the Configure
step needs to be smart enough to detect that I don't have this installed and
let me get by without it.

Unless we are requiring an arbitrary precision library for parrot, but I was
under the impression it was optional.


Leopold Toetsch

unread,
Feb 4, 2005, 4:14:43 AM2/4/05
to perl6-i...@perl.org
Will Coleda <parrotbug...@parrotcode.org> wrote:
> .../classes/bigint.c:83: undefined reference to `mpz_fits_slong_p'

Too old GMP library? We need a better test that covers these problematic
functions.

leo

Adriano Ferreira

unread,
Feb 9, 2005, 10:08:41 PM2/9/05
to perl6-i...@perl.org
After a little research I have found why Configure.pl succeeds while
determining if some FreeBSDs (like 4.9, 4.10) supports GMP and why
compilation fails in the same systems complaining about undefined
references to `mpz_fits_slong_p'.

The test about GMP support is at:
config/auto/gmp.pl
config/auto/gmp/gmp.in

The point is that the so-called mpz_fits_* functions were defined back
in 2004-04-07 according to the GMP ChangeLog file and that corresponds
to version 3.0. In a FreeBSD 4.10 box I have found a "gmp.h" at
"/usr/include" which corresponds to version 2.0 and does not have
mpz_fits_* functions. Configure.pl succeeds because the test don't use
these and compilation fails when the class 'bigint' uses
'mpz_fits_slong_p'.

When I proceeded to install GMP as I told Will Coleda before, a more
recent GMP was installed (actually 4.1.2 in this machine). Compilation
now succeds. But as Will have said, Configure.pl is still broken.

At this point, I should submit a patch, but I don't know the kind of
changes that would be more appropriate. Maybe a conditional
#if __GNU_MP_VERSION>3
Maybe just an addition to the probing files.

The attached patch does only the later. In config/auto/gmp/gmp.in the
problematic function is used and its answer reaches STDOUT too. Then
config/auto/gmp.pl tests for the extended expected output.

Regards,
Adriano.

gmp.diff

Leopold Toetsch

unread,
Feb 14, 2005, 6:34:37 AM2/14/05
to Adriano Ferreira, perl6-i...@perl.org
Adriano Ferreira <a.r.fe...@gmail.com> wrote:
> The attached patch does only the later. In config/auto/gmp/gmp.in the
> problematic function is used and its answer reaches STDOUT too. Then
> config/auto/gmp.pl tests for the extended expected output.

Thanks, applied.
leo

0 new messages