I can emerge dev-ruby/rmagick 2.3.0 without the "doc" USE flag fine. But when I set the "doc" USE flag, it gets to "example 12" and then goes into some kind of infinite loop on example 12 of 184: setup.rb: entering post-setup phase... post-setup.rb: setting up documentation... /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick InitialCoords.rb (example 1 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick NewCoordSys.rb (example 2 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick OrigCoordSys.rb (example 3 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick PreserveAspectRatio.rb (example 4 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick RotateScale.rb (example 5 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick Skew.rb (example 6 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick Use01.rb (example 7 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick Use02.rb (example 8 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick Use03.rb (example 9 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick ViewBox.rb (example 10 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick adaptive_threshold.rb (example 11 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick add_noise.rb (example 12 of 184)
Created attachment 149364 [details] e,erge --info
The gem installs fine with "gem install rmagick", so I'm stumped as to why it's doing this. I can try the emerge again and "strace" the Ruby processes (there are two) when it hangs.
Note that we don't use the gem due to potential borkage with the configure process. The examples build fine for me. It might be useful to determine the arch, and the instance of imagemagick (version and USE flags) you are trying to build against.
Arch is AMD64 USE flags: # emerge -pv imagemagick These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-gfx/imagemagick-6.3.9.7 USE="X bzip2 djvu fontconfig fpx graphviz gs jpeg lcms perl png svg tiff truetype wmf xml zlib -doc -hdri -jbig -jpeg2k -nocxx -openexr -q32 -q8" 0 kB So ... what does example 12 do? The one that is hanging? "add_noise.rb" #! /usr/local/bin/ruby -w require 'RMagick' # Demonstrate the Image#add_noise method NOISE_TYPES = [Magick::UniformNoise, Magick::GaussianNoise, Magick::MultiplicativeGaussianNoise, Magick::ImpulseNoise, Magick::LaplacianNoise, Magick::PoissonNoise] img = Magick::Image.read('images/Flower_Hat.jpg').first NOISE_TYPES.each do |noise| copy = img.add_noise(noise) copy.write "add_noise_#{noise.to_s}.jpg" end exit Looks OK to me ... maybe I just didn't wait long enough?
Works fine for me too /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick adaptive_threshold.rb (example 11 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick add_noise.rb (example 12 of 184) /usr/bin/ruby18 -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./lib -I /var/tmp/portage/dev-ruby/rmagick-2.3.0/work/RMagick-2.3.0/./ext/RMagick affine.rb (example 13 of 184 ...
I'm also on amd64, although with a different set of USE flags: [6.3.7.9-r1] USE="X bzip2 jpeg lcms perl* png svg tiff truetype xml zlib -djvu -doc -fontconfig -fpx -graphviz -gs -hdri -jbig -jpeg2k -nocxx -openexr -q32 -q8 -wmf" The example should run quickly as well: real 0m0.418s I think it would be useful to try and run the example by itself and use strace to determine what it is waiting for.
strace didn't tell anything -- it's apparently not doing system calls. I have AMD CodeAnalyst, so I could figure out where in the Ruby interpreter this is happening. However, since I can reproduce it with the Rmagick gem and since nobody else on Gentoo has reproduced it yet, I think I'm going to go over to the Rmagick mailing list.
OK ... it's reproducible from the upstream tarball, so I am going to open a ticket there. If I get ambitious I'll try it on a 32-bit machine. There is a configuration option you can use to suppress running the examples, assuming that's required.
The RMagick team thinks this is an ImageMagick problem and they haven't been able to reproduce it either. Meanwhile they recommended trying a more recent version of ImageMagick.
Good news ... upgrading to imagemagick-6.4.0.6 fixed it!! I guess you can close it as "unable to reproduce" or dependent on the bug that called for an ImageMagick version bump.
I'm closing this as worksforme. imagemagick-6.4.0.6 just got added to CVS two days ago, so there is no open bug to depend on anymore. :-)