Open bai-yi-bai opened 1 year ago
Unfortunatelly i got different error after i installed mentioned
ridk.cmd exec pacman -S mingw-w64-ucrt-x86_64-graphicsmagick
PS C:\Users\piotrbz> gem install prawn-gmagick Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing prawn-gmagick: ERROR: Failed to build gem native extension.
current directory: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/prawn-gmagick-0.0.9/ext/image
C:/Ruby32-x64/bin/ruby.exe extconf.rb extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby32-x64/bin/$(RUBY_BASE_NAME) --with-GraphicsMagickWand-dir --without-GraphicsMagickWand-dir --with-GraphicsMagickWand-include --without-GraphicsMagickWand-include=${GraphicsMagickWand-dir}/include --with-GraphicsMagickWand-lib --without-GraphicsMagickWand-lib=${GraphicsMagickWand-dir}/lib --with-GraphicsMagickWand-config --without-GraphicsMagickWand-config --with-pkg-config --without-pkg-config C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:490:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:583:in `try_link0'
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:601:in `try_link'
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:693:in `try_ldflags'
from C:/Ruby32-x64/lib/ruby/3.2.0/mkmf.rb:1891:in `pkg_config'
from extconf.rb:3:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/prawn-gmagick-0.0.9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/prawn-gmagick-0.0.9 for inspection. Results logged to C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/prawn-gmagick-0.0.9/gem_make.out
mkmf.log contains :
PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\WANdisco\Subversion;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\PuTTY\;C:\Program Files\TortoiseSVN\bin;C:\project\rvs\prg\src\tools\cmake.win;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\msys64\ucrt64\bin;C:\Program Files\dotnet\;C:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin;C:\Program Files (x86)\Inno Setup 6;C:\Gradle\gradle-8.5\bin;C:\ProgramData\chocolatey\bin;C:\Ruby32-x64\bin;C:\Users\piotrbz\AppData\Local\Microsoft\WindowsApps;;C:\Users\piotrbz\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Nmap;C:\Users\piotrbz.dotnet\tools" x86_64-w64-mingw32-pkg-config --exists GraphicsMagickWand
PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\WANdisco\Subversion;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\PuTTY\;C:\Program Files\TortoiseSVN\bin;C:\project\rvs\prg\src\tools\cmake.win;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\msys64\ucrt64\bin;C:\Program Files\dotnet\;C:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin;C:\Program Files (x86)\Inno Setup 6;C:\Gradle\gradle-8.5\bin;C:\ProgramData\chocolatey\bin;C:\Ruby32-x64\bin;C:\Users\piotrbz\AppData\Local\Microsoft\WindowsApps;;C:\Users\piotrbz\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Nmap;C:\Users\piotrbz.dotnet\tools" x86_64-w64-mingw32-pkg-config --libs GraphicsMagickWand |
=> "-lGraphicsMagickWand -LC:/msys64/ucrt64/bin/../lib -lGraphicsMagick\n"
PATH=".;C:/Ruby32-x64/lib;C:\Ruby32-x64\bin;C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\WANdisco\Subversion;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\PuTTY\;C:\Program Files\TortoiseSVN\bin;C:\project\rvs\prg\src\tools\cmake.win;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\msys64\ucrt64\bin;C:\Program Files\dotnet\;C:\Qt\Qt5.12.12\5.12.12\msvc2017_64\bin;C:\Program Files (x86)\Inno Setup 6;C:\Gradle\gradle-8.5\bin;C:\ProgramData\chocolatey\bin;C:\Ruby32-x64\bin;C:\Users\piotrbz\AppData\Local\Microsoft\WindowsApps;;C:\Users\piotrbz\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Nmap;C:\Users\piotrbz.dotnet\tools" "gcc -o conftest.exe -IC:/Ruby32-x64/include/ruby-3.2.0/x64-mingw-ucrt -IC:/Ruby32-x64/include/ruby-3.2.0/ruby/backward -IC:/Ruby32-x64/include/ruby-3.2.0 -I. -DUSE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -DMINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-fast-math -fstack-protector-strong conftest.c -L. -LC:/Ruby32-x64/lib -L. -pipe -s -fstack-protector-strong -Wl,--no-as-needed -m64 -lx64-ucrt-ruby320 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt "
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find crt2.o: No such file or directory
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find crtbegin.o: No such file or directory
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find default-manifest.o: No such file or directory
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find crtend.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
checked program was:
/ begin /
1: #include "ruby.h"
2:
3: #include
I got same error, too.
Unfortunatelly i got different error after i installed mentioned
Hello, I wanted to assist anyone who may be having problems installing prawn-gmagick. A few days ago some users asked me to assist them with getting some very old .emf files to work with AsciiDoc, Antora, and Antora-Assembler. We encountered the magick_wand error which is described https://github.com/packetmonkey/prawn-gmagick/issues/9.
image.c:3:10: fatal error: 'wand/magick_wand.h' file not found
Compiling from source using the command suggested by @abelsromero didn't work:
Originally posted by @abelsromero in https://github.com/packetmonkey/prawn-gmagick/issues/9#issuecomment-585947260
The user @StigerHe suggested a command and it didn't work either, despite being just a few months old.
Originally posted by @StigerHe in https://github.com/packetmonkey/prawn-gmagick/issues/9#issuecomment-1553548879
curl
instead ofcurt
? I tried googling, and for once one of the recommended suggestions was worthwhile (ucrt): https://packages.msys2.org/package/mingw-w64-ucrt-x86_64-graphicsmagickpacman -S mingw-w64-ucrt-x86_64-graphicsmagick
ridk.cmd exec pacman -S mingw-w64-ucrt-x86_64-graphicsmagick
After installing I was able to successfully use the command `gem install prawn-gmagick' without any wand error appearing. I was able to generate PDFs with emf files, warts and all. Unfortunately, Chrome/Edge has dropped support for .emf, so I will have to tell my users they need to convert the files anyway.
I hope this helps someone.