Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
View Bug Activity | Format For Printing | XML | Clone This Bug
Trying to use PerlMagick modules gives me: Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/Image/Magick/Magick.so' for module Image::Magick: libgomp.so.1: shared object cannot be dlopen()ed at /usr/lib64/perl5/5.8.8/x86_64-linux/DynaLoader.pm line 230. This appears to be the same bug as 193737, which was closed several months ago. I'm not positive, but I think the upgrade to GCC 4.2.4 was the instigating factor. Reproducible: Always Steps to Reproduce: 1. Use PerlMagick library. 2. Boom. Actual Results: Error message as above. Expected Results: PerlMagick should link. Portage 2.1.5.2 (default-linux/amd64/2007.0, gcc-4.2.4, glibc-2.7-r2, 2.6.25-gentoo-r4 x86_64) ================================================================= System uname: 2.6.25-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ Timestamp of tree: Tue, 27 May 2008 05:45:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.5.2-r4 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.4-r1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.25-r3 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O3 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=athlon64 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.pair.com/ " LC_ALL="POSIX" LDFLAGS="" LINGUAS="en en_US" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 berkdb cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog kdeenablefinal kdehiddenvisibility midi mmx mudflap ncurses nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nv nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Which version of media-gfx/imagemagick do you use?
I experience the same error with imagemagick wrapper for ruby (Rmagick) on two computers - i686 and x86_64. libgomp.so.1: shared object cannot be dlopen()ed - /usr/lib64/ruby/site_ruby/1.8/x86_64-linux/RMagick2.so I belivele it caused by libgomp.so from news GCC (updated just yesterday). Found a thread that seems relevant to the problem: http://www.archivum.info/gnu.gcc.help/2006-07/msg00076.html
(In reply to comment #1) > Which version of media-gfx/imagemagick do you use? > <~> $ convert --version Version: ImageMagick 6.4.1 05/27/08 Q16 OpenMP http://www.imagemagick.org Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
(In reply to comment #3) > (In reply to comment #1) > > Which version of media-gfx/imagemagick do you use? > > > > <~> $ convert --version > Version: ImageMagick 6.4.1 05/27/08 Q16 OpenMP http://www.imagemagick.org > Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC > and more specifically, emerged as the following: [ebuild R ] media-gfx/imagemagick-6.4.1.3 USE="X bzip2 graphviz jpeg lcms perl png svg tiff truetype xml zlib -djvu -doc -fontconfig -fpx -gs -hdri -jbig -jpeg2k -nocxx -openexr -q32 -q8 -wmf" 0 kB
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #1) > > > Which version of media-gfx/imagemagick do you use? > > > > > > > <~> $ convert --version > > Version: ImageMagick 6.4.1 05/27/08 Q16 OpenMP http://www.imagemagick.org > > Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC > > > > and more specifically, emerged as the following: > > [ebuild R ] media-gfx/imagemagick-6.4.1.3 USE="X bzip2 graphviz jpeg lcms > perl png svg tiff truetype xml zlib -djvu -doc -fontconfig -fpx -gs -hdri -jbig > -jpeg2k -nocxx -openexr -q32 -q8 -wmf" 0 kB > Falling back to this version: [ebuild R ] media-gfx/imagemagick-6.4.0.6 USE="X bzip2 graphviz jpeg lcms perl png svg tiff truetype xml zlib -djvu -doc -fontconfig -fpx -gs -hdri -jbig -jpeg2k -nocxx -openexr -q32 -q8 -wmf" 0 kB Fixes the problem for me.
from what i see the problem is that libgomp.so in gcc 4.2.4 (didn't check earlier versions) is marked NOOPEN so it can't be dlopen'd, directly or indirectly. perl/ruby/apache+php/etc all dlopen their modules and since imagemagick libs link against libgomp, such attempts fail. so there're two questions to answer: - is imagemagick supposed to link against libgomp? if yes, then there's trouble because it means that imagemagick cannot be used as a dlopen'd module any longer. if no then something in the imagemagick build system (or maybe default gcc specs?) pulls it in for no reason. - is libgomp marked NOOPEN for any particular reason? was it like that before? in any case, if the answer is yes (and i guess it is), then it means that nothing linking against it can be dlopen'd in the future, so more packages besides imagemagick will break.
(In reply to comment #6) > so there're two questions to answer: Thanks for figuring out NOOPEN as the culprit! I guess the answer to both questions is "No, but there is a performance penalty if you don't". For imagemagick, the solution would be to --disable-openmp. I guess introducing the openmp USE flag and $(enable_with openmp) would be more appropriate. Maybe using perl or python should override the openmp setting, though. As php is probably affected as well, and is in a separate package, the current IUSE flags are not enough to decide whether imagemagick has to be dynamically linkable. For the NOOPEN flag in libgomp I found a most interesting bug report here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28482 There is a fix included in gcc-4.3*, but 4.2.4 doesn't include that fix. Maybe 4.2.5 will. So here a workaround for Gentoo users would be to emerge and switch to the latest gcc, with all the system rebuild that entails.
Created an attachment (id=157333) [edit] openmp USE flag for imagemagick This patch allows users to add "media-gfx/imagemagick -openmp" to their /etc/portage/package.use in order to avoid linking against libgomp. A matching entry in profiles/use.local.desc would probably be required as well, e.g. copy&paste from gcc. profiles/default/linux/make.default currently defaults openmp, so the patch wouldn't affect the default behaviour.
USE-flag added in media-gfx/imagemagick-6.4.2.0. Thanks for the patch.