Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184356 - dev-ruby/rmagick-1.15.5 fails to compile
Summary: dev-ruby/rmagick-1.15.5 fails to compile
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 21:12 UTC by Armando Di Cianno
Modified: 2007-07-11 19:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,9.28 KB, text/plain)
2007-07-05 21:14 UTC, Armando Di Cianno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Armando Di Cianno 2007-07-05 21:12:17 UTC
RMagick fails to compile.

First, with my normal USE flags and such:
# emerge rmagick -pv
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-ruby/rmagick-1.15.5  USE="doc examples" 0 kB 

Total: 1 package (1 new), Size of downloads: 0 kB
<snip>
/usr/bin/ruby setup.rb setup
---> lib
---> lib/rvg
<--- lib/rvg
<--- lib
---> ext
---> ext/RMagick
make
make[1]: Entering directory `/var/tmp/portage/dev-ruby/rmagick-1.15.5/work/RMagick-1.15.5/ext/RMagick'
i686-pc-linux-gnu-gcc -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I/var/tmp/portage/dev-ruby/rmagick-1.15.5/work/RMagick-1.15.5/ext/RMagick -DRUBY_VERSION=0x185  -I/usr/include -fPIC -march=prescott  -c rmimage.c
rmimage.c: In function 'Image_pixel_color':
rmimage.c:7066: error: array subscript is not an integer
make[1]: *** [rmimage.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-ruby/rmagick-1.15.5/work/RMagick-1.15.5/ext/RMagick'
setup.rb:655:in `command': system("make") failed (RuntimeError)
        from setup.rb:664:in `make'
        from setup.rb:1258:in `setup_dir_ext'
        from setup.rb:1532:in `__send__'
        from setup.rb:1532:in `traverse'
        from setup.rb:1549:in `dive_into'
        from setup.rb:1530:in `traverse'
        from setup.rb:1534:in `traverse'
        from setup.rb:1533:in `each'
         ... 8 levels...
        from setup.rb:826:in `__send__'
        from setup.rb:826:in `invoke'
        from setup.rb:772:in `invoke'
        from setup.rb:1578
make: *** [all] Error 1

!!! ERROR: dev-ruby/rmagick-1.15.5 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_compile
  ebuild.sh, line 973:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  rmagick-1.15.5.ebuild, line 50:   Called ruby_emake
  ruby.eclass, line 122:   Called die

!!! emake for ruby failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/dev-ruby/rmagick-1.15.5/temp/build.log'.
</snip>

I've tried it with more reserved options, and had the same results.
# CFLAGS="-march=prescott" USE="-doc -examples" MAKEOPTS="-j1" emerge rmagick -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-ruby/rmagick-1.15.5  USE="-doc -examples" 0 kB 

Total: 1 package (1 new), Size of downloads: 0 kB

Note that I don't have another RMagick in any of my overlays (or imagemagick or ruby).

Marking as "Major" since it's marked stable, but fails to compile.




Reproducible: Always

Steps to Reproduce:
1. emerge rmagick

Actual Results:  
It fails to compile.

Expected Results:  
It should've compiled.

Portage 2.1.2.9 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.20-gentoo-r8-mactel-suspend2 i686)
=================================================================
System uname: 2.6.20-gentoo-r8-mactel-suspend2 i686 Genuine Intel(R) CPU T2600 @ 2.16GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 05 Jul 2007 14:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3, 2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe -Os -march=prescott -g -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-pipe -Os -march=prescott -g -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks installsources metadata-transfer sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://mirrors.acm.cs.rpi.edu/gentoo/ http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ "
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /home/fafhrd/Projects/gentoo/overlay-gnustep /home/fafhrd/Projects/gentoo/overlay-misc /home/fafhrd/Projects/obt/repos/sesame/trunk/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accessibility acl acpi alsa amr apache2 avahi bash-completion berkdb bitmap-fonts bzip2 caps cdr cli cracklib crypt cups curl dbus dri dts dvd dvdr emacs encode exif flac fortran gdbm gif glitz gnome gnustep gnutls gphoto2 gpm hal iconv ieee1394 imagemagick imlib ipv6 isdnlog jpeg lcms libcaca libg++ logrotate mad midi mmx mng mp3 mpeg mudflap ncurses nptl nptlonly nsplugin odbc ogg opengl openmp pam pcre pda pdf png postgres pppd python readline reflection ruby scanner sdl session slp snmp speex spell spl sse sse2 ssl svg tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb v4l vcd vorbis win32codecs wmf x264 x86 xinerama xml xorg xpm xprint xscreensaver xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="alsa_usb atilibusb atiusb audio audio_alsa com1 com2 com3 com4 devinput dsp hauppauge hauppauge_dvb inputlirc lpt1 lpt2 mouseremote mouseremote_ps2 parallel serial udp userspace xboxusb" USERLAND="GNU" VIDEO_CARDS="fglrx none v4l vga vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Armando Di Cianno 2007-07-05 21:14:15 UTC
Created attachment 124009 [details]
build.log

This is the entire build log.
Comment 2 Armando Di Cianno 2007-07-05 22:03:18 UTC
I tried rebuilding imagemagick with USE="perl" turned on, on a hunch, but it still fails.  However, now it fails on a different function, but with the same error type:

---> ext/RMagick
make
make[1]: Entering directory `/var/tmp/portage/dev-ruby/rmagick-1.15.5/work/RMagick-1.15.5/ext/RMagick'
i686-pc-linux-gnu-gcc -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I/var/tmp/portage/dev-ruby/rmagick-1.15.5/work/RMagick-1.15.5/ext/RMagick -DRUBY_VERSION=0x185  -I/usr/include -fPIC -march=prescott  -c rmimage.c
rmimage.c: In function 'Image_pixel_color':
rmimage.c:7066: error: array subscript is not an integer
make[1]: *** [rmimage.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-ruby/rmagick-1.15.5/work/RMagick-1.15.5/ext/RMagick'
setup.rb:655:in `command': system("make") failed (RuntimeError)
        from setup.rb:664:in `make'
        from setup.rb:1258:in `setup_dir_ext'
        from setup.rb:1532:in `__send__'
        from setup.rb:1532:in `traverse'
        from setup.rb:1549:in `dive_into'
        from setup.rb:1530:in `traverse'
        from setup.rb:1534:in `traverse'
        from setup.rb:1533:in `each'
         ... 8 levels...
        from setup.rb:826:in `__send__'
        from setup.rb:826:in `invoke'
        from setup.rb:772:in `invoke'
        from setup.rb:1578
make: *** [all] Error 1

!!! ERROR: dev-ruby/rmagick-1.15.5 failed.
Call stack:
Comment 3 Armando Di Cianno 2007-07-05 22:04:35 UTC
Argh, no it's the same one.  Nevermind.

If I can get some good suggestions for debugging this issue, I'd really appreciate it.
Comment 4 Armando Di Cianno 2007-07-05 22:57:02 UTC
Adding:
  ~media-gfx/imagemagick-6.3.4
... to /etc/portage/package.mask allows RMagick to compile.

imagemagick-6.3.3 emerged, so I should probably change the above line to >=media-gfx/imagemagick-6.3.4

imagemagick and rmagick need some stable re-KEYWORD'ng ASAP, it seems.
Comment 5 Hans de Graaff gentoo-dev Security 2007-07-07 20:23:01 UTC
I've tried to reproduce the problem, but rmagick-1.15.5 compiles fine for me against both imagemagick 6.3.3 and 6.3.4-r1, so I'm not sure what kind of issue you are seeing. From your bug report it is also not entirely clear what combinations of imagemagick and rmagick fail for you. 

In any case I've asked for the stabilization of rmagick 1.15.7, which has at least one bug fix related to imagemagick 6.3.4. Could you please try to compile rmagick 1.15.7 against imagemagick 6.3.4-r1 to see if the problem is fixed with that combination?
Comment 6 Armando Di Cianno 2007-07-07 22:18:01 UTC
Clarifications and results from testing:
 * =imagemagick-6.3.4-r1, =rmagick-1.15.7
   * imagemagick builds
   * rmagick fails, as noted
 * =imagemagick-6.3.3, =rmagick-1.15.5
   * imagemagick builds
   * rmagick builds
 * =imagemagick-6.3.3, =rmagick-1.15.7
   * imagemagick builds
   * rmagick builds

I posted the entire build.log.  Within context, when RMagick fails, it fails almost immediately after the configure -- I believe on the first file it tries to actually compile.  As noted, I tried various changes to my setup (MAKEOPTS=-j1, etc), but the results were the same.

Summary: >=imagemagick-6.3.4 causes >=rmagick-1.15.5 to fail.
Comment 7 Hans de Graaff gentoo-dev Security 2007-07-08 07:25:11 UTC
I've confirmed that the problem is caused by enabling the hdri USE flag when compiling ImageMagick. This was introduced in the imagemagick-6.3.4-r1 ebuild. I've filed this as a bug upstream:
http://rubyforge.org/tracker/index.php?func=detail&aid=12089&group_id=12&atid=133

To fix the situation right now you should either compile without hdri or not install rmagick, depending on what your needs are.
Comment 8 Armando Di Cianno 2007-07-09 04:10:06 UTC
Yes, turning off USE="hdri" did the trick.

Thanks!
Comment 9 Hans de Graaff gentoo-dev Security 2007-07-11 19:22:21 UTC
dev-ruby/rmagick-1.15.7-r1 now checks if imagemagick is built with the hdri USE flag and explains that it isn't possible to build rmagick against it.