trouble with installing Math::GSL on Windows XP

117 views
Skip to first unread message

Barnabas

unread,
May 25, 2010, 3:36:09 PM5/25/10
to math-gsl-dev
Hi, I'm new at installing Perl programming libraries, a little
familiar with Linux and Unix, and a little more
familiar with setting up Windows XP for programming. I want to use
CPAN’s complex math libraries (constants,
complex numbers,vectors, and matricies) in Math::GSL for a Perl
program that I've written. Can you help me
figure out I'm missing to complete the installation of this library?

>

> I’m enclosing the output in a MS-Dos command window when I try to
> install the library that I need. I’m running Strawberry Perl 5.10.1.1
> on Windows XP for automatically updating the libraries from CPAN.
>
>
> c:\>CPAN Math::GSL
>
> CPAN: CPAN::SQLite loaded ok (v0.199)
>
> Database was generated on Fri, 07 May 2010 15:49:42 GMT
>
> Running install for module 'Math::GSL'
>
> CPAN: YAML loaded ok (v0.71)
>
> Running make for L/LE/LETO/Math-GSL-0.20.tar.gz
>
> CPAN: Digest::SHA loaded ok (v5.48)
>
> CPAN: Compress::Zlib loaded ok (v2.024)
>
> Checksum for
> C:\strawberry\cpan\sources\authors\id\L\LE\LETO\Math-GSL-0.20.tar.g
>
> z ok
>
> CPAN: Archive::Tar loaded ok (v1.54)
>
> CPAN: File::Temp loaded ok (v0.22)
>
> CPAN: Module::CoreList loaded ok (v2.25)
>
> CPAN: Module::Build loaded ok (v0.3603)
>
>
>
> CPAN.pm: Going to build L/LE/LETO/Math-GSL-0.20.tar.gz
>
>
>
> Checking for GSL..Package gsl was not found in the pkg-config search path.
>
> Perhaps you should add the directory containing `gsl.pc'
>
> to the PKG_CONFIG_PATH environment variable
>
> No package 'gsl' found
>
> at Build.PL line 108
>
> *** can not find package gsl
>
> *** check that it is properly installed and available in
> PKG_CONFIG_PATH
>
> at Build.PL line 108
>
> Warning: No success on command[C:\strawberry\perl\bin\perl.exe
> Build.PL ]
>
> LETO/Math-GSL-0.20.tar.gz
>
> C:\strawberry\perl\bin\perl.exe Build.PL -- NOT OK
>
> Running Build test
>
> Make had some problems, won't test
>
> Running Build install
>
> Make had some problems, won't install
>
>
>
I've downloaded and extracted pre-compiled versions of pkg-
config_0.23-3_win32.zip, and I set the system environment variable
PKG_CONFIG_PATH to its root directory on the C: drive. I've
downloaded and extracted a pre-compiled version of gsl-1.8-win.zip as
C code in the pkg-config folder, and I renamed the file gsl.pc.in as
gsl.pc and placed it in the pkg-config root directory. I assigned the
user environment variable
GSL_DIR to the directory where gsl.pc is located. I also downloaded
and extracted pre-compiled mingw32 files and installed them in the
same pkg-config directory.

From CPAN, using Strawberry Perl, I've already downloaded
ExtUtils::PkgConfig, Module::Build, and Math::GSL. It seems to be
installing Math-GSL v0.2. I can't seem to figure out what I'm missing.
Could you please direct me to what I should try next?

Sisyphus

unread,
May 25, 2010, 7:34:20 PM5/25/10
to math-g...@googlegroups.com

----- Original Message -----
From: "Barnabas" <jeff...@gmail.com>
To: "math-gsl-dev" <math-g...@googlegroups.com>
Sent: Wednesday, May 26, 2010 5:36 AM
Subject: trouble with installing Math::GSL on Windows XP


> Hi, I'm new at installing Perl programming libraries, a little
> familiar with Linux and Unix, and a little more
> familiar with setting up Windows XP for programming. I want to use

> CPAN�s complex math libraries (constants,


> complex numbers,vectors, and matricies) in Math::GSL for a Perl
> program that I've written. Can you help me
> figure out I'm missing to complete the installation of this library?
>
>>
>

>> I�m enclosing the output in a MS-Dos command window when I try to
>> install the library that I need. I�m running Strawberry Perl 5.10.1.1


>> on Windows XP for automatically updating the libraries from CPAN.
>>
>>
>> c:\>CPAN Math::GSL
>>
>> CPAN: CPAN::SQLite loaded ok (v0.199)
>>
>> Database was generated on Fri, 07 May 2010 15:49:42 GMT
>>
>> Running install for module 'Math::GSL'
>>
>> CPAN: YAML loaded ok (v0.71)
>>
>> Running make for L/LE/LETO/Math-GSL-0.20.tar.gz
>>
>> CPAN: Digest::SHA loaded ok (v5.48)
>>
>> CPAN: Compress::Zlib loaded ok (v2.024)
>>
>> Checksum for
>> C:\strawberry\cpan\sources\authors\id\L\LE\LETO\Math-GSL-0.20.tar.g
>>
>> z ok
>>
>> CPAN: Archive::Tar loaded ok (v1.54)
>>
>> CPAN: File::Temp loaded ok (v0.22)
>>
>> CPAN: Module::CoreList loaded ok (v2.25)
>>
>> CPAN: Module::Build loaded ok (v0.3603)
>>
>>
>>
>> CPAN.pm: Going to build L/LE/LETO/Math-GSL-0.20.tar.gz
>>
>>
>>
>> Checking for GSL..Package gsl was not found in the pkg-config search
>> path.
>>
>> Perhaps you should add the directory containing `gsl.pc'
>>
>> to the PKG_CONFIG_PATH environment variable
>>

