Hi,
since I'm working on some new packages for Fink that depends on gmp I've noticed that gmp's developers claim that there are quite a lot of problems in compiling that library correctly. They recommend to run "make check" after compilation and don't trust the library if it doesn't pass all checks. In particular Apple's gcc is reported to be one of the compiler that miscompiles the library.

Worried by these claims, I've tried to build gmp on my local tree to verify if the library passes the tests or not. It turns out that it doesn't! No matter which compiler's version I choose (i.e., 4.0, 3.3, 3 for both gcc and g++, [1]) 'make check" always fails at the same test. I've also tried to update gmp from version 4.1.3 (avaible on the Fink's unstable tree) to the latest upstream version (4.1.4), but the same test fails.

Here it is the meaningful part of the check process:

Making check in cxx
make  t-cast t-headers t-ostream t-locale t-constr t-expr

[snip]

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../tests -I/sw/ include -g -O2 -mpowerpc -no-cpp-precomp -mcpu=7450 -c -o t- locale.o `test -f t-locale.cc || e
cho './'`t-locale.cc
/bin/sh ../../libtool --mode=link g++ -g -O2 -mpowerpc -no-cpp- precomp -mcpu=7450 -L/sw/lib -o t-locale t-locale.o ../../tests/ libtests.la ../../libgmpxx.la
../../libgmp.la
g++ -g -O2 -mpowerpc -no-cpp-precomp -mcpu=7450 -o .libs/t-locale t- locale.o -L/sw/lib ../../tests/.libs/libtests.a ../../.libs/ libgmpxx.dylib /sw/src/fink.bui ld/gmp-4.1.4-13/gmp-4.1.4/.libs/libgmp.dylib -L/usr/lib/gcc/darwin/ 3.3 -L/usr/lib/gcc/darwin -L/usr/libexec/gcc/darwin/ppc/ 3.3/../../.. -lstdc++ -lgcc -lSystem
../../.libs/libgmp.dylib
ld: warning multiple definitions of symbol _localeconv
t-locale.o definition of _localeconv in section (__TEXT,__text)
/usr/lib/libSystem.dylib(localeconv.So) definition of _localeconv
creating t-locale

[snip]

make  check-TESTS
PASS: t-cast
PASS: t-headers
PASS: t-ostream
operator>> input error
  point  ,
  str    ,5
FAIL: t-locale
PASS: t-constr
PASS: t-expr
===================
1 of 6 tests failed
===================

I'm not a linking and library expert, so probably I'm wrong here, but it seems that the warning raised by the linker about the multiple definitions of the symbol _localeconv should be the reason of the failure. So I've started wondering whether the gmp library distributed with Fink can be trusted or not, and if not how it can be fixed.

As a final note I'd like to stress that I tried to build gmp without the --enable-cxx configure's flag and the library compile correctly and passes all the tests.

HTH,
 Andrea

[1]: In the original .info file the GCC field is set to 3.3. However SetCC and SetCXX fields are not present so the library is compiled using version 4.0 of the compiler. If the library is supposed to be compiled with gcc-3.3, those fields must be added.



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to