Open hakonhagland opened 1 year ago
I used the installation of Image::Magick in https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/139#issuecomment-1753689994
Then, I created a test script:
use feature qw(say);
use strict;
use warnings;
use Image::Magick;
my $img=Image::Magick->new();
$img->Read('logo:');
$img->Write("logo.png");
say "Done.";
and ran pp_autolink on that file:
> pp_autolink.bat p.pl
DLL check iter: 1
DLL check iter: 2
DLL check iter: 3
DLL check iter: 4
No alien system dlls detected
Detected link list: c:/strawberry/c/bin/libmagickcore-7.q16hdri-10.dll c:/strawberry/c/bin/libdl.dll c:/strawberry/c/bin/libbz2-1__.dll c:/strawberry/c/bin/libgomp-1.dll c:/strawberry/c/bin/libjpeg-9__.dll
Detected aliens:
CMD: pp --link c:/strawberry/c/bin/libmagickcore-7.q16hdri-10.dll --link c:/strawberry/c/bin/libdl.dll --link c:/strawberry/c/bin/libbz2-1__.dll --link c:/strawberry/c/bin/libgomp-1.dll --link c:/strawberry/c/bin/libjpeg-9__.dll p.pl
Does this mean that we only need to pack the following 5 libraries?
c:/strawberry/c/bin/libmagickcore-7.q16hdri-10.dll
c:/strawberry/c/bin/libdl.dll
c:/strawberry/c/bin/libbz2-1__.dll
c:/strawberry/c/bin/libgomp-1.dll
c:/strawberry/c/bin/libjpeg-9__.dll
Does this mean that we only need to pack the following 5 libraries?
It should only need those not ending in "__.dll" as those are part of Strawberry Perl (32 bit appends one underscore, 64 bit does two).
Although libdl
and libgomp-1
are both part of the strawberry perl distribution so they too are not needed. (They are originally from winlibs and we decided to leave them in).
So that means it should only need libmagickcore-7.q16hdri-10.dll
.
Edit - I think that is also consistent with what @sisyphus reported in https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/140#issuecomment-1756627785
Refer to https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/139#issuecomment-1756620667 :
The limitation is that each calling script needs a use Alien::XYZ statement at the top, or the PERL5OPT variable needs to be updated.
@shawnlaffan Interesting. Is it also correct that a third option (and maybe the best?) would be to have Gtk2
(in the form of an accepted PR) use Alien::GtkStack::Windows
? Then, when installing Gtk2
with for example cpanm Gtk2
, Alien::GtkStack::Windows
would also be installed automatically if missing..
In principle yes, but there are always complexities.
The builds need manual intervention at the moment, per the method @sisyphus worked out in https://www.perlmonks.org/?node_id=11153992 but this is a step forward.
In one scenario such an Alien would compile from source rather than munging MSYS2 files. The number of extra dependencies is high, though, which leads to more Aliens.
There's also the possibility of compiling the various dependencies using the approach we use for the Strawberry Perl deps (see https://github.com/StrawberryPerl/build-extlibs).
Continuing the discussion from here: https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/139#issuecomment-1756279918, https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/139#issuecomment-1756620667 and https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/139#issuecomment-1758472269
@shawnlaffan Looks like a good idea, I am creating an issue here so we can track it. I will investigate
App::PP::AutoLink
and come back here when I know more.