What does the command 'set PKG_CONFIG_PATH' output ?
What is the full path to gsl.pc ?
Could you please post the contents of gsl.pc.

Cheers,
Rob

Barnabas

unread,
May 27, 2010, 3:09:11 PM5/27/10
to math-gsl-dev
Hi Rob,

Here are what you asked for:

C:\Documents and Settings\jhazen>set PKG_CONFIG_PATH
PKG_CONFIG_PATH=C:\Documents and Settings\jhazen\My Documents\Programs
\PkgConfig
\bin\pkg-config.sh; C:\Documents and Settings\jhazen\My Documents
\Programs\PkgCo
nfig\

path to gsl.pc: C:\Documents and Settings\jhazen\My Documents\Programs
\PkgConfig

gsl.pc:

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: GSL
Description: GNU Scientific Library
Version: @VERSION@
Libs: @GSL_LIBS@ -lgslcblas @LIBS@
Cflags: @GSL_CFLAGS@


Thanks,
Jeff


On May 25, 7:34 pm, "Sisyphus" <sisyph...@optusnet.com.au> wrote:
> ----- Original Message -----
> From: "Barnabas" <jeffha...@gmail.com>
> To: "math-gsl-dev" <math-g...@googlegroups.com>
> Sent: Wednesday, May 26, 2010 5:36 AM
> Subject: trouble with installing Math::GSL on Windows XP
>
> > Hi, I'm new at installing Perl programming libraries, a little
> > familiar with Linux and Unix, and a little more
> > familiar with setting up Windows XP for programming.  I want to use

> > CPAN s complex math libraries (constants,


> > complex numbers,vectors, and matricies) in Math::GSL for a Perl
> > program that I've written.  Can you help me
> > figure out I'm missing to complete the installation of this library?
>

> >> I m enclosing the output in a MS-Dos command window when I try to
> >> install the library that I need.  I m running Strawberry Perl 5.10.1.1

> Rob- Hide quoted text -
>
> - Show quoted text -

Sisyphus

unread,
May 27, 2010, 7:44:12 PM5/27/10
to math-g...@googlegroups.com

----- Original Message -----
From: "Barnabas" <jeff...@gmail.com>
To: "math-gsl-dev" <math-g...@googlegroups.com>
Sent: Friday, May 28, 2010 5:09 AM
Subject: Re: trouble with installing Math::GSL on Windows XP


> Hi Rob,
>
> Here are what you asked for:
>
> C:\Documents and Settings\jhazen>set PKG_CONFIG_PATH
> PKG_CONFIG_PATH=C:\Documents and Settings\jhazen\My Documents\Programs
> \PkgConfig
> \bin\pkg-config.sh; C:\Documents and Settings\jhazen\My Documents
> \Programs\PkgCo
> nfig\
>
> path to gsl.pc: C:\Documents and Settings\jhazen\My Documents\Programs
> \PkgConfig

It may be that the spaces in the path are confusing the process - as often
happens.

First off I'd get the short pathname of that location:

perl -MWin32 -e "print Win32::GetShortPathName(' C:\Documents and
Settings\jhazen\My Documents\Programs\PkgConfig')"

Then set PKG_CONFIG_PATH to that location.

It might also work if you put the path in double quotes - that is:

set PKG_CONFIG_PATH="C:\Documents and Settings\jhazen\My
Documents\Programs\PkgConfig"

If neither of those work, then we might have to amend the pc file.

