Optware / Optware-ng

279 stars 52 forks source link

Fail to to install ruby gem rmagick #168

Closed Johnsik closed 7 years ago

Johnsik commented 8 years ago

ipkg install imagemagick Package imagemagick (6.9.3.5-1) installed in /opt/ is up to date.

gem install rmagick

Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

    current directory: /share/CACHEDEV2_DATA/.qpkg/Optware-ng/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0/ext/RMagick
/opt/bin/ruby -r ./siteconf20161018-22005-fmtsb0.rb extconf.rb
checking for /opt/bin/gcc... yes
checking for Magick-config... yes

Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime.
Found partial installation at: /opt
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
*** 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
        --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=/opt/bin/$(RUBY_BASE_NAME)
extconf.rb:104:in ``': No such file or directory - MagickWand-config (Errno::ENOENT)
        from extconf.rb:104:in `configure_compile_options'
        from extconf.rb:16:in `initialize'
        from extconf.rb:548:in `new'
        from extconf.rb:548:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /opt/lib/ruby/gems/2.3.0/extensions/x86-linux/2.3.0/rmagick-2.16.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection.
Results logged to /opt/lib/ruby/gems/2.3.0/extensions/x86-linux/2.3.0/rmagick-2.16.0/gem_make.out
walataza commented 7 years ago

Hello @johnsik. Did you get this fixed?

Johnsik commented 7 years ago

Hello @walataza! Not yet.

walataza commented 7 years ago

Same here, I’m looking for a fix, but I have heard that using an earlier version prior to 7.0 works. I am downloading the file and would try it. I’ll let you know if that fixes it

cheers

From: Johnsik [mailto:notifications@github.com] Sent: 31 July 2017 14:37 To: Optware/Optware-ng Optware-ng@noreply.github.com Cc: Olawale Fabiyi terabhyte@gmail.com; Mention mention@noreply.github.com Subject: Re: [Optware/Optware-ng] Fail to to install ruby gem rmagick (#168)

Hello @walataza https://github.com/walataza ! Not yet.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Optware/Optware-ng/issues/168#issuecomment-319086368 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQd6LPLjkvXpxNcDSkNuA6P8A0YLNj6dks5sTeangaJpZM4KaSdb .

walataza commented 7 years ago

I finally got it fixed... You actually need to use an earlier version. I downloaded the 6.9.9 version. you can search via sourceforge incase you have an x86 pc https://netcologne.dl.sourceforge.net/project/imagemagick/im6-exes/ImageMagick-6.9.9-4-Q16-x64-dll.exe

  1. Download the file and install(make sure there is no space between, so better to install in C: drive directly than in program files because of the space)
  2. Open cmd, enter into the path C:\ImageMagick-6.9.9-Q16 and then set CPATH=C:\ImageMagick-6.9.9-Q16\include
  3. Do the same above but this time to set library path - set LIBRARY_PATH=C:\ImageMagick-6.9.9-Q16\lib
  4. Now go into your app directory e.g C:\DEV\App\AMP>gem install rmagick -- '--with-opt-dir="C:\ImageMagick-6.9.9-Q16"'

Below was what i got Temporarily enhancing PATH for MSYS/MINGW... Building native extensions with: '--with-opt-dir="C:\ImageMagick-6.9.9-Q16"' This could take a while... Successfully installed rmagick-2.16.0 Parsing documentation for rmagick-2.16.0 Installing ri documentation for rmagick-2.16.0 Done installing documentation for rmagick after 2 seconds 1 gem installed

Then do gem list to see that it is there.

alllexx88 commented 7 years ago

I've got it working properly now:

  1. Install packages: ipkg update; ipkg install gcc pkgconfig ruby imagemagick
  2. Build rmagick:
root@DiskStation:~# gem install rmagick
Fetching: rmagick-2.16.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed rmagick-2.16.0
Parsing documentation for rmagick-2.16.0
Installing ri documentation for rmagick-2.16.0
Done installing documentation for rmagick after 55 seconds
1 gem installed
walataza commented 7 years ago

Thanks again... Funny thing is I'm on windows . It worked perfectly and just a few days ago the error came back.. in trying to see how to fix again. If you have options for windows , please send it in.. thank you

Sent from my iPhone

On 13 Aug 2017, at 12:02 PM, alllexx88 notifications@github.com wrote:

I've got it working properly now:

Install packages: ipkg update; ipkg install gcc pkgconfig ruby imagemagick Build rmagick: root@DiskStation:~# gem install rmagick Fetching: rmagick-2.16.0.gem (100%) Building native extensions. This could take a while... Successfully installed rmagick-2.16.0 Parsing documentation for rmagick-2.16.0 Installing ri documentation for rmagick-2.16.0 Done installing documentation for rmagick after 55 seconds 1 gem installed — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

alllexx88 commented 7 years ago

Funny thing is I'm on windows .

Optware-ng doesn't run on Windows... Probably, you were/are just having seemingly similar issue. On Optware-ng build was failing due to missing MagickWand-config script, and some missing imagemagick package dependency libs. I've fixed that, and now it's working fine, but Windows issue is unrelated here, not sure I can help you, sorry

P.S. A good place to start debugging build error is mkmf.log, it's location is printed when build fails, likes this:

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /opt/lib/ruby/gems/2.3.0/extensions/x86-linux/2.3.0/rmagick-2.16.0/mkmf.log
walataza commented 7 years ago

OK then, thanks alot and enjoy the rest of your week

cheers

On Mon, Aug 14, 2017 at 11:56 AM, alllexx88 notifications@github.com wrote:

Funny thing is I'm on windows .

Optware-ng doesn't run on Windows... Probably, you were/are just having seemingly similar issue. On Optware-ng build was failing due to missing MagickWand-config script, and some missing imagemagick package dependency libs. I've fixed that, and now it's working fine, but Windows issue is unrelated here, not sure I can help you, sorry

P.S. A good place to start debugging build error is mkmf.log, it's location is printed when build fails, likes this:

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/opt/lib/ruby/gems/2.3.0/extensions/x86-linux/2.3.0/rmagick-2.16.0/mkmf.log

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Optware/Optware-ng/issues/168#issuecomment-322171165, or mute the thread https://github.com/notifications/unsubscribe-auth/AQd6LKYPCnssmx0vkv_mcqabSF3jurHYks5sYDXfgaJpZM4KaSdb .

Johnsik commented 7 years ago

Thank you @alllexx88 ! All works!