Perl-Sensitive Sunglasses | |
PerlMonks |
Re^7: Module::Install hackingby syphilis (Archbishop) |
on Sep 14, 2012 at 12:13 UTC ( [id://993707]=note: print w/replies, xml ) | Need Help?? |
What happens when one of your renamed dlls changes? These dll's are part of the MinGW compiler - they will only change when I switch to a different version of MinGW. (That *will* happen, but hopefully not with great frequency.) When I do upgrade my compiler from the current 4.5.2 to (say) 4.6.3 then the renamed dll will change from libgcc_sis_452.dll to libgcc_sis_463.dll. I don't see any problems with that - packages that need libgcc_s_452.dll will still install $Config{installsitebin}/libgcc_sis_452.dll, and those that need libgcc_sis_463.dll will install $Config{installsitebin}/libgcc_sis_463.dll. Eventually, as time goes by,all of the ppm packages will need libgcc_sis_463.dll, and there'll be a 100Kb libgcc_sis_452.dll sitting in the users $Config{installsitebin} folder that is no longer needed. (I think I can live with that :-) Similarly for libstdc++-6.dll (which is the *only* other dll I rename). It, too, is a MinGW compiler dll - and I'll be renaming it to something other that cpp++-6_sis.dll when I upgrade my MinGW compiler. I didn't properly stress it in my previous post, but these 2 dlls are the *only* dlls that I rename with my x86 builds. With my x64 builds there are also only 2 dlls that I rename - libgcc_s_sjlj-1.dll (which is the mingw64 counterpart of mingw's libgcc_s_dw2-1.dll) and libstdc++-6.dll (same name as mingw's corresponding file). I install two of your packages each has a dependency upon a different version of one or more of your renamed dlls. Whichever order I install them in, one of them gets the wrong thing Shit !! - I hope you're referring to a hypothetical situation here :-) So far, there has been no version change. So, such a situation should not yet have arisen, and should not ever arise so long as I adhere to the principle I've just outlined (of giving different versions different names). 1. shipping these dlls under their real names, with each package that uses them, and place them in the same directory as the dll(s) that use them This is precisely what I do with *all* dll's except the 3 mentioned above - and I used to it with those 3 as well. But there's a problem with that approach wrt those 3 dlls. Let's say I'm building the FOO extension with my x64 gcc-4.7.0 compiler, and I put a copy of its libgcc_s_sjlj-1.dll in blib/arch/auto/FOO (alongside blib/arch/auto/FOO/FOO.dll). That works fine in most places, but if someone installs my FOO binaries on Strawberry Perl, the libgcc_s_sjlj-1.dll that I packaged never gets loaded. This happens because Strawberry Perl itself loads libgcc_s_sjlj-1.dll - only *it* will load Strawberry's 4.6.3 version of libgcc_s_sjlj-1.dll, thereby preventing the libgcc_s_sjlj-1.dll that I provided from being loaded by FOO. Unless the 2 versions of libgcc_s_sjlj-1.dll have an identical set of entry points (and they don't), you've got trouble. It's this problem that led me to adopting my current approach. With x86 perls, this type of problem is less likely, but still possible. To phrase it in general terms - the approach you've outlined in 1. is not guaranteed to work if perl itself loads a dll that has the same name as a dll that I've placed in blib/arch/auto/FOO. And, in the real world of x64 Strawberry Perl, it's guaranteed to fail. One thing, however ... I've just been checking ... and it seems that mingw perl itself doesn't load libstdc++-6.dll. That being so, there's no reason to apply the same treatment to that dll. (I'll check on that and phase it out if I can.) Similarly with your second option, I think: will either die or fail to load the the dll that I want if a dll named 'libgcc_s_dw2_1.dll' has already been loaded by perl itself. In summary, as long as I limit this to the 3 (hopefully-reduceable-to-2) dll files specified above, I'm pretty confident I can be handle this without much drama. (Famous last words ;-) Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|