When I try to emerge DBD-mysql against a mysql server builded with USE flags "+static -ssl" on a system installed from 2005.0 AMD64 the build fail with: Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/lib" /usr/bin/perl5.8.5 myld gcc -shared -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1 !!! ERROR: dev-perl/DBD-mysql-2.1027 failed. !!! Function perl-module_src_compile, Line 100, Exitcode 2 !!! compilation failed The same emerge against a mysql emerged with USE="-static -ssl" compile with success. Reproducible: Always Steps to Reproduce: 1.USE="static -ssl" emerge mysql 2.emerge DBD-mysql #dont compile 3.USE="-static -ssl" emerge mysql 4.emerge DBD-mysql #compile cleanly Actual Results: DBD-mysql dont compile Expected Results: clean compile and install On x86 (other system) with same version of package the DBD-mysql compile without problem in both case (with a mysql static or non-static) mysql version used: 4.0.24.ebuild DBD-mysql-2.1027 # emerge info Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102 -r1, 2.6.11.6 x86_64) ================================================================= System uname: 2.6.11.6 x86_64 AMD Opteron(tm) Processor 244 Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 4 2005, 20:56:1 9)] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/shar e/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linu x/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 acpi alsa berkdb bitmap-fonts crypt font-server fortran gif gpm inn odb jp2 jpeg lzw lzw-tiff mbox mp3 mysql ncurses nls opengl oss pam perl png p ython readline ssl tcpd threads tiff truetype truetype-fonts type1-fonts usb u serlocales xml2 xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
amd64 - can you help? I don't have hardware to even begin to approach this with
amd64 ping
This is the full error, seems like you are trying to build a .so (which has to be -fPIC) against the .a (which is not -fPIC in this case).. I'm not sure if the .a should be -fPIC (making this a mysql/amd64 bug) or if building non-static against static is wrong. Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH="/lib" /usr/bin/perl5.8.5 myld gcc -shared -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/mysql/libmysqlclient.a(libmysql.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/mysql/libmysqlclient.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
Mass re-assign.
(In reply to comment #3) > I'm not sure if the > .a should be -fPIC (making this a mysql/amd64 bug) or if building non-static > against static is wrong. The latter is the case. I'd suggest to check if mysql was built with USE=static, but that's up to the perl herd
blubb says that compiling non-static against static is really wrong; Pierre wrote that he did USE=static. Not a bug, then?
Hi, I effectively used USE="static" but i think it may still be a bug. I think The fact that libmysqlclient.a is not build with -fPIC, when the USE flag "static" is defined, prevents the build of tools that depend on MySQL like dev-perl/DBD-mysql on X86_64. I have hope that this thread will explain better than I am: http://bugs.mysql.com/bug.php?id=8796 I must also says that I no longuer have access to a X86_64 system, so I was unable to confirm that this bug exist anymore prior to my post. Pershap it's already fixed? take care,
From the thread you referred to: > Thank you for your bug report. This issue has been committed to our > source repository of that product and will be incorporated into the > next release. amd64, any chance you could help us with this one? It should be fixed in MySQL >=4.1.11
*** Bug 141999 has been marked as a duplicate of this bug. ***
confirm on the bug, USE="static" means no DBD-mysql, no problem with no static compilation # emerge -v DBD-mysql ...snip... /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/mysql/libmysqlclient.a(libmysql.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/mysql/libmysqlclient.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1 !!! ERROR: dev-perl/DBD-mysql-3.0004 failed. Call stack: ebuild.sh, line 1546: Called dyn_compile ebuild.sh, line 937: Called src_compile ebuild.sh, line 1255: Called perl-module_src_compile perl-module.eclass, line 138: Called die Portage 2.1.1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 x86_64) ================================================================= System uname: 2.6.17-gentoo-r8 x86_64 Intel(R) Xeon(TM) CPU 3.60GHz Gentoo Base System version 1.12.5 Last Sync: Wed, 20 Sep 2006 13:30:08 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] 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="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://cs.ubishops.ca/pub/gentoo http://adelie.polymtl.ca/ http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LINGUAS="" MAKEOPTS="-j3" 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'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 apache2 berkdb bitmap-fonts cgi cli crypt cups dlloader dri elibc_glibc fast-cgi fcgi fortran gd gdbm gpm imap input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog kernel_linux libg++ libwww maildir mysql ncurses nls nptl nptlonly pam pcre perl ppds pppd python ql readline reflection sasl session snmp sperl spl ssl tcpd truetype-fonts type1-fonts udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to comment #11) > confirm on the bug, USE="static" means no DBD-mysql, no problem with no static > compilation What version of MySQL do you have?
this is more of mysql's territory
@blubb - could you go rant a bit on the upstream bug? They've closed it as NEEDINFO.
(In reply to comment #14) > @blubb - could you go rant a bit on the upstream bug? They've closed it as > NEEDINFO. Done. Closing it as needinfo when a comment above mine the problem was described very precisely looks a bit dumb, but oh well...
I can reproduce this with DBD-mysql-3.0008 and DBD-mysql-4.00.4-r1 trying to link against a statically built mysql-5.0.38, the error is exactly the same as mention in comment #3. Didn't try with mysql4 yet as everything on this system is linked against mysql5 ;>
(In reply to comment #16) > Didn't try with mysql4 yet as everything on this system is linked against mysql5 Not needed, I did test w/ mysql-4.1.22-r1 and it's definitely still broken. Thanks.
Created attachment 120126 [details, diff] mysql.eclass.diff Someone test this patch please and report back.
*** Bug 180675 has been marked as a duplicate of this bug. ***
(In reply to comment #18) > mysql.eclass.diff Works fine with DBD-mysql-4.00.5 compiled against a statically linked mysql-5.0.42
angelos: could you please test with mysql-4.0 and mysql-4.1 as well?
mysql-4.1 works too, mysql-4.0 fails to compile with some funny syntax errors, but that also happens without that change
(In reply to comment #22) > mysql-4.1 works too, mysql-4.0 fails to compile with some funny syntax errors, > but that also happens without that change Thanks for testing. :) Apply and close, really stale one.
in cvs.