Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 182605

Summary: media-video/transcode-1.0.3 emerge fails w/ USE="imagemagick"
Product: Gentoo Linux Reporter: Michelangelo Scopelliti <kernelpanic>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: VERIFIED FIXED    
Severity: normal CC: a_tevelev, billie, dliana, jaak, jakub, jmjoseph, julien.cynober, kentnl, kernelpanic, p.paixao, pesa, starz909, zeekec, znmeb
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch candidate to be merged in CVS (both 1.0.x and 1.1.x branches). Please test.
further patch to fix filters with ImageMagick 6.3.x and HDR enabled

Description Michelangelo Scopelliti 2007-06-19 19:16:19 UTC
emerge transcode fails if "imagemagick" is in USE. The problem is present with imagemagick-6.3.4-r1, but was not present with earlier versions (though I've not tracked the issue). Disabling imagemagick create a clean build.

Reproducible: Always

Steps to Reproduce:
1. emerge -NDuv transcode
2.
3.

Actual Results:  
last lines of ebuild log (compiling import_im.c) reporting the problem

 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src -I../libtc -I/usr/include -I../libac3 -I../avilib -I/usr/include -I/usr/include -I/usr/include -I/usr/include/libmpeg3 -I/usr/include/libxml2 -I../libvo -I/usr/include -I/usr/include -I/usr/include/lqt -I../libxio -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -pipe -DDCT_YUV_PRECISION=1 -MT import_im.lo -MD -MP -MF .deps/import_im.Tpo -c import_im.c  -fPIC -DPIC -o .libs/import_im.o
import_im.c: In function 'import_im_decode':
import_im.c:269: error: invalid operands to binary >>
import_im.c:272: error: invalid operands to binary >>
import_im.c:275: error: invalid operands to binary >>
make[3]: *** [import_im.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -DMOD_PATH=\"/usr/lib/transcode\" -I.. -I../src -I../libtc -I/usr/include -I../libac3 -I../avilib -I/usr/include -I/usr/include -I/usr/include -I/usr/include/libmpeg3 -I/usr/include/libxml2 -I../libvo -I/usr/include -I/usr/include -I/usr/include/lqt -I../libxio -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -pipe -DDCT_YUV_PRECISION=1 -MT import_imlist.lo -MD -MP -MF .deps/import_imlist.Tpo -c import_imlist.c  -fPIC -DPIC -o .libs/import_imlist.o
mv -f .deps/import_imlist.Tpo .deps/import_imlist.Plo
make[3]: Leaving directory `/var/tmp/portage/media-video/transcode-1.0.3/work/transcode-1.0.3/import'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-video/transcode-1.0.3/work/transcode-1.0.3/import'
make[1]: *** [all-recursive] Error 1



'emerge --info' output:

Portage 2.1.3_rc4 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.5-r3, 2.6.21.1 i686)
=================================================================
System uname: 2.6.21.1 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Tue, 19 Jun 2007 18:00: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.18.1
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.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="it_IT@euro"
LINGUAS="en it"
MAKEOPTS="-j2"
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/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X Xaw3d a52 aac aalib acpi alsa amr ansi ao aotuv apache2 ares audiofile autoipd avahi bcmath berkdb bidi bitmap-fonts blas bonjour boost bzip2 cairo caps cddb cdparanoia cjk cli cracklib crypt cscope css cups curl dbus dia divx djbfft djvu doc dts dv dvb dvd dvdnav dvdr dvdread dynamic emf enca encode examples exif expat extrafilters fame fasttrack ffmpeg fftw flac fontconfig fortran fpx ftp gcl gd gdbm gif gimp ginac glitz gmedia gmp gnuplot gnutella gnutls gphoto2 gpm graphviz gs gstreamer gtk hal hdri howl-compat iconv idea idn ieee1394 imagemagick imlib inkjar insecure-savers iproute2 ipv6 isdnlog jack java javascript jbig jce jpeg jpeg2k ladspa lame lapack latex lcms ldap lesstif libcaca libg++ libsamplerate lirc live logrotate lzo mad magic matroska md5sum meanwhile midi mikmod mjpeg mmap mmx mng modplug motif mp2 mp3 mp4live mpeg msn mudflap multicall multislot musepack musicbrainz mysql ncurses network nls no-old-linux nptl nptlonly nsplugin objc odbc offensive ogg openal openexr opengl openmp oss pango pcmcia pcre pdf perl php pic plotutils pmu png pnm portaudio posix postgres postscript ppds pppd prediction python q32 q8 qhull qt3 quicktime radio rar readline real realmedia reflection replytolist rle rt2500pci rtc samba sasl scanner sdl session silc slp sndfile speex spell spl sqlite3 srt sse sse2 ssl svg tcl tetex tga theora threads tidy tiff timidity tk tordns truetype truetype-fonts type1-fonts unicode usb utempter v4l v4l2 vcd vdr vidix vim-with-x vorbis vorbis-psy wavpack win32codecs wmf wmp wxwindows x264 x86 xanim xchatdccserver xext xforms xml xmlrpc xorg xpm xscreensaver xsl xv xvid xvmc yv12 zlib zvbi" 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 keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en it" USERLAND="GNU" VIDEO_CARDS="nv nvidia v4l vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michelangelo Scopelliti 2007-06-20 08:04:57 UTC
Ok, some insight.
This bug is present also on AMD64.
I think I've found the problem:
media-gfx/imagemagick-6.3.4, introducing HDRI, changed the definition of type Quantum, which, in turn, is used to define PixelPacket, the type of variable pixelpacket. pixelpacket breaks the compilation of import_im.c.
So, in the end, I suggest two possible workarounds: either have a transcode without imagemagick support, or block imagemagick to 6.3.3 (which doesn't show the bug).
This until the problem is fixed upstream -- I will signale it later.
Comment 2 Michelangelo Scopelliti 2007-06-25 08:01:02 UTC
bug acknowledged upstream.
Comment 3 M. Edward Borasky 2007-07-12 14:29:15 UTC
Something else breaks with HDRI, although I don't remember exactly what it is. It's a Ruby package -- I just don't remember which one. Thanks for the workaround. :)
Comment 4 Francesco Romani 2007-07-17 09:32:06 UTC
Created attachment 125149 [details, diff]
Patch candidate to be merged in CVS (both 1.0.x and 1.1.x branches). Please test.

This patch should fix this problem, and improve a bit transcode's IM modules
as well. We're switching from MagickCore to MagickWand API, as suggested by
ImageMagick docs. This is supposed to make our modules better, simpler and avoid
future problems like that.

Please test.
Comment 5 Michelangelo Scopelliti 2007-07-26 13:12:53 UTC
I'msorry for the dealy.
The patch, as it is, breaks the compilation of filter_logoaway.c (same problem for >> operator as in imagemagick filter). This appens both on x86 and amd64.

I was not able to determine were is a patch problem or gentoo-patches+this_patch problem. In my tries, I applied this patch after gentoo-patches.
Comment 6 Steve Dibb (RETIRED) gentoo-dev 2007-07-26 20:20:47 UTC
1.0.4-rc0 is in the the tree now, please try that one on for size.
Comment 7 Francesco Romani 2007-07-26 22:53:17 UTC
(In reply to comment #5)
> I'msorry for the dealy.

NP

> The patch, as it is, breaks the compilation of filter_logoaway.c (same problem
> for >> operator as in imagemagick filter). This appens both on x86 and amd64.

OK, got it. GetImagePixels is used even on our IM filters, so of course
they must fixed too. This will take longer (groan).
Comment 8 Francesco Romani 2007-07-27 05:46:30 UTC
(In reply to comment #7)
> OK, got it. GetImagePixels is used even on our IM filters, so of course
> they must fixed too. This will take longer (groan).

OK, a quick summary follows.

The problem:
------------
(questionable) usage of ancient interface of ImageMagick in some transcode modules lead to compilation (and quite surely, on execution too) problems, as pointed out on this bug report.

Affected modules:
-----------------
- import/import_im.c
- import/import_imlist.c
- filter/filter_compare.c
- filter/filter_logoaway.c
- export/export_im.c (maybe)

please note that filter/filter_logo.c uses IM as well, but was greatly enhanced
and improved during 1.1.0 cycle, so it should be not affected by this issue.

Status:
-------

import/import_im.c: rewritten, hopefullly fixed, needs testing and regression checking.
import/import_imlist.c: same as above
filter/filter_compare.c: work in progress
filter/filter_logoaway.c: work in progress
export/export_im.c: needs more checks.

Stay tuned.

Bests,
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-07-27 18:02:49 UTC
(In reply to comment #6)
> 1.0.4-rc0 is in the the tree now, please try that one on for size.

Transcode 1.0.4-rc0 still fails.
Comment 10 Davide Pesavento gentoo-dev 2007-07-29 15:30:22 UTC
(In reply to comment #6)
> 1.0.4-rc0 is in the the tree now, please try that one on for size.
> 

1.0.4_rc0 still fails (on ~amd64)...
Comment 11 Francesco Romani 2007-07-30 20:17:20 UTC
Created attachment 126475 [details]
further patch to fix filters with ImageMagick 6.3.x and HDR enabled

this patch improves pixel access from filter modules. Together with previous onw should solve the ImageMagick 6.3.x HDR issues.
While this patch is part of upcoming transcode 1.0.4rc2, future 1.1.0 will very likely go a different way, at least partially.
transcode 1.0.4rc2 is ready on CVS and is expected to be released tomorrow.
Please test.
Comment 12 Davide Pesavento gentoo-dev 2007-07-30 21:10:30 UTC
Both patch are necessary to make transcode-1.0.4_rc0 compile successfully here.

[ebuild   R   ] media-gfx/imagemagick-6.3.4-r1  USE="X bzip2 graphviz hdri jbig jpeg jpeg2k lcms mpeg perl png tiff truetype wmf xml zlib -doc -fpx -gs -nocxx -openexr -q32 -q8" 0 kB [?=>0]
[ebuild   R   ] media-video/transcode-1.0.4_rc0  USE="X a52 dv dvdread iconv imagemagick jpeg lzo mjpeg mmx mp3 mpeg network ogg oss quicktime sdl sse sse2 theora truetype v4l2 vorbis xml xvid -3dnow (-altivec) -extrafilters -fame" 0 kB [0]

Thanks Francesco.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-08-05 05:57:59 UTC
*** Bug 187754 has been marked as a duplicate of this bug. ***
Comment 14 Davide Pesavento gentoo-dev 2007-08-05 15:15:37 UTC
transcode-1.0.4_rc3 has been released.
Changelog follows:

transcode 1.0.4 (since 1.0.3):
------------------------------
- improve detection of MPEG streams: 
  do not use hardcoded defaults if sequence header has incorrect data;
- make our IM filters compatible with IM 6.3.x with HDR:
  improve pixel access;
- drop old GTK 1.x requirement;
- improve compatibility with libmpeg3 1.7;
- improve compatibility with newer ffmpeg libraries;
- trivial warning reduction fixes;

Please bump, this new RC fixes the build failure against imagemagick that this bug is about.
Comment 15 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-08-16 20:18:56 UTC
This bug seems to be fixed in 1.0.4_rc6.
Comment 16 Steve Dibb (RETIRED) gentoo-dev 2007-08-16 20:59:36 UTC
Thanks :)
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2007-09-29 05:07:21 UTC
*** Bug 194157 has been marked as a duplicate of this bug. ***
Comment 18 Togge 2007-10-05 11:48:01 UTC
*** Bug 194790 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-11-21 19:16:08 UTC
*** Bug 199898 has been marked as a duplicate of this bug. ***
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2007-12-30 20:19:29 UTC
*** Bug 203824 has been marked as a duplicate of this bug. ***
Comment 21 Jaak Ristioja 2008-01-04 09:25:34 UTC
Transcode-1.0.3 which is marked stable on amd64 still fails with this error! So why is this bug marked RESOLVED FIXED?!?! If this is a WONTFIX, please mask 1.0.3 and stabilize 1.0.4.
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2008-01-04 09:32:27 UTC
(In reply to comment #21)
> Transcode-1.0.3 which is marked stable on amd64 still fails with this error! So
> why is this bug marked RESOLVED FIXED?!?!

Because bugs resolution reflects latest version in the tree and NOT stable; if you want something stabilized, then file a new bug.
Comment 23 Jacob Joseph 2008-07-05 16:53:23 UTC
Jakub,
Such a response makes little sense to me.  I am synced with the latest portage on an amd64 system, and have exactly the issue reported.  Until this is corrected, the bug, as reported, is certainly not corrected.

Why else would a report be made if not to seek, and offer suggestions for correction?

~Jacob