Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 141999 - x11-libs/qt-4.1.2 fails: relocation R_X86_64_PC32 against `mysql_debug' can not be used when making a shared object; recompile with -fPIC
Summary: x11-libs/qt-4.1.2 fails: relocation R_X86_64_PC32 against `mysql_debug' can n...
Status: RESOLVED DUPLICATE of bug 88360
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-28 05:08 UTC by Christian Korff
Modified: 2006-07-31 14:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Korff 2006-07-28 05:08:23 UTC
I ran into some linking problems of qt 4.1.2 with MySQL (4.1.20):

g++ -c -m64 -pipe -I/usr/include/mysql -I/usr/include/postgresql/pgsql -O2 -march=nocona -pipe -D_REENTRANT -Wall -W -fPIC  -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I../../../../mkspecs/linux-g++-64 -I. -I../../../../include/QtCore -I../../../../include/QtSql -I../../../../include -I.moc/release-shared -I. -o .obj/release-shared/qsql_mysql.o ../../../sql/drivers/mysql/qsql_mysql.cpp
rm -f libqsqlmysql.so
g++ -m64 -shared -o libqsqlmysql.so .obj/release-shared/main.o .obj/release-shared/qsql_mysql.o   -L/usr/lib64 -L/usr/lib64/mysql -L/var/tmp/portage/qt-4.1.2/work/qt-x11-opensource-src-4.1.2/lib -lmysqlclient_r -lQtSql -L/usr/lib64 -L/usr/lib64/mysql -L/var/tmp/portage/qt-4.1.2/work/qt-x11-opensource-src-4.1.2/lib -lQtCore -lz -lm -lpthread -ldl 
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/mysql/libmysqlclient_r.a(libmysql.o): relocation R_X86_64_PC32 against `mysql_debug' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[5]: *** [../../../../plugins/sqldrivers/libqsqlmysql.so] Error 1
make[5]: Leaving directory `/var/tmp/portage/qt-4.1.2/work/qt-x11-opensource-src-4.1.2/src/plugins/sqldrivers/mysql'
make[3]: *** [sub-mysql-all] Error 2
make[3]: Leaving directory `/var/tmp/portage/qt-4.1.2/work/qt-x11-opensource-src-4.1.2/src/plugins/sqldrivers'
make[2]: *** [sub-sqldrivers-all] Error 2
make[2]: Leaving directory `/var/tmp/portage/qt-4.1.2/work/qt-x11-opensource-src-4.1.2/src/plugins'
make[1]: *** [sub-plugins-all-ordered] Error 2
make[1]: Leaving directory `/var/tmp/portage/qt-4.1.2/work/qt-x11-opensource-src-4.1.2/src'
make: *** [sub-src-all-ordered] Error 2

!!! ERROR: x11-libs/qt-4.1.2 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  qt-4.1.2.ebuild, line 152:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.

# emerge info
*** Deprecated use of action 'info', use '--info' instead
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.14 x86_64)
=================================================================
System uname: 2.6.14 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.6.15
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/src/portage-distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa arts avi berkdb bitmap-fonts cddb cli crypt cups dlloader dri eds emboss encode esd foomaticdb fortran gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 hardened imlib ipv6 isdnlog jpeg kde kerberos ldap libcaca linguas_de linguas_en_GB linguas_fr lzw lzw-tiff mng mp3 mpeg ncurses nls nptl ogg opengl pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl ssl svg tcpd tiff truetype-fonts type1-fonts unicode usb vorbis wmf xinerama xml xorg xpm xprint xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Christian Korff 2006-07-28 05:49:59 UTC
same with qt 3.3.6-r1:
x86_64-pc-linux-gnu-g++ -c -pipe -I/usr/include/mysql -I/usr/include/postgresql/server -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server -fno-exceptions -Wall -W -O2 -march=nocona -pipe -fno-strict-aliasing -D_REENTRANT -fPIC  -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -I/var/tmp/portage/qt-3.3.6-r1/work/qt-x11-free-3.3.6/mkspecs/linux-g++ -I. -I/usr/include/freetype2 -I../../../../include -I/usr/include -I.moc/release-shared-mt/ -o .obj/qsql_mysql.o ../../../../src/sql/drivers/mysql/qsql_mysql.cpp
test -d ../../../sqldrivers/ || mkdir -p ../../../sqldrivers/
rm -f libqsqlmysql.so
x86_64-pc-linux-gnu-g++ -fno-exceptions -shared -o libqsqlmysql.so .obj/main.o .obj/qsql_mysql.o   -L/usr/lib64 -L/usr/lib64/mysql -L/var/tmp/portage/qt-3.3.6-r1/work/qt-x11-free-3.3.6/lib -L/usr/X11R6/lib64 -lmysqlclient -lqt-mt -lmng -ljpeg -lpng -lz -lXi -lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lpthread 
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/mysql/libmysqlclient.a(libmysql.o): relocation R_X86_64_PC32 against `mysql_debug' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[3]: *** [../../../sqldrivers/libqsqlmysql.so] Error 1
make[3]: Leaving directory `/var/tmp/portage/qt-3.3.6-r1/work/qt-x11-free-3.3.6/plugins/src/sqldrivers/mysql'
make[2]: *** [sub-mysql] Error 2
make[2]: Leaving directory `/var/tmp/portage/qt-3.3.6-r1/work/qt-x11-free-3.3.6/plugins/src/sqldrivers'
make[1]: *** [sub-sqldrivers] Error 2
make[1]: Leaving directory `/var/tmp/portage/qt-3.3.6-r1/work/qt-x11-free-3.3.6/plugins/src'
make: *** [sub-plugins] Error 2

!!! ERROR: x11-libs/qt-3.3.6-r1 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  qt-3.3.6-r1.ebuild, line 207:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.

Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2006-07-31 04:54:41 UTC
Your error is:

/usr/lib64/mysql/libmysqlclient_r.a(libmysql.o): relocation R_X86_64_PC32
against `mysql_debug' can not be used when making a shared object; recompile
with -fPIC

So, that seems more like something wrong with your mysql than with qt.  I'd try a re-emerge of mysql.

Likely a dup of 78720
Comment 3 Simon Stelling (RETIRED) gentoo-dev 2006-07-31 05:07:38 UTC
seems to be more like bug 88360 to me.

did you compile mysql with the static USE flag? if not, please reopen this bug

*** This bug has been marked as a duplicate of 88360 ***
Comment 4 Christian Korff 2006-07-31 11:54:56 UTC
Yes, I used the static use flag.
However according to the MySQL bugreport ( http://bugs.mysql.com/bug.php?id=8796 ) 4.1.11 and later should work.

Since the other bug is not confirmed as closed I leave this to resolved duplicate but something seems to be wrong or different
Comment 5 Simon Stelling (RETIRED) gentoo-dev 2006-07-31 14:27:58 UTC
(In reply to comment #4)
> Yes, I used the static use flag.
> However according to the MySQL bugreport (
> http://bugs.mysql.com/bug.php?id=8796 ) 4.1.11 and later should work.

If you have a closer look you can see that qt fails on libmysqlclient_r.a where the upstream bug is about libmysqlclient.a. I guess they simply forgot about the _r version, so the bug is only fixed half-way. We'll keep the other bug open to handle that because it's really the same issue just applied to two files