leto / math--gsl

Perl interface to the GNU Scientific Library
http://leto.net/code/Math-GSL
34 stars 25 forks source link

Installing Math::GSL on Windows 10, MSYS2 : undefined reference to `Perl_get_sv' #220

Closed hakonhagland closed 4 years ago

hakonhagland commented 4 years ago

I am trying to install Math::GSL on Windows 10 with MSYS2. When running ./Build I get the following errors:

$ ./Build
Building Math-GSL
Processing 2.6 XS files, GSL 2.6 (via gsl-config) at /home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL
Compiler        = gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ccflags         = -I/home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL/include -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -fno-strict-aliasing -fstack-protector-strong -Wall -Wno-sometimes-uninitialized -Wno-unused-function -Wno-unused-value -Wno-unused-function -Wno-unused-variable -Wno-gnu -g -fPIC -fno-omit-frame-pointer -I/home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL/include
ldflags         = -shared -L/home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL/lib -lgsl -lgslcblas -lm -fPIC -fno-omit-frame-pointer
PERL5LIB        =
LD_LIBRARY_PATH =
gcc -I/usr/lib/perl5/core_perl/CORE -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -fno-strict-aliasing -fstack-protector-strong -I/home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL/include -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -fno-strict-aliasing -fstack-protector-strong -Wall -Wno-sometimes-uninitialized -Wno-unused-function -Wno-unused-value -Wno-unused-function -Wno-unused-variable -Wno-gnu -g -fPIC -fno-omit-frame-pointer -I/home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL/include -o xs/Diff_wrap.2.6.o xs/Diff_wrap.2.6.c
gcc -o blib/arch/auto/Math/GSL/Diff/Diff.dll xs/Diff_wrap.2.6.o -shared -L/home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL/lib -lgsl -lgslcblas -lm -fPIC -fno-omit-frame-pointer
/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: xs/Diff_wrap.2.6.o: in function `SWIG_croak_null':
/home/hakon/perl/github/math--gsl--devel/Math-GSL-0.42/xs/Diff_wrap.2.6.c:1023: undefined reference to `Perl_get_sv'
/home/hakon/perl/github/math--gsl--devel/Math-GSL-0.42/xs/Diff_wrap.2.6.c:1023:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `Perl_get_sv'
/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: /home/hakon/perl/github/math--gsl--devel/Math-GSL-0.42/xs/Diff_wrap.2.6.c:1027: undefined reference to `Perl_sv_isobject'
/home/hakon/perl/github/math--gsl--devel/Math-GSL-0.42/xs/Diff_wrap.2.6.c:1027:(.text+0x111): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `Perl_sv_isobject'
/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: /home/hakon/perl/github/math--gsl--devel/Math-GSL-0.42/xs/Diff_wrap.2.6.c:1030: undefined reference to `Perl_croak_nocontext'
/home/hakon/perl/github/math--gsl--devel/Math-GSL-0.42/xs/Diff_wrap.2.6.c:1030:(.text+0x137): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `Perl_croak_nocontext'
[...]
leto commented 4 years ago

@hakonhagland seems like your Perl header files cannot be found or are not installed where it thinks they should be, and so compiling fails