Discussion:
[Pdl-porters] ExtUtils::F77 patch
Craig DeForest
2013-11-17 05:50:15 UTC
Permalink
Hey, Karl,

I recently filed a bug with PDL that it wasn't installing properly under Fedora Core 19. It turns out to be a problem with ExtUtils::F77, since Fedora no longer installs .a libraries (only .so libraries) by default -- hence the library finding code was defaulting to the f2c libraries instead of detecting libgfortran.so and emitting "-lgfortran". The attached patch against ExtUtils::F77-1.17 searches for libgfortran.a and, if it is not available, also searches for libgfortran.so; it should work on systems like Fedora that now use shared libraries only by default. (The patch also bumps the version number and notates itself in CHANGES).

(At the moment the patched code works OK on MacOS with gfortran -- but one day that may break too, and the .so hack won't work -- it'll need to look for .dylib instead.)

Cheers,
Craig
Karl Glazebrook
2013-11-18 05:50:32 UTC
Permalink
Thanks for that! I will put it in the stack

- Karl
Sent from an iProduct
Post by Craig DeForest
Hey, Karl,
I recently filed a bug with PDL that it wasn't installing properly under Fedora Core 19. It turns out to be a problem with ExtUtils::F77, since Fedora no longer installs .a libraries (only .so libraries) by default -- hence the library finding code was defaulting to the f2c libraries instead of detecting libgfortran.so and emitting "-lgfortran". The attached patch against ExtUtils::F77-1.17 searches for libgfortran.a and, if it is not available, also searches for libgfortran.so; it should work on systems like Fedora that now use shared libraries only by default. (The patch also bumps the version number and notates itself in CHANGES).
(At the moment the patched code works OK on MacOS with gfortran -- but one day that may break too, and the .so hack won't work -- it'll need to look for .dylib instead.)
Cheers,
Craig
<ExtUtils-CED-patch>
Craig DeForest
2013-11-18 07:31:10 UTC
Permalink
Probably. I was looking for the path of least resistance. Anything more would wake up the overhaul demons.
Post by Craig DeForest
(At the moment the patched code works OK on MacOS with gfortran -- but one day that may break too, and the .so hack won't work -- it'll need to look for .dylib instead.)
Could you just use $Config::Config{so} to do that in a platform-independent way? That's what MakeMaker does.
Derek Lamb
2013-11-18 07:30:18 UTC
Permalink
Post by Craig DeForest
(At the moment the patched code works OK on MacOS with gfortran -- but one day that may break too, and the .so hack won't work -- it'll need to look for .dylib instead.)
Could you just use $Config::Config{so} to do that in a platform-independent way? That's what MakeMaker does.
Loading...