Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 267195

Summary: dev-db/mysql-5.0.76-r1: bad interaction between USE=static and shared-lib embedded patch
Product: Gentoo Linux Reporter: Loredan Stancu <salecss>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED TEST-REQUEST    
Severity: major CC: detlev.casanova, flameeyes, jmbsvicetto
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /var/tmp/portage/dev-db/mysql-5.0.76-r1/temp/build.log
This file contains the output of emerge -v --info
Emerge -v --info

Description Loredan Stancu 2009-04-23 12:20:25 UTC
The following error occur when I try to update mysql from version 5.0.76 to  5.0.76-r1:


* 
 * ERROR: dev-db/mysql-5.0.76-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3878:  Called mysql_src_compile
 *             environment, line 3453:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";
 *  The die message:
 *   emake failed
 * 
 * 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/dev-db/mysql-5.0.76-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.0.76-r1/temp/environment'.


Reproducible: Always

Steps to Reproduce:
1. Try to make an update from mysql version 5.0.76 to mysql-5.0.76-r1 USE="static -berkdb -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -perl (-selinux) -ssl"
2.
3.
Comment 1 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-04-23 16:44:15 UTC
Please take a moment to read the "Gentoo Bug Reporting Guide" - http://www.gentoo.org/doc/en/bugzilla-howto.xml - available at the top of the Bugzilla page.
You also need to post the actual error and the output of emerge --info.
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-04-23 16:46:13 UTC
Please post the contents of '/var/tmp/portage/dev-db/mysql-5.0.76-r1/temp/build.log'.

@mysql:

USE="static -berkdb -big-tables -cluster -debug -embedded -extraengine -latin1
-max-idx-128 -minimal -perl (-selinux) -ssl"

Given the static use flag, I wonder if the shared lib patch might be breaking something for USE="static".
Comment 3 Loredan Stancu 2009-04-24 05:55:39 UTC
Created attachment 189290 [details]
/var/tmp/portage/dev-db/mysql-5.0.76-r1/temp/build.log
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-04-24 09:08:48 UTC
The eemrge is failing for (stripped a few more similar errors):

mv -f .deps/parse_output.Tpo .deps/parse_output.Po
/bin/sh ../../libtool --preserve-dup-deps --tag=CXX   --mode=link i686-pc-linux-gnu-g++  -DDBUG_OFF -O2 -march=i686 -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti  -Wl,-O1 -rdynamic  -o mysqlmanager command.o mysqlmanager.o manager.o log.o thread_registry.o listener.o protocol.o mysql_connection.o user_map.o messages.o commands.o instance.o instance_map.o instance_options.o buffer.o parse.o guardian.o parse_output.o liboptions.la libnet.la ../../vio/libvio.la ../../mysys/libmysys.la ../../strings/libmystrings.la ../../dbug/libdbug.la -lz -lpthread -lcrypt -lnsl -lm  -lpthread 
i686-pc-linux-gnu-g++ -DDBUG_OFF -O2 -march=i686 -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-implicit-templates -fno-exceptions -fno-rtti -Wl,-O1 -rdynamic -o mysqlmanager command.o mysqlmanager.o manager.o log.o thread_registry.o listener.o protocol.o mysql_connection.o user_map.o messages.o commands.o instance.o instance_map.o instance_options.o buffer.o parse.o guardian.o parse_output.o  ./.libs/liboptions.a -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/libmysql/.libs/libmysqlclient.a -lpthread -lpthread ./.libs/libnet.a -lpthread -lpthread -lpthread -lpthread ../../vio/.libs/libvio.a -lpthread -lpthread -lssl -lpthread -lpthread ../../mysys/.libs/libmysys.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread ../../strings/.libs/libmystrings.a -lpthread -lpthread -lpthread -lpthread ../../dbug/.libs/libdbug.a -lpthread -lpthread -lpthread -lpthread -lz -lpthread -lcrypt -lnsl -lm -lpthread  
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/libmysql/.libs/libmysqlclient.a(libmysql.o): In function `my_net_local_init':
libmysql.c:(.text+0x5080): multiple definition of `my_net_local_init'
mysql_connection.o:mysql_connection.cc:(.text+0x4e0): first defined here
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/libmysql/.libs/libmysqlclient.a(libmysql.o):(.data+0x0): multiple definition of `net_buffer_length'
./.libs/liboptions.a(liboptions_la-priv.o):(.data+0x0): first defined here
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/libmysql/.libs/libmysqlclient.a(libmysql.o):(.data+0x4): multiple definition of `max_allowed_packet'
./.libs/liboptions.a(liboptions_la-priv.o):(.data+0x4): first defined here
../../mysys/.libs/libmysys.a(strings-x86.o): In function `bmove_upp':
strings.s:(.text+0x2f): multiple definition of `bmove_upp'

