Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 454978 - media-libs/openjpeg-1.5.0: build failure: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC CMakeFiles/openjpeg.dir/cio.c.o: could not read symbols: Bad value
Summary: media-libs/openjpeg-1.5.0: build failure: relocation R_X86_64_32 against `.ro...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-01 10:13 UTC by Gavin Pryke
Modified: 2013-02-04 13:47 UTC (History)
2 users (show)

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


Attachments
media-libs:openjpeg-1.5.0:20130201-095704.log (media-libs:openjpeg-1.5.0:20130201-095704.log,27.89 KB, text/plain)
2013-02-01 10:14 UTC, Gavin Pryke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Pryke 2013-02-01 10:13:29 UTC
media-libs/openjpeg-1.5.0 build fails

Reproducible: Always

Steps to Reproduce:
1. emerge openjpeg
2.
3.
Actual Results:  
emerge failed with error:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/openjpeg.dir/cio.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
CMakeFiles/openjpeg.dir/cio.c.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [bin/libopenjpeg.so.1.5.0] Error 1



Recently upgraded gcc-4.6.3 and over a world update I hit this. Not sure if this is an error in my configuration or a package bug.

I tried FEATURES=-ccache but same error.

$ emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)
=================================================================
System uname: Linux-3.6.11-gentoo-x86_64-Pentium-R-_Dual-Core_CPU_E6300_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Fri, 25 Jan 2013 01:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.5.4-r4, 2.7.3-r2, 3.2.3
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo kde rion gamerlay oomidi-overlay sunrise pd-overlay proaudio proaudio-wip kde-wip my-overlays-gentoo-wip my-overlays-sunrise-wip my-overlays-wip premake my-overlays-misc pang jack my-overlays-punted exorcism gentoo-mods kxstudio x-xonotic audio-wip audio-rev ayyi daudio pyo-related x-upstream-bugfixes csound-wii my-overlays-downloaded-misc ladi mythtv
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3 dlj-1.1 googleearth Oracle-BCLA-JavaSE PUEL RTCW-ETEULA Steinberg-VST-2.3"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt 	-mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm 	-mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=32 	--param l1-cache-line-size=64 --param l2-cache-size=2048 	-mtune=core2 -O2 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt 	-mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm 	-mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=32 	--param l1-cache-line-size=64 --param l2-cache-size=2048 	-mtune=core2 -O2 -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet=n --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://ftp.heanet.ie/pub/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/rion /var/lib/layman/gamerlay /var/lib/layman/oomidi /var/lib/layman/sunrise /var/lib/layman/pd-overlay /mnt/gentoo-overlays/proaudio/proaudio/trunk/overlays/proaudio /mnt/gentoo-overlays/my-overlays/proaudio-wip /mnt/gentoo-overlays/my-overlays/kde-wip /mnt/gentoo-overlays/my-overlays/gentoo-wip /mnt/gentoo-overlays/my-overlays/sunrise-wip /mnt/gentoo-overlays/my-overlays/wip /mnt/gentoo-overlays/my-overlays/premake /mnt/gentoo-overlays/my-overlays/misc /mnt/gentoo-overlays/my-overlays/pang /mnt/gentoo-overlays/my-overlays/jack /mnt/gentoo-overlays/my-overlays/punted /mnt/gentoo-overlays/my-overlays/exorcism /mnt/gentoo-overlays/my-overlays/gentoo-mods /mnt/gentoo-overlays/my-overlays/kxstudio /mnt/gentoo-overlays/my-overlays/xonotic /mnt/gentoo-overlays/my-overlays/audio-wip /mnt/gentoo-overlays/my-overlays/audio-rev /mnt/gentoo-overlays/my-overlays/ayyi /mnt/gentoo-overlays/my-overlays/daudio /mnt/gentoo-overlays/my-overlays/pyo-related /mnt/gentoo-
overlays/my-overlays/upstream-bugfixes /mnt/gentoo-overlays/3rd-party/csound-wii /mnt/gentoo-overlays/3rd-party/downloaded-misc /mnt/gentoo-overlays/3rd-party/ladi-overlay /mnt/gentoo-overlays/3rd-party/mythtv_portage/Gentoo"
SYNC="rsync://gulp/gentoo-portage"
USE="X a52 aac aalib accessibility acl acpi alsa amd64 ao audiofile avahi bash-completion berkdb bluetooth branding bzip2 cairo calendar cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus declarative dri dts dv dvd dvdr emboss encode exif fam ffmpeg fftw firefox flac fontconfig fortran gdbm geoip gif gnome gnutls gpm gstreamer gtk hddtemp iconv ieee1394 imagemagick ipv6 jabber jack jbig jingle joystick jpeg jpeg2k kde kipi ladspa lame lash lcms ldap libnotify libsamplerate lm_sensors lzo mad mikmod mmx mng modplug modules mp3 mp4 mpeg mplayer mtp mudflap multilib musepack musicbrainz mysql ncurses nls nptl nsplugin offensive ogg openal openexr opengl openmp osc oss pam pango pcre pdf phonon plasma png policykit ppds python qt3support qt4 quicktime raw readline rss samba sasl sdl semantic-desktop session slp smp sndfile sox speex spell sqlite sse sse2 ssl startup-notification subversion svg taglib tcpd theora threads tidy tiff timidity tk truetype udev udisks unicode upower usb vcd 
vim-syntax vnc vorbis wavpack wmf wxwidgets x264 xattr xcb xcomposite xft xine xinerama xml xmpp xpm xscreensaver xv xvid zeroconf zlib" ALSA_CARDS="emu10k1 hda-intel mpu401 via82xx virmidi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 
ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev nouveau nv nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Posting full build log as attachment. Thanks
Comment 1 Gavin Pryke 2013-02-01 10:14:43 UTC
Created attachment 337576 [details]
media-libs:openjpeg-1.5.0:20130201-095704.log
Comment 2 Gavin Pryke 2013-02-01 10:35:58 UTC
Sorry for more noise but another package failed after doing
emerge --resume --skipfirst

media-libs/qimageblitz-0.0.6-r1

/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/qimageblitz.dir/blitz.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
CMakeFiles/qimageblitz.dir/blitz.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [blitz/libqimageblitz.so.4.0.0] Error 1


tried to find others in the bug tracker with this:
https://bugs.gentoo.org/buglist.cgi?quicksearch=recompile%20with%20pic
Bugs #454978, #444012, #382211, #398677, #407435 showed up.

Please tell me if I should file another bug for media-libs/qimageblitz.
Thanks
Comment 3 Gavin Pryke 2013-02-01 17:08:31 UTC
Problem was CFLAGS/CXXFLAGS containing tabs, it seems cmake based ebuilds do not like this as the rest of system set compiled fine. After removing tabs from CFLAGS/CXXFLAGS the packages mentioned build successfully.
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-04 02:16:33 UTC
Yes, best to use spaces in those since it uses these to execute commands.

Are you sure you solely converted the tabs to spaces?

There are a lot of other uncommon and perhaps unsafe things in your flags.
Comment 5 Gavin Pryke 2013-02-04 13:47:41 UTC
Yes, tested with minimal cflags then added them all back without the tabs. If I put a few random tabs back in and compile the above packages again, the failure is exactly the same.

My CFLAGS are just copy and pasted from what -march=native shows plus -O2, -ggdb and -pipe. I only added more after the update to gcc-4.6.3 which showed more flags appended. Sometimes I use distcc helper machines and having -march=native there causes problems.

Maybe this should be renamed "tabs in CFLAGS breaks packages with CMake build scripts" but I consider this my error and this probably should be closed as invalid if tabs are not legal there (it's just whitespace though, no? :). It threw me that most of the system set (something like 400 packages) compiled fine until those couple of cryptic errors showed up.
After reading the other bugs it gave me the idea that something in CFLAGS could be the problem and it turned out not to be the flags but tabs.

So sorry for all the fuss.

Thanks.