> gsl.pc:
>
> prefix=@prefix@
> exec_prefix=@exec_prefix@
> libdir=@libdir@
> includedir=@includedir@
>
> Name: GSL
> Description: GNU Scientific Library
> Version: @VERSION@
> Libs: @GSL_LIBS@ -lgslcblas @LIBS@
> Cflags: @GSL_CFLAGS@

Mine looks like this:

prefix=/c/_32/gsl_dyn
exec_prefix=/c/_32/gsl_dyn
libdir=/c/_32/gsl_dyn/lib
includedir=/c/_32/gsl_dyn/include

Name: GSL
Description: GNU Scientific Library

Version: 1.14
Libs: -L/c/_32/gsl_dyn/lib -lgsl -lgslcblas -lm
Cflags: -I/c/_32/gsl_dyn/include

That was created when I built the GSL library (in the MSYS shell) - hence
the odd looking paths. '/c/_32/gsl_dyn' is actually 'C:\_32\gsl_dyn' (which
is the root directory of my gsl-0.14 installation). There won't be any
problem with the forward slashes, but I'm not sure that the '/c' will be
understood correctly by the build process - so I doubt there's much
importance in much of what's in that file. Perhaps it's just the
'-lgsl -lgslcblas -lm' that needs to be found. Anyway, it gives me no
trouble, so you could amend yours along the same lines if you get stuck.
(Again, make sure you use the *short* pathnames to avoid those spaces.)

You'll probably strike test failures at the 'dmake test' stage. I have
version 0.20 of Math::GSL installed - though I think there were a couple of
test failures with it. So you'll probably have to 'cpan -fi Math::GSL' to
get it installed. I'm not sure of the last version that built and tested
without any errors ... 0.16, perhaps.

Finally, there's a ppm package you could install with:

ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/Math-GSL.ppd

That would give you Math-GSL-0.14. If you decide to use that option, you'll
be prompted to install the dll's it was built against - probably best to
accept the offer and hide the dll's you've already downloaded.

Cheers,
Rob

Barnabas

unread,
Jun 30, 2010, 4:51:24 PM6/30/10
to math-gsl-dev
Hi,

It's taken me a while to get around to finishing this program. I was
able to do the ppm install; however, I need other sub modules of the
Math::GSL, like VectorComplex and MatrixComplex. When I try to CPAN
these modules, it still asks for the gsl.pc file.

I can't get short pathnames, probably because I don't have MWIN32 or
MSYS. I downloaded MingW32, and extracted the files, but I'm not sure
how to use them.

Thanks,
Jeff
> ppm installhttp://cpan.uwinnipeg.ca/PPMPackages/10xx/Math-GSL.ppd
>
> That would give you Math-GSL-0.14. If you decide to use that option, you'll
> be prompted to install the dll's it was built against - probably best to
> accept the offer and hide the dll's you've already downloaded.
>
> Cheers,

Barnabas

unread,
Aug 24, 2010, 2:43:04 PM8/24/10
to math-gsl-dev
Unfortunately, this problem is still not solved. I've been working on
other things for most of the past couple months, but I now need to
come back to this. Here's what I get when I try to build Math::GSL.

Building Math-GSL
In file included from C:/Perl/lib/CORE/sys/socket.h:32,
from C:/Perl/lib/CORE/win32.h:388,
from C:/Perl/lib/CORE/win32thread.h:4,
from C:/Perl/lib/CORE/perl.h:2817,
from xs\BLAS_wrap.c:731:
C:/Perl/lib/CORE/win32.h:393:26: warning: "/*" within comment
C:/Perl/lib/CORE/win32.h:394:33: warning: "/*" within comment
In file included from C:/Perl/lib/CORE/win32thread.h:4,
from C:/Perl/lib/CORE/perl.h:2817,
from xs\BLAS_wrap.c:731:
C:/Perl/lib/CORE/win32.h:393:26: warning: "/*" within comment
C:/Perl/lib/CORE/win32.h:394:33: warning: "/*" within comment
xs\BLAS_wrap.c:1560:29: gsl/gsl_nan.h: No such file or directory
xs\BLAS_wrap.c:1561:30: gsl/gsl_math.h: No such file or directory
xs\BLAS_wrap.c:1562:31: gsl/gsl_monte.h: No such file or directory

GSL_DIR points to C:\Documents and Settings\jhazen\My Documents
\Programs\PkgConfig\ . Path points to C:\DOCUME~1\jhazen
\MYDOCU~1\Programs\PKGCON~1\bin . The files needed (gsl_nan.h,
gsl_math.h, and gsl_monte.h) are in the GSL_DIR\gsl\ , and the GSL_DIR
contains gsl.pc.

Any ideas on what is the problem?

Regards,
Jeff
> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages