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

Bug 239398

Summary: dev-db/mysql-5.0.60-r1 - when mysql build static, php needs build with -lmygcc
Product: Gentoo Linux Reporter: Vasiliy Tolstov <v.tolstov>
Component: New packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: mysql-5.0.70-r1 config log (sparc64 machine)

Description Vasiliy Tolstov 2008-10-03 05:42:14 UTC
http://bugs.php.net/bug.php?id=39122

mysql use flags  dev-db/mysql-5.0.60-r1  USE="max-idx-128 static -berkdb -big-tables -cluster -debug -embedded -extraengine -latin1 -minimal -perl (-selinux) -ssl" 0 kB

php use flags dev-lang/php-5.2.6-r7  USE="bcmath bzip2 cgi cli crypt ctype curl curlwrappers exif flatfile force-cgi-redirect fpm ftp gd iconv imap inifile ipv6 json libedit mysql mysqli nls pcntl pcre pdo posix reflection session sharedext simplexml snmp soap sockets spl sqlite ssl suhosin threads tidy truetype unicode wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib -adabas -apache2 -berkdb* -birdstep -calendar -cdb -cjk -concurrentmodphp -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -filter -firebird -frontbase -gd-external -gdbm* -gmp -hash -interbase -iodbc (-java-external) -kerberos -kolab -ldap -ldap-sasl -mcve -mhash -msql -mssql -ncurses* -oci8 -oci8-instant-client -odbc -pic -postgres -qdbm -readline -recode -sapdb -sharedmem -solid -spell* -sybase -sybase-ct -sysvipc* -tokenizer -xpm -yaz -zip-external"
Comment 1 Vasiliy Tolstov 2008-10-03 05:42:59 UTC
checking for MySQL UNIX socket location... /var/run/mysqld/mysqld.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
Comment 2 Vasiliy Tolstov 2008-10-03 07:20:04 UTC
solution is:

ln -s `gcc --print-libgcc-filelibgcc-file`  /usr/lib/mysql/libmygcc.a
Comment 3 Vasiliy Tolstov 2008-10-03 07:20:35 UTC
(In reply to comment #2)
> solution is:
> 
> ln -s `gcc --print-libgcc-filelibgcc-file`  /usr/lib/mysql/libmygcc.a
> 

ln -s `gcc --print-libgcc-file`  /usr/lib/mysql/libmygcc.a
Comment 4 Vasiliy Tolstov 2008-10-03 07:21:54 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > solution is:
> 
> ln -s `gcc --print-libgcc-file`  /usr/lib/mysql/libmygcc.a
> 

another way - modify mysql_config bacouse output os this files is used for compiling php
Comment 5 Vasiliy Tolstov 2008-10-03 07:44:35 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > solution is:
> > 
> > ln -s `gcc --print-libgcc-file`  /usr/lib/mysql/libmygcc.a
> > 
> 
> another way - modify mysql_config bacouse output os this files is used for
> compiling php
> 

hmmm also mysql-5.0.60-r1 does not create symlink for /usr/lib/libmysqlclient.so.15 to /usr/lib/libmysqlclient.so and for
/usr/lib/libmysqlclient_r.so.15 /usr/lib/libmysqlclient_r.so

Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-03 14:26:17 UTC
So generally USE=static for dev-db/mysql doesn't work in dev-lang/php?
Comment 7 Vasiliy Tolstov 2008-10-03 16:19:18 UTC
(In reply to comment #6)
> So generally USE=static for dev-db/mysql doesn't work in dev-lang/php?
> 

sorry, this is my mistake. all ok, but i create symlink that is write before.

i need to remove php, and emerge it again to work, bacouse libmysqlclient that instals php does not ok (it shared, but new version is static)
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-11-14 01:43:26 UTC
Queued for dev-db/mysql-5.0.70-r1
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-11 09:43:58 UTC
The file you mention: /usr/lib/mysql/libmygcc.a
does not exist on my systems with USE=static mysql.

Please repeat your test with mysql-5.0.76 (in portage shortly), and attach the config.log this time!
Comment 10 Vasiliy Tolstov 2009-02-19 15:24:08 UTC
(In reply to comment #9)
> The file you mention: /usr/lib/mysql/libmygcc.a
> does not exist on my systems with USE=static mysql.
> 
> Please repeat your test with mysql-5.0.76 (in portage shortly), and attach the
> config.log this time!
> 

Hmm. All ok now.
Comment 11 Vasiliy Tolstov 2009-02-19 15:25:03 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > The file you mention: /usr/lib/mysql/libmygcc.a
> > does not exist on my systems with USE=static mysql.
> > 
> > Please repeat your test with mysql-5.0.76 (in portage shortly), and attach the
> > config.log this time!
> > 
> 
> Hmm. All ok now.
> 

File is absent, but all compiles fine.

Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-19 23:22:03 UTC
Yeah, not sure where the old problem was. mygcc is a very old thing.
Comment 13 Mike Wolff 2009-08-11 16:53:54 UTC
Created attachment 200942 [details]
mysql-5.0.70-r1 config log (sparc64 machine)

Looks like problems when compiling conftest.cpp in my case (while configure is still running). I need to doublecheck, but I believe the issue may simply be a missing '-' prefix before the "mtune=ultrasparc" option is specified:

configure:41749: sparc-unknown-linux-gnu-g++ -c  -DDBUG_OFF -O2 -mcpu=ultrasparc mtune=ultrasparc -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates   -fno-implicit-templates -fno-exceptions -fno-rtti  conftest.cpp >&5
sparc-unknown-linux-gnu-g++: mtune=ultrasparc: No such file or directory
conftest.cpp: In function 'int main()':
conftest.cpp:319: error: 'HIST_ENTRY' was not declared in this scope
conftest.cpp:319: error: expected `;' before 'entry'
configure:41756: $? = 1
configure: failed program was:
| /* confdefs.h.  */
...

More details available in the config.log file - let me know if there's anything else you would like collected from this system.
Comment 14 Mike Wolff 2009-08-11 16:56:22 UTC
Ok, please disregard my last. It appears that my "mtune" option was missing the prepending '-' for my CXXFLAGS line on make.conf. Sorry for the confusion, this error appears to be self-inflicted :-/