Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to?

by swl (Parson)
on Nov 09, 2022 at 04:23 UTC ( [id://11148057]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to?
in thread Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to?

Maybe it's a GSL version issue? What happens if you force a share install in your case 4 to ensure it upgrades?

set ALIEN_INSTALL_TYPE=share cpanm Alien::GSL

You might need to then reinstall Math::GSL:

cpanm --reinstall Math::GSL
  • Comment on Re^3: Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to?
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to?
by Anonymous Monk on Nov 09, 2022 at 10:54 UTC

    I did as you suggested, now output line is

    2.7.1 share

    However my test script still fails as "1 1 1", and Math::GSL::gsl_version still says "2.6".

    Same result with freshly unpacked "PDL edition SP 5.32.1.1", then env. variable set, then Alien::GSL and Math::GSL installed cleanly.

    For now I'll continue with non-PDL SP and just install PDL if needed. I think long habit of choosing "PDL edition" as default is from time past, when PDL installation process had issues, it isn't the case in 2022. Thanks everyone for help.

      Updated:

      However my test script still fails as "1 1 1", and Math::GSL::gsl_version still says "2.6".

      That will be because your Math::GSL was built against the static GSL libs that shipped with the "PDL edition".
      Once Math::GSL has been built against those static libs, it will continue to reference the behaviour provided by that library.
      In addition to installing the gsl-2.7.1 shared library, you will then need to rebuild (and re-install) Math::GSL against that gsl-2.7.1 shared library before you will see the correct bahaviour,

      I think long habit of choosing "PDL edition" as default is from time past, when PDL installation process had issues, it isn't the case in 2022

      I'm pretty sure the problem is with the version of the static GSL libs that ship with the "PDL edition" (in c/lib).
      It used to be the case that there were parts of Math::GSL functionality that required shared gsl libs, not static libs - though I think the problem your facing is probably just that there's a bug in version 2.6.
      I don't know if that reliance on a shared gsl library is still present with Math::GSL. IIRC, it was not something that could be fixed trivially, so perhaps it's still an issue.

      In any case, I agree that the best and easiest solution is to use the non-PDL edition if you wish to also use Math::GSL, assuming that works for you.
      It didn't actually work for me. Running cpanm -i Alien::GSL seemed to go fine, but cpanm -i Math::GSL croaked with:
      Running Build.PL Checking for GSL using gsl-config 'gsl-config' is not recognized as an internal or external command, operable program or batch file. 'gsl-config' is not recognized as an internal or external command, operable program or batch file. 'gsl-config' is not recognized as an internal or external command, operable program or batch file. 'gsl-config' is not recognized as an internal or external command, operable program or batch file.
      I probably just need to set some environment variable(s) appropriately, but these days I quickly lose interest in messing about when Module::Build and "Alien" libraries are involved.

      Cheers,
      Rob

        gsl-config is a bourne shell script so does not work under windows. It seems Strawberry Perl distributes a simple batch script that does the same task (gsl-config.bat), which is why Math::GSL builds against it.

        The build script for Math::GSL also looks for a pkg-config file but the alien's pkgconf dir needs to be in $ENV{PKG_CONFIG_PATH}.

        I assume this is all because the Math::GSL build script pre-dates the Alien ecosystem. It hand rolls much of the functionality the alien provides to find cflags, lib dirs and the like. Currently it just appends the Alien's bin dir to $ENV{PATH} when it is a share install (which also means the Alien will be ignored if there is another GSL install earlier in the path), and does not update $ENV{PKG_CONFIG_PATH} on Windows. Ideally it could be updated to use Alien::GSL directly.

        After adding the Alien::GSL pkgconfig dir to $ENV{PKG_CONFIG_PATH} the Build.PL script still uses the gsl-config.bat script first. Moving that out of the way and rerunning seems to work, except it then warns:

        Unsupported GSL version!!! : 2.7.1 at Build.PL line 85.

        So it looks like Math::GSL is not yet set up to work with GSL 2.7, or perhaps it is too conservative in the versions it permits. The list of currently supported versions is here, and I do see a number of 2.7 related issues on the GitHub issue tracker.

        This is about as far as I can get at the moment. I would suggest the OP file a bug report on the github issue tracker.

        assuming that works for you

        ouch... Shame on me to check this too late, but my test case (2) (i.e. install Math::GSL on non-PDL 5.32 SP) only "works" because there was 5.26 PDL-SP "installed" (i.e. system PATH modified) long time ago on test computer. Now I ran portableshell.bat with different portable perls, which just push their paths onto system PATH. Alien::GSL->version says 2.7.1 (shared), but Math::GSL::gsl_version says 2.3 i.e. it finds static lib from PDL-SP 5.26. If I fix the PATH, then installing Math::GSL fails for me, too.

        I think I'll write to Math::GSL queue. Looking at tester report, there's 1.07 Alien::GSL mentioned, but also 2.6 GSL, not 2.7. Which suggests they use "PDL edition"? Something is definitely messed up.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148057]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-25 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found