in reply to Re: Building Math-GSL-0.07 on Win32 (MinGW compiler)
in thread Building Math-GSL-0.07 on Win32 (MinGW compiler)
First thing to notice is that the command attempts to build a dynamic library with a '.so' extension on Win32. I dunno how that's going to be received further down the track ... though there's no reason I know of that specifying a dll with a .so extension should cause the command to fail. But if we want to resolve perl symbols, don't we need to link to either libperl58.a or perl58.dll ?gcc -o blib\arch\BLAS.so BLAS_wrap.o -shared -I./lib -I../lib -LC:/_32 +/msys/1.0/local/lib -lgsl -lgslcblas -lm -gsl BLAS_wrap.o:BLAS_wrap.c:(.text+0xb42): undefined reference to `Perl_ge +t_context' BLAS_wrap.o:BLAS_wrap.c:(.text+0xb53): undefined reference to `Perl_mg +_get' BLAS_wrap.o:BLAS_wrap.c:(.text+0xb58): undefined reference to `Perl_ge +t_context' BLAS_wrap.o:BLAS_wrap.c:(.text+0xb67): undefined reference to `Perl_sv +_isobject' . .
Except that when that command runs on the linux box, it works fine. There are no "undefined reference" errors in relation to any symbols at all. What gives ?gcc -o blib\arch\BLAS.so BLAS_wrap.o -shared -I./lib -I../lib -L/usr/l +ocal/lib -lgsl -lgslcblas -lm -gsl
Now I'm facing just 8 unresolved symbols (regarding long doubles) - which might be a bug in the building of the gsl-1.11 library. I'll investigate when I have time. The bug report is here.--- Build.PL_orig Sun Aug 3 18:20:42 2008 +++ Build.PL Sun Aug 3 18:03:27 2008 @@ -131,13 +131,14 @@ my ($self, $to, $file_base, $obj_file) = @_; my ($cf, $p) = ($self->{config}, $self->{properties}); # For conven +ience - my $lib_file = catfile($to, File::Basename::basename("$file_base.so +")); + my $lib_file = catfile($to, File::Basename::basename("$file_base.$C +onfig{dlext}")); $self->add_to_cleanup($lib_file); my $objects = $p->{objects} || []; unless ($self->up_to_date([$obj_file, @$objects], $lib_file)) { my @linker_flags = $self->split_like_shell($p->{extra_linker_flag +s}); + push @linker_flags, $Config{archlib} . '/CORE/' . $Config{libperl +} if $^O =~ /MSWin32/i; my @lddlflags = $self->split_like_shell($cf->{lddlflags}); my @shrp = $self->split_like_shell($cf->{shrpenv}); my @ld = $self->split_like_shell($cf->{ld}) || "gcc";
|
---|