Hello,
I'd like to report a configuration bug in perl. The problem arises when a 3-rd
party module tries to build an extension using perl configuration with a
gcc-specific library.
Generally perl extensions don't have a way to specify library to link with
directly, they do that through ExtUtils::MakeMaker, the standard tool for that.
Which in turn tries to resolve '-llibname' using its own
compile-time-configured internal list of lib paths. Everything works so far
libraries are found in perl's libpth (see by running 'perl -V:libpth') which is
/usr/lib on my machine. The problem arises when I need to link together with
libgomp, which is not found there, being a gcc-version-specific library.
For example, the following minimal Makefile.PL configure script
use ExtUtils::MakeMaker;
WriteMakefile(NAME => 'foo', LIBS => '-lgomp');
will emit a warning
Warning (mostly harmless): No library found for -lgomp
and removes -lgomp from the linker command, resulting in perl extension not
being able to compile.
The problem is confirmed, when, if I edit perl configuration file
/usr/lib/perl5/5.22/i686-cygwin-threads-64int/Config.pm, everything works:
ldlibpthname => 'PATH',
- libpth => '/usr/lib',
+ libpth => '/usr/lib /usr/lib/gcc/i686-pc-cygwin/5.3.0',
osname => 'cygwin',
I believe perl needs to be built with the properly set/found libpth in advance.