Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198067 - [fPIC] x11-libs/qt-4.3.1-r1 fails w/ hardened gcc-3.4.6
Summary: [fPIC] x11-libs/qt-4.3.1-r1 fails w/ hardened gcc-3.4.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-04 16:02 UTC by Christian Korff
Modified: 2009-01-13 14:40 UTC (History)
3 users (show)

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


Attachments
unified diff for target ebuild (qt-4.3.2-gcc-3.4.6-disable-opt.diff,381 bytes, patch)
2007-12-13 21:13 UTC, Orson Teodoro
Details | Diff
patched stable at ebuild (qt-4.3.2-r1.ebuild,8.58 KB, text/plain)
2007-12-13 21:15 UTC, Orson Teodoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Korff 2007-11-04 16:02:04 UTC
I expierenced the "relocation R_X86_64_32 against `a local symbol'" problem when compiling qt 4.3.1-r1 with hardened gcc 3.4.6-r2

g++ -o "/mnt/sda1/portage/portage/x11-libs/qt-4.3.1-r1/work/qt-x11-opensource-src-4.3.1/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o  qstring.o qtextstream.o qiodevice.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlistdata.o qfile.o qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qscriptasm.o qscriptast.o qscriptastvisitor.o qscriptcompiler.o qscriptecmaarray.o qscriptecmaboolean.o qscriptecmacore.o qscriptecmadate.o qscriptecmafunction.o qscriptecmaglobal.o qscriptecmamath.o qscriptecmanumber.o qscriptecmaobject.o qscriptecmaregexp.o qscriptecmastring.o qscriptecmaerror.o qscriptcontext_p.o qscriptengine.o qscriptengine_p.o qscriptextenumeration.o qscriptextvariant.o qscriptcontext.o qscriptfunction.o qscriptgrammar.o qscriptlexer.o qscriptclassdata.o qscriptparser.o qscriptprettypretty.o qscriptsyntaxchecker.o qscriptvalue.o qscriptvalueimpl.o qscriptvalueiterator.o  
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: project.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
project.o: could not read symbols: Bad value
collect2: ld returned 1 as exit status
gmake: *** [/mnt/sda1/portage/portage/x11-libs/qt-4.3.1-r1/work/qt-x11-opensource-src-4.3.1/bin/qmake] Error 1
 * 
 * ERROR: x11-libs/qt-4.3.1-r1 failed.
 * Call stack:
 *            ebuild.sh, line 1695:  Called dyn_compile
 *            ebuild.sh, line 1033:  Called qa_call 'src_compile'
 *            ebuild.sh, line   44:  Called src_compile
 *   qt-4.3.1-r1.ebuild, line  226:  Called die
 * The specific snippet of code:
 *   	./configure ${myconf} || die
 *  The die message:
 *   (no error message)
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/mnt/sda1/portage/portage/x11-libs/qt-4.3.1-r1/temp/build.log'.
 * 

 * Messages for package x11-libs/qt-4.3.1-r1:

 * 
 * ERROR: x11-libs/qt-4.3.1-r1 failed.
 * Call stack:
 *            ebuild.sh, line 1695:  Called dyn_compile
 *            ebuild.sh, line 1033:  Called qa_call 'src_compile'
 *            ebuild.sh, line   44:  Called src_compile
 *   qt-4.3.1-r1.ebuild, line  226:  Called die
 * The specific snippet of code:
 *   	./configure ${myconf} || die
 *  The die message:
 *   (no error message)
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/mnt/sda1/portage/portage/x11-libs/qt-4.3.1-r1/temp/build.log'.
 * 

# emerge --info
Portage 2.1.3.16 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.3.6-r5, 2.6.20-hardened-r10 x86_64)
=================================================================
System uname: 2.6.20-hardened-r10 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz
Timestamp of tree: Sun, 04 Nov 2007 01:00:08 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
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.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/mpd/conf /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
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/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/src/portage-distfiles"
FEATURES="autoconfig ccache confcache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.tiscali.nl/ http://gentoo.mneisen.org/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="fr de en_GB"
PKGDIR="/usr/local/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="/mnt/sda1/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="16bit 7zip X a52 aac aalib accessibility acct ace acl acpi activefilter adsl agg aiglx aim akode alsa amd64 amr amuled animgif ao aoss arj auth avantgo avi background bash-completion berkdb bluetooth bonjour bzip2 cairo calendar canna cap capi cdda cddb cdparanoia cdr cdrom cgi charconv chardet chipcard chipcard2 chm cjk cracklib crypt cups dmx dri dts dv dvb dvd dvdr dvdread enca esd eurofile fax flac gdbm geoip gif gimpprint gpm gps gtk hardened ipv6 jpeg jpeg2k justify kerberos lame ldap libcaca midi mng mp3 mpeg multilib ncurses nls nptl nptlonly ogg opengl pam perl pic png python readline sdl sse2 ssl svg tcpd tiff unicode urandom usb vorbis wmf xcb xinerama xml xorg xprint xv 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr de en_GB" USERLAND="GNU" VIDEO_CARDS="ati dummy fbdev i810 mach64 nv r128 s3 s3virge sis v4l vesa vga via vmware radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Christian Heim (RETIRED) gentoo-dev 2007-11-10 11:15:06 UTC
Hrm, I don't get the RELRO, but I get yet another asm mismatch.
Comment 2 Orson Teodoro 2007-12-13 21:13:41 UTC
Created attachment 138410 [details, diff]
unified diff for target ebuild
Comment 3 Orson Teodoro 2007-12-13 21:15:39 UTC
Created attachment 138411 [details]
patched stable at ebuild
Comment 4 Orson Teodoro 2007-12-13 21:18:15 UTC
(In reply to comment #1)
> Hrm, I don't get the RELRO, but I get yet another asm mismatch.
> 

I've submitted patches if you need to fix the asm errors for output below:

g++ -c -march=athlon64 -O2 -pipe -fno-stack-protector -march=athlon64 -O2 -pipe -fno-stack-protector -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_44_API_QSQLQUERY_FINISH -DQT_MOC_COMPAT -DQT_NO_IMAGEFORMAT_PNG -DQT_RASTER_IMAGEENGINE -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include/QtCore -I../../include -I../../include/QtGui -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/include -I.uic/release-shared -o .obj/release-shared/qstylesheetstyle.o styles/qstylesheetstyle.cpp
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h: In member function `virtual QRect QStyleSheetStyle::subControlRect(QStyle::ComplexControl, const QStyleOptionComplex*, QStyle::SubControl, const QWidget*) const':
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:120: error: inconsistent operand constraints in an `asm'
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:120: error: inconsistent operand constraints in an `asm'
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:120: error: inconsistent operand constraints in an `asm'
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:120: error: inconsistent operand constraints in an `asm'
make[1]: *** [.obj/release-shared/qstylesheetstyle.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/qt-4.3.2-r1/work/qt-x11-opensource-src-4.3.2/src/gui'
make: *** [sub-gui-all-ordered] Error 2
 * 
 * ERROR: x11-libs/qt-4.3.2-r1 failed.
 * Call stack:
 *            ebuild.sh, line 1701:  Called dyn_compile
 *            ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *            ebuild.sh, line   44:  Called src_compile
 *   qt-4.3.2-r1.ebuild, line  231:  Called die
 * The specific snippet of code:
 *      emake all || die
 *  The die message:
 *   (no error message)
 * 
 * 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/x11-libs/qt-4.3.2-r1/temp/build.log'.
 * 

 * Messages for package x11-libs/qt-4.3.2-r1:

 * Appending -fno-stack-protector to CFLAGS/CXXFLAGS
 * 
 * ERROR: x11-libs/qt-4.3.2-r1 failed.
 * Call stack:
 *            ebuild.sh, line 1701:  Called dyn_compile
 *            ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *            ebuild.sh, line   44:  Called src_compile
 *   qt-4.3.2-r1.ebuild, line  231:  Called die
 * The specific snippet of code:
 *      emake all || die
 *  The die message:
 *   (no error message)
 * 
 * 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/x11-libs/qt-4.3.2-r1/temp/build.log'.
 * 
Comment 5 solar (RETIRED) gentoo-dev 2007-12-13 21:55:26 UTC
Reassign to maintainer. qt is such a problematic pkg that hardened simply does 
not have the time to care about it. Sorry. but we simply lack the manpower.
Comment 6 Christian Korff 2009-01-13 14:40:29 UTC
I close this bug as I got an working qt 4.x now and I think it's fixed.