bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] Cannot compile gsl 1.12 on MingW?


From: Sisyphus
Subject: Re: [Bug-gsl] Cannot compile gsl 1.12 on MingW?
Date: Fri, 2 Jan 2009 13:23:11 +1100


----- Original Message ----- From: "John McCabe-Dansted" <address@hidden>
To: <address@hidden>
Sent: Thursday, January 01, 2009 9:25 PM
Subject: [Bug-gsl] Cannot compile gsl 1.12 on MingW?


Hello, I cannot compile gsl with the MingW32 cross-compiler on Ubuntu,

No problem with MinGW in the msys shell on Windows (Vista) - except that the vegas tests (in monte.c) fail. This was also the case with 1.11 (and, from memory, 1.10).

The failures are of the type '0.80002559820799102 observed vs 0.80000000000000004 expected'. Somewhere along the way, precision is not quite as expected.



libtool: link: gcc -g -O2 -o siman_tsp siman_tsp.o
./.libs/libgslsiman.a ../rng/.libs/libgslrng.a
../ieee-utils/.libs/libgslieeeutils.a ../err/.libs/libgslerr.a
../sys/.libs/libgslsys.a ../utils/.libs/libutils.a
siman_tsp.o: In function `city_distance':
/home/xp/big/pspp_root/gsl-1.12/siman/siman_tsp.c:79: undefined
reference to `sincos'
/home/xp/big/pspp_root/gsl-1.12/siman/siman_tsp.c:82: undefined
reference to `sincos'
/home/xp/big/pspp_root/gsl-1.12/siman/siman_tsp.c:82: undefined
reference to `sincos'
/home/xp/big/pspp_root/gsl-1.12/siman/siman_tsp.c:84: undefined
reference to `sincos'

Weird ... I don't see any mention of 'sincos' in siman_tsp.c (or anywhere else, for that matter).

/home/xp/big/pspp_root/gsl-1.12/siman/siman_tsp.c:98: undefined
reference to `acos'

Perhaps a need to explicitly link to libm ? (With MinGW on Windows, it's not usually necessary to specify a link to libm, but things might be different with a Ubuntu cross-compilation.)

./.libs/libgslsiman.a(siman.o): In function `boltzmann':
/home/xp/big/pspp_root/gsl-1.12/siman/siman.c:37: undefined reference to `exp'
/home/xp/big/pspp_root/gsl-1.12/siman/siman.c:37: undefined reference
to `exp'Perhaps gsl should use the
/home/xp/big/pspp_root/gsl-1.12/siman/siman.c:37: undefined reference to `exp'

Again, looks like you need the '-lm' link.

../ieee-utils/.libs/libgslieeeutils.a(fp.o): In function `gsl_ieee_set_mode':
/home/xp/big/pspp_root/gsl-1.12/ieee-utils/fp-gnuc99.c:82: undefined
reference to `fesetround'
/home/xp/big/pspp_root/gsl-1.12/ieee-utils/fp-gnuc99.c:174: undefined
reference to `feenableexcept'
/home/xp/big/pspp_root/gsl-1.12/ieee-utils/fp-gnuc99.c:61: undefined
reference to `fesetround'
/home/xp/big/pspp_root/gsl-1.12/ieee-utils/fp-gnuc99.c:75: undefined
reference to `fesetround'
/home/xp/big/pspp_root/gsl-1.12/ieee-utils/fp-gnuc99.c:68: undefined
reference to `fesetround'

For me, no attempt is made to compile fp-gnuc99.c. Presumably this is because of missing functions in MinGW's fenv.h.
(I find that 'fesetround' is in there, but not 'feenableexcept'.)

I had thought that gsl didn't support MingW, but according to
http://ascendwiki.cheme.cmu.edu/Binary_installer_for_GSL-1.11_on_MinGW
The following is sufficient to compile MingW.

./configure --enable-static=no --enable-shared=yes --prefix=/c/PROGRA~1/gsl-1.11
make
mkdir ~/temp_gsl
DESTDIR=~/temp_gsl make install

One can alternatively build a static lib instead of shared, if so desired.
The '--prefix' arg is, of course, not needed, and running 'make', 'make check' and 'make install' will suffice.
('make install' will install the library into msys's "local" directory.)

So is this a bug in GSL?

Not sure how the blame should be apportioned :-)

Cheers,
Rob




reply via email to

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