Relevant section of the 0204*patch
--------------------------------------
--- mysql-5.0.76-old/server-tools/instance-manager/Makefile.am  2009-01-15 16:48:07.000000000 -0100
+++ mysql-5.0.76/server-tools/instance-manager/Makefile.am      2009-04-11 22:44:01.000000000 +0000
@@ -24,8 +24,7 @@
 # default_options.h, generated from default_options.h.in)
 # See automake/autoconf docs for details

-noinst_LTLIBRARIES= liboptions.la
-noinst_LIBRARIES=   libnet.a
+noinst_LTLIBRARIES= liboptions.la libnet.la

 liboptions_la_CXXFLAGS= $(CXXFLAGS) \
        -DDEFAULT_PID_FILE_NAME="$(localstatedir)/mysqlmanager.pid" \
@@ -37,17 +36,17 @@
        -DPROTOCOL_VERSION=@PROTOCOL_VERSION@

 liboptions_la_SOURCES= options.h options.cc priv.h priv.cc
-liboptions_la_LIBADD= $(top_builddir)/libmysql/get_password.lo
+
+liboptions_la_LIBADD= $(top_builddir)/libmysql/libmysqlclient.la

 # MySQL sometimes uses symlinks to reuse code
 # All symlinked files are grouped in libnet.a

-nodist_libnet_a_SOURCES= net_serv.cc client_settings.h
-libnet_a_LIBADD= $(top_builddir)/sql/password.$(OBJEXT) \
-       $(top_builddir)/sql/pack.$(OBJEXT) \
-       $(top_builddir)/sql/sql_state.$(OBJEXT) \
-       $(top_builddir)/sql/mini_client_errors.$(OBJEXT)\
-       $(top_builddir)/sql/client.$(OBJEXT)
+nodist_libnet_la_SOURCES= net_serv.cc client_settings.h \
+       $(srcdir)/../../sql/password.c $(srcdir)/../../sql/pack.c \
+       $(srcdir)/../../sql/sql_state.c $(srcdir)/../../sql/mini_client_errors.c \
+       $(srcdir)/../../sql/client.c
+

 CLEANFILES= net_serv.cc client_settings.h

@@ -79,11 +78,11 @@
                         portability.h

 mysqlmanager_LDADD=    liboptions.la \
-                       libnet.a \
-                       $(top_builddir)/vio/libvio.a \
-                       $(top_builddir)/mysys/libmysys.a \
-                       $(top_builddir)/strings/libmystrings.a \
-                       $(top_builddir)/dbug/libdbug.a \
+                       libnet.la \
+                       $(top_builddir)/vio/libvio.la \
+                       $(top_builddir)/mysys/libmysys.la \
+                       $(top_builddir)/strings/libmystrings.la \
+                       $(top_builddir)/dbug/libdbug.la \
                        @openssl_libs@ @yassl_libs@ @ZLIB_LIBS@
--------------------------------------

Diego, are the errors caused by the LDADD list for mysqlmanager?
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-05-06 01:21:12 UTC
I need your full emerge -v --info.
Comment 6 Loredan Stancu 2009-05-06 07:45:11 UTC
Created attachment 190474 [details]
This file contains the output of emerge -v --info
Comment 7 Detlev Casanova 2009-06-06 15:51:18 UTC
I don't know if it is the same bug but with the same mysql version, I get this error :

