- 
                Notifications
    You must be signed in to change notification settings 
- Fork 602
Re-order $Config{libpth} in DynaLoader in 64bit env #17771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In a 64bit environment, force 64bit locations *before* 32bit locations.
This will move /usr/lib64 in front of /usr/lib and /lib64 in front of
/lib.  This is important if a module uses $Config{libpth} to find a
library to load, like FFI::CheckLib does. If a library is installed in
both locations, it is likely to pick the wrong one if the order is not
showing the correct architecture first
As this clutch only looks at trailing 64, it will have no impact on
locations differing completely, as /usr/lib vs /usr/lib/i386-linux-gnu/
like on debian.
Also just include existing PATH elements and filter duplicates.
    207393c    to
    8c7ed71      
    Compare
  
    | @Tux, this p.r. was submitted as a draft last May. I have rebased it on blead, thereby resolving merge conflicts. Would you like it to enter code review? Thank you very much. | 
| (still) looks fine to me. I vote +1, but that won't surprise you | 
| This feels like the wrong place to fix this. If the order is wrong, why not fix it in Configure? | 
| @Leont because the development environment on the box where perl was built (and distributed from) might be completely different from the box where this eventually is used. The moment of actual use might have access to many more resource locations than what is done inside Configure, so it needs to be as dynamic as possible and as late as possible. | 
| Why are there 32bit and 64bit entries in the same  | 
| Because not all systems have separated them nicely.  | 
| 
 This still sounds like a Configure issue. There shouldn't be any paths in  
 Franky, this is not a situation that we have ever supported. Maybe we want to support it on some systems, but I don't think we want to force it upon everyone else. Like much of DynaLoader_pm.PL, such code should be optional. | 
| It's the unanimous opinion of the PSC that this problem is not Perl's to fix, it's effectively an unsupported configuration. | 
In a 64bit environment, force 64bit locations before 32bit locations.
This will move /usr/lib64 in front of /usr/lib and /lib64 in front of
/lib. This is important if a module uses $Config{libpth} to find a
library to load, like FFI::CheckLib does. If a library is installed in
both locations, it is likely to pick the wrong one if the order is not
showing the correct architecture first
As this clutch only looks at trailing 64, it will have no impact on
locations differing completely, as /usr/lib vs /usr/lib/i386-linux-gnu/
like on debian.
Also just include existing PATH elements and filter duplicates.