reinh-bader / fgsl

Fortran interface to the GNU Scientific Library

Home Page:https://doku.lrz.de/display/PUBLIC/FGSL+-+A+Fortran+interface+to+the+GNU+Scientific+Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linking problems against GSL 2.6 on Windows

tschoonj opened this issue · comments

It would appear that gsl_spmatrix_compare_idx was removed in 2.6, which is causing linker trouble on Windows.

/bin/sh ./libtool  --tag=FC   --mode=compile gfortran -DHAVE_CONFIG_H -I.  -I. -I.   -g -O2 -c -o fgsl.lo fgsl.F90
libtool: compile:  gfortran -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c fgsl.F90  -DDLL_EXPORT -o .libs/fgsl.o
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I. -I.   -g -O2 -MT libfgsl_la-fgsl_utils.lo -MD -MP -MF .deps/libfgsl_la-fgsl_utils.Tpo -c -o libfgsl_la-fgsl_utils.lo `test -f 'fgsl_utils.c' || echo './'`fgsl_utils.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT libfgsl_la-fgsl_utils.lo -MD -MP -MF .deps/libfgsl_la-fgsl_utils.Tpo -c fgsl_utils.c  -DDLL_EXPORT -DPIC -o .libs/libfgsl_la-fgsl_utils.o
mv -f .deps/libfgsl_la-fgsl_utils.Tpo .deps/libfgsl_la-fgsl_utils.Plo
/bin/sh ./libtool  --tag=FC   --mode=link gfortran  -g -O2 -version-info 1:0:0 -no-undefined  -o libfgsl.la -rpath /home/VssAdministrator/install/lib fgsl.lo libfgsl_la-fgsl_utils.lo  -lgsl -lgslcblas -lm 
libtool: link: gfortran -shared  .libs/fgsl.o .libs/libfgsl_la-fgsl_utils.o   -lgsl -lgslcblas  -O2   -o .libs/libfgsl-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libfgsl.dll.a
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/fgsl.o: in function `__fgsl_MOD_fgsl_spmatrix_compare_idx':
D:\a\1\s\fgsl-1.1.0/api/spmatrix.finc:42: undefined reference to `gsl_spmatrix_compare_idx'
collect2.exe: error: ld returned 1 exit status

Yes, from the GSL release notes I saw some removals. However, the current release only accounts for those up to version 2.4. I'll update the ticket when I get to 2.6 support.

Just to mention that on linux I had the same problem with missing gsl_spmatrix_compare_idx with GSL 2.6 (I compiled fgsl myself from present git sources). I downgraded GSL to 2.5 and my programs compile ok now.

@tschoonj with the 1.4.0 branch created the CI builds fail again.
Some for good reason (GSL 2.4 should be removed), but builds against GSL 2.5 should run OK.

2.6 will also fail at the current stage, but these are marked "allowed failures" anyway.

Resolved with the 1.4.0 release. Note that the minimum version of GSL to use is 2.5.

Closing the issue.