mv -f .deps/mysql.Tpo .deps/mysql.Po                                                                                                                                                          
/bin/sh ../../libtool --preserve-dup-deps --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++  -DDBUG_OFF -O2 -pipe -DPIC -fPIC -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti  -Wl,-O1 -rdynamic  -o mysql mysql.o readline.o completion_hash.o -lreadline -lncurses -all-static ../libmysqld.la -lrt    -lpthread -lcrypt -lnsl -lm  -lpthread   -lcrypt -lnsl -lm   -lz                                                                                          
x86_64-pc-linux-gnu-g++ -DDBUG_OFF -O2 -pipe -DPIC -fPIC -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-implicit-templates -fno-exceptions -fno-rtti -Wl,-O1 -rdynamic -o mysqltest_embedded mysqltest.o -static  ../.libs/libmysqld.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/heap/.libs/libheap.a -lpthread -lpthread -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/innobase/.libs/libinnobase.a /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/mysys/.libs/libmysys.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/vio/.libs/libvio.a -lpthread -lpthread -lssl -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lcrypt -lnsl -lpthread -lrt ../../regex/.libs/libregex.a -lpthread -lpthread -lpthread -lcrypt -lnsl -lm -lpthread -lpthread -lcrypt -lnsl -lm -lpthread -lcrypt -lnsl -lm -lz                                                                                                                                                             
x86_64-pc-linux-gnu-g++ -DDBUG_OFF -O2 -pipe -DPIC -fPIC -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-implicit-templates -fno-exceptions -fno-rtti -Wl,-O1 -rdynamic -o mysql mysql.o readline.o completion_hash.o -static  -lreadline -lncurses ../.libs/libmysqld.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/heap/.libs/libheap.a -lpthread -lpthread -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/innobase/.libs/libinnobase.a /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/mysys/.libs/libmysys.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread /var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/vio/.libs/libvio.a -lpthread -lpthread -lssl -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lcrypt -lnsl -lpthread -lrt -lpthread -lcrypt -lnsl -lm -lpthread -lcrypt -lnsl -lm -lz                     
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':                                                            
(.text+0x13d5): warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                                  
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/libreadline.a(tilde.o): In function `tilde_expand_word':                                                                             
(.text+0x1d2): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                                   
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/libreadline.a(shell.o): In function `sh_get_home_dir':                                                                               
(.text+0x4c): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                                    
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':                                                            
(.text+0x13d0): warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                                  
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':                                                            
(.text+0x1467): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                                  
../.libs/libmysqld.a(hostname.o): In function `ip_to_hostname(in_addr*, unsigned int*)':                                                                                                      
hostname.cc:(.text+0x5aa): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                  
../.libs/libmysqld.a(lib_sql.o): In function `get_one_option(int, my_option const*, char*)':                                                                                                  
lib_sql.cc:(.text+0x2c93): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                  
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/mysys/.libs/libmysys.a(my_gethostbyname.o): In function `my_gethostbyname_r':                                                              
my_gethostbyname.c:(.text+0x10): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking          
../.libs/libmysqld.a(lib_sql.o): In function `init_embedded_server':                                                                                                                          
lib_sql.cc:(.text+0x4f74): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                  
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/vio/.libs/libvio.a(viosocket.o): In function `vio_peer_addr':                                                                              
viosocket.c:(.text+0x237): undefined reference to `my_inet_ntoa'                                                                                                                              
collect2: ld returned 1 exit status                                                                                                                                                           
make[3]: *** [mysql] Error 1                                                                                                                                                                  
make[3]: *** Waiting for unfinished jobs....                                                                                                                                                  
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/mysys/.libs/libmysys.a(mf_pack.o): In function `unpack_dirname':                                                                           
mf_pack.c:(.text+0x655): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                         
../.libs/libmysqld.a(libmysql.o): In function `read_user_name':                                                                                                                               
libmysql.c:(.text+0x5908): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                       
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/mysys/.libs/libmysys.a(mf_pack.o): In function `unpack_dirname':                                                                           
mf_pack.c:(.text+0x660): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                         
../.libs/libmysqld.a(hostname.o): In function `ip_to_hostname(in_addr*, unsigned int*)':                                                                                                      
hostname.cc:(.text+0x5aa): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                  
../.libs/libmysqld.a(lib_sql.o): In function `get_one_option(int, my_option const*, char*)':                                                                                                  
lib_sql.cc:(.text+0x2c93): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                  
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/mysys/.libs/libmysys.a(my_gethostbyname.o): In function `my_gethostbyname_r':                                                              
my_gethostbyname.c:(.text+0x10): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking          
../.libs/libmysqld.a(lib_sql.o): In function `init_embedded_server':                                                                                                                          
lib_sql.cc:(.text+0x4f74): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking                  
/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/vio/.libs/libvio.a(viosocket.o): In function `vio_peer_addr':                                                                              
viosocket.c:(.text+0x237): undefined reference to `my_inet_ntoa'                                                                                                                              
collect2: ld returned 1 exit status                                                                                                                                                           
make[3]: *** [mysqltest_embedded] Error 1
mv -f .deps/mysql_client_test.Tpo .deps/mysql_client_test.Po
make[3]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/libmysqld/examples'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql/libmysqld'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-db/mysql-5.0.76-r1/work/mysql'
make: *** [all] Error 2
 *
 * ERROR: dev-db/mysql-5.0.76-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4022:  Called mysql_src_compile
 *             environment, line 3588:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";
 *  The die message:
 *   emake failed
 *
 * 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/dev-db/mysql-5.0.76-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.0.76-r1/temp/environment'.
 *


With emerge --info attached

and emerge -pv mysql :
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] dev-db/mysql-5.0.76-r1 [5.0.76] USE="berkdb embedded latin1 perl static -big-tables -cluster -debug -extraengine -max-idx-128 -minimal (-selinux) -ssl" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB
Comment 8 Detlev Casanova 2009-06-06 15:53:21 UTC
Created attachment 193736 [details]
Emerge -v --info
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-06 18:31:31 UTC
jmbsvicetto: it's definetly the patch combined with USE=static, I don't know how to solve it :-(.
Comment 10 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2009-07-08 11:06:28 UTC
I'll try looking at the patch again.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-01 01:44:00 UTC
detlev: please retest w/ 5.0.90-r1.
Comment 12 Detlev Casanova 2010-02-01 11:29:53 UTC
(In reply to comment #11)
> detlev: please retest w/ 5.0.90-r1.
> 

dev-db/mysql-5.0.90-r1 is currently installed on my machine.