fix: restore perllibs in Win32 ext(); use :nodefault for multi-LIBS probe#482
Draft
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:masterfrom
Draft
fix: restore perllibs in Win32 ext(); use :nodefault for multi-LIBS probe#482Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:masterfrom
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:masterfrom
Conversation
…S probe e04e45f removed perllibs injection from _win32_make_lib_search_list() to fix false positives in multi-LIBS scenarios (RT-53676), moving the perllibs injection to MM_Win32::init_others(). This broke all direct callers of ExtUtils::Liblist->ext() (e.g. ExtUtils::Embed::ldopts(), mod_perl2, PAR::Packer) which no longer received perllibs in the returned lib list, causing link failures on Windows. Fix: restore perllibs injection in _win32_make_lib_search_list() (respecting the existing :nodefault flag), preserving the public API contract of ext(). To keep RT-53676 fixed, MM_Win32::init_others() now wraps the SUPER::init_others call (which does the multi-LIBS selection loop) with a localized LIBS that has ':nodefault' appended to each entry. This prevents perllibs from making a failing LIBS probe appear to succeed, so fallback to later LIBS entries still works correctly. The perllibs extliblist() call in init_others also uses ':nodefault' to avoid perllibs referencing themselves. Fixes Perl-Toolchain-Gang#478
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commit e04e45f removed perllibs injection from
_win32_make_lib_search_list()to fix false positives in multi-LIBS scenarios (RT-53676), moving perllibs handling toMM_Win32::init_others(). This broke all direct callers ofExtUtils::Liblist->ext()— includingExtUtils::Embed::ldopts(), mod_perl2, and PAR::Packer — which no longer receive perllibs in the returned lib list, causing link failures on Windows with perl 5.42.Fixes #478
Changes
lib/ExtUtils/Liblist/Kid.pm: Restore perllibs injection in_win32_make_lib_search_list(), respecting the existing:nodefaultflag. This restores the public API contract ofext().lib/ExtUtils/MM_Win32.pm: Wrap theSUPER::init_otherscall (which runs the multi-LIBS selection loop) with a localized$self->{LIBS}that has:nodefaultappended to each entry. This prevents perllibs from making a failing LIBS probe appear to succeed, so fallback to later LIBS entries still works (RT-53676 preserved). Also add:nodefaultto the perllibsextliblist()call to prevent self-referential duplication.t/Liblist_Kid.t: Update the test added by e04e45f that incorrectly asserted_ext()should not add perllibs; the correct behavior is that it does (subject to:nodefault).Test plan
perl -Ilib t/Liblist_Kid.t— all 17 tests pass, including multi-LIBS selection and:nodefaultbehaviorperl -Ilib t/Liblist.t— all 6 tests passperl -Ilib t/basic.t— passesGenerated by Kōan /fix