Oh, perhaps modify the LDFLAGS to link by specifying the specific library version, for example, -lgsl26 (instead of -lgsl which links to the libgsl.so which is usually a (file)link to libgsl.XX.so. Just make sure when you install the gsl26 devel+libraries, there is a file libgsl26.so somewhere. So, don't change the (file)link libgsl.so to point to libgsl26.so but change the LDFLAGS in the Makefile.PL to link to -lgsl26. I think that would be a good solution.
Alternatively, and I am not sure if this is a good advice, perhaps you can statically link to the GSL library during building the XS part of the distribution. This can be achieved by replacing (in the LDFLAGS) the dynamic link call (-lgsl, whatever it is) with the full path to the static library, e.g. /x/y/z/gsl2.6.a, as if you would do with an object file you wanted linked.
Avoid changing the LD_LIBRARY_PATH because then you will need to keep it modified during running your app too (and not only during compilation). And for all users ... a mess.
And a side point, make sure that the include path points to the GSL2.6 include files and not the current GSL include files. E.g. with #include <gsl/xyz.h> and -I/usr/include in the CFLAGS will probably include the files of the newest GSL distribution! Not what you want. So, you will need to check the CFLAGS for -I paths. While lib files have their version in the name, include dirs may not. If you installed a different devel version, it could have overwritten the include files of the current distribution. Perhaps your older version should be installed in /usr/local, then your CFLAGS should have -I/usr/local -I/usr/include (i.e. the local should preceed the standard include path). And here make sure you are including the right files! (or perhaps Makefile.PL will tell you so).
bw, bliako
In reply to Re: Math::GSL Install Fail
by bliako
in thread Math::GSL Install Fail
by SifuSteve
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |