Bug #10638 | libmysqlclient_r not built with -fno-common | ||
---|---|---|---|
Submitted: | 14 May 2005 5:11 | Modified: | 19 Jul 2005 23:19 |
Reporter: | Tyler Retzlaff | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Packaging | Severity: | S2 (Serious) |
Version: | 4.0 | OS: | MacOS (Mac OS X 10.3) |
Assigned to: | Matt Wagner | CPU Architecture: | Any |
[14 May 2005 5:11]
Tyler Retzlaff
[1 Jun 2005 19:21]
Matthew Lord
I verified the problem on this machine: Darwin silverbullet 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc gcc -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1495) I ran into the same problem with our standard binaries. I recompiled this way: CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer -fno-common" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -fno-common" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-comment="Official MySQL-standard binary" --with-extra-charsets=complex --with-server-suffix="-standard" --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb And I was successful. Notice the only thing I added was "-fno-common" to the CFLAGS and CXXFLAGS. I will attach test.c. The way I tested was this: gcc -c -fPIC -DPIC -I/usr/local/mysql-standard-4.0.24-apple-darwin7.9.0-powerpc/include test.c gcc -dynamiclib -L/usr/local/mysql-standard-4.0.24-apple-darwin7.9.0-powerpc/lib -o libmylib.dylib test.o -lmysqlclient_r -lz -lm The standard binaries were installed in here so you can change the paths above to test with them: /usr/local/mysql-standard-4.0.24-apple-darwin7.7.0-powerpc
[19 Jul 2005 20:53]
Matt Wagner
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/ Additional info: We've added -fno-common to the CFLAGS and CXXFLAGS when building on OS X to fix this problem. The 4.1.13 binaries are the first published binaries with this flag added. 4.0 will be fixed with the next release. Thank you!
[19 Jul 2005 23:19]
Paul DuBois
Noted in 4.0.25, 4.1.13 changelogs.