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

In reply to Re^5: Math::GSL::SparseMatrix is broken if installed on latest 5.32.1.1 "Strawberry Perl PDL edition", whom to report this issue to? by syphilis
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? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.