-
Notifications
You must be signed in to change notification settings - Fork 81
Description
I believe there has been a serious regression in ExtUtils::Liblist->ext() between 7.70 in perl 5.40 and 7.76 in perl 5.42.
I note that the Win32 Implementation section of the manpage says, "the libraries specified by $Config{perllibs} (see Config.pm) will be appended to the list of $potential_libs. The libraries will be searched for in the directories specified in $potential_libs, $Config{libpth}, and in $Config{installarchlib}/CORE. For each library that is found, a space-separated list of fully qualified library pathnames is generated."
I have perl 5.40 built with VS2022 and the following relevant configuration options:
>perl -V:perllibs
perllibs='oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib';
>perl -V:libpth
libpth='"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\\lib\x64"';
When I run a one-liner to get the libs for linking C:\Apache24\lib\httpd.lib I get the output I expect given the above information:
>perl -MExtUtils::Liblist -e "print +(ExtUtils::Liblist->ext('-LC:\\Apache24\\lib libhttpd.lib'))[0];"
"C:\Apache24\lib\libhttpd.lib" "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\\lib\x64\oldnames.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\kernel32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\user32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\gdi32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\winspool.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\comdlg32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\advapi32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\shell32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\ole32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\oleaut32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\netapi32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\uuid.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\ws2_32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\mpr.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\winmm.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\version.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\odbc32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\odbccp32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.26100.0\\um\x64\comctl32.lib" "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\\lib\x64\msvcrt.lib" "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\\lib\x64\vcruntime.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\ucrt\x64\ucrt.lib"
However, when I repeat the same test with perl 5.42, built with the same VS2022 with the same (default) options, which has the same output as above for "perl -V:perllibs" and "perl -V:libpth", I only get this output, which is breaking builds for me because required libraries are no longer being linked in:
>perl -MExtUtils::Liblist -e "print +(ExtUtils::Liblist->ext('-LC:\\Apache24\\lib libhttpd.lib'))[0];"
"C:\Apache24\lib\libhttpd.lib"