-
Notifications
You must be signed in to change notification settings - Fork 49
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
Trying to use ppm, cpanm and manual installation of Image::Magick to no avail #140
Comments
@Jodyman-722 Are you referring to this bundle: https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-18.tar.gz ? Then I think you need to build the libraries first. See https://github.com/ImageMagick/ImageMagick-Windows for more information for building on Windows using Visual Studio. We are also working on building the Perl module in #139 and #138 |
Perhaps Image::Magick is not supported by the latest ImageMagick switch to C++, in my opinion. ImageMagick/ImageMagick#6667 (comment) In my case, on Strawberry Perl, I successfully built |
The Visual Studio instructions are unlikely to work with Strawberry Perl as it uses a mingw gcc-based toolchain. There is also a C++ compiler with strawberry perl. Look for g++.exe and c++.exe under the Overall, though, the topic of this issue would seem to be already under discussion in #139 |
@Jodyman-722 Sorry, I think I misunderstood. This is the full ImageMagick source (including PerlMagick), but you might be referring to just the PerlMagick sub directory? I now found that part here: https://imagemagick.org/archive/perl/Image-Magick-7.1.1-18.tar.gz |
It appears that Image::Magick v7.1.1-20 has just been released on metacpan. Edit: |
One problem with that executable is that it doesn't install the headers. From where does one obtain those files ? It turns out that when I built Image-Magick for mingw-built perl those few years ago, I did so against ImageMagick-6.9.2-5-Q16-HDRI. Cheers, |
During the installation process, I check the areas enclosed in the red box below. And Check "Install legacy utilities (e.g. convert)" and proceed with the installation. http://www.cpantesters.org/cpan/report/784aa14d-6e80-1014-a530-7500f0aa1848 Thank you, |
Wow, didn't know I'd get so many responses. Sorry, don't check my e-mail a lot. Yes, I had been talking about Image-Magick-7.1.1-18.tar.gz I do finally see Image-Magic-7.1.1-20.tar.gz available as well. I think ya'll are on to something and it has to be the C++ compiler that comes with Strawberry Perl. According to ImageMagick website, they say to download the latest Microsoft Visual C++ Redistributable Package: VC_redist.x64.exe I have installed that but I see Strawberry is using it's own version of gcc. I don't know how to make it use the latest Microsoft VS 2022 C++ that Image Magic was created with. I think that is what the problem is. Anyone know more about the build process that can help me figure this out? I'm sure everyone with Strawberry Perl is having the same issue. It does not affect version 7.1.1-12 which compiles just fine. Thanks in advance! Jody |
Looking at Strawberry Perl 5.32.1 Image Magic is using: At the command line: gcc and c++ all come back to Strawberry Perl install of gcc with wrapper for c++: c:\Strawberry\perl\site\bin>gcc -v c:\Strawberry\perl\site\bin>c++ -v Anyone know how to have gmake use Microsoft Visual C++ 2022 instead of gcc v8.3.0 and would this fix the issue? Any help appreciated! |
@Jodyman-722 - The Visual Studio files won't work with Strawberry Perl since it uses a mingw gcc toolchain (#140 (comment)). There has been good progress with the builds, documented in #139 (although it is now a relatively long thread). |
By the way, the reason this is so important, is because of the zero day vulnerability with Image Magick and version before 7.1.1.17 has a vulnerability with .webp images. It was fixed in Image Magic version 7.1.1.17. I never had a problem with Image::Magic Perl Module until Image Magic changed their c++ compiler to Microsoft. Again: Issue in gmake of: C:\Program Files\ImageMagick-7.1.1-Q16\include/MagickCore/magick-baseconfig.h:279:6: error: #error ImageMagick was build with a 64 channel bit mask and that requires a C++ compiler error ImageMagick was build with a 64 channel bit mask and that requires a C++ compiler |
I guess we are at an impasse then. I wonder if Active State Perl is having this issue with Image::Magick? Can Strawberry Perl be recompiled using Visual C++? |
@twata1 - I have experienced the same Image Magic 7.1.1.12 and Image-Magick-7.1.0-0.tar.gz work together just fine. Maybe from IM 7.1.1.13 and beyond, they are using new C++ compiler. |
Successful builds are described in #139 so I would not say it is an impasse.
Possibly, but it would entail a reasonable amount of re-engineering given all the third party libraries that ship with SP. A UCRT build might be a means around this (currently we build with MSVCRT). Note that it is also possible to build one's own perl using Visual C++. #11 (comment) |
Duh - I just ignored that box altogether after I read the first option. I should've known better :-( @twata, as regards http://www.cpantesters.org/cpan/report/784aa14d-6e80-1014-a530-7500f0aa1848 , did you have to build your own import libs ('.a') .... or were the provided MSVC import libs ('.lib') sufficient ... or were you able to link directly against the dlls ? Cheers, |
There is a caveat to that. I keep seeing advice that mingw doesn't need import libraries - that it will link directly to dlls. In that 'lib' folder, place copies of CORE_RL_Magick++_.dll, CORE_RL_MagickCore_.dll, and CORE_RL_MagickWand_.dll (from the top-level folder).
Cheers, |
Just comment out that line in magic-baseconfig.h and re-run 'gmake'. Seems to work for me - except that t/ping.t hangs during I had already built the mingw-compatible import libs (as described in my previous post). I'm not sure if that was needed. Cheers, |
At the time I just downloaded and installed ImageMagick-7.1.1-12-Q16-HDRI-x64-dll.exe from https://imagemagick.org/script/download.php#windows and was not aware of any import libraries. Check "Install legacy utilities (e.g. convert)" The output of convert.exe included in ImageMagick-7.1.1-12-Q16-HDRI-x64-dll.exe was the following attachment. After adding C:\Program Files\ImageMagick-7.1.1-Q16-HDRI to the PATH environment variable on the command prompt, download Image-Magick-7.1.0-0.tar.gz from metacpan and extract and build as follows, the output result is attached below.
perl-Makefile.PL.log Thank you, |
@twata1, I'm now getting essentially the same with ImageMagick-7.1.1-19-Q16-HDRI-x64-dll.exe. With that done (and with the Thanks for the pointers. This is a much simpler approach than building against an MSYS2 ImageMagick installation. UPDATE: Also works fine for me in my own Windows builds of gcc-built perls - so long as Cheers, |
Image::Magick is not distributed with Strawberry Perl, and seems there is now a process for downstream users to build it from source. I'll close this issue in a few days, or when next I do a sweep of issues. |
I would also suggest that the series of comments in ImageMagick/ImageMagick#7077 should also be referred to. |
Trying to load Image-Magick-7.1.1-18.tar.gz onto Strawberry Perl V 5.32.1 built for MSWin32-x64-multi-thread, I get the following error in all the logs after perl Makefile.PL has run successfully and created 'libMagickCOre.a', and gmake creates this error:
I had already downloaded and installed the latest version of the Microsoft Visual C++ Redistributable package: VC_redist.x64.exe
Any help would be appreciated
The text was updated successfully, but these errors were encountered: