Bug #18154 | Compile problem on FreeBSD | ||
---|---|---|---|
Submitted: | 11 Mar 2006 14:23 | Modified: | 15 Jul 2006 15:04 |
Reporter: | Tim Bishop | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.22, 5.0.18 | OS: | FreeBSD (FreeBSD 5.2.1) |
Assigned to: | CPU Architecture: | Any |
[11 Mar 2006 14:23]
Tim Bishop
[13 Mar 2006 15:28]
Valeriy Kravchuk
Thank you for a problem report. Can you, please, try to find out the real configure command line used by that FreeBSD port?
[13 Mar 2006 15:37]
Tim Bishop
The configure command (taken from the top of config.log) is: ./configure --localstatedir=/var/db/mysql --without-debug --without-readline --without-libedit --without-bench --without-extra-tools --with-libwrap --with-mysqlfs --with-low-memory --with-comment=FreeBSD port: mysql-client-5.0.18_1 --enable-thread-safe-client --enable-assembler --with-berkeley-db --with-named-thread-libs=-lc_r --without-server --prefix=/usr/local --build=i386-portbld-freebsd5.2.1
[22 Apr 2006 15:09]
Valeriy Kravchuk
Sorry for a long delay with this report. Please, try to repeat with a newer version, 5.0.20a and, if possible, on FreeBSD 5.3 or 5.4. We have no 5.2.1 available for testing.
[11 May 2006 19:09]
Tim Bishop
I can confirm the problem still happens with 5.0.21. And I can also confirm the fix/workaround I suggested still works.
[11 Jun 2006 13:32]
Valeriy Kravchuk
Sorry for a long delay with this bug. I had spent some time trying to repeat on FreeBSD 5.4 (but that machine is not working properly anyway). Then I moved to FreeBSD 6.0. I was able to build 5.0.22 without any error messages (and your workaround applied) using: ./configure --prefix=/home/mysqldev/valeriy/dbs/5.0 --without-debug --without-readline --without-libedit --without-bench --without-extra-tool --enable-thread-safe-client --enable-assembler --with-pic --disable-shared --without-server make clean; make (the difference is --with-pic --disable-shared added and --with-named-thread-libs=-lc_r removed). mysqldev@bsd60$ uname -a FreeBSD bsd60.mysql.com 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 mysqldev@bsd60$ gcc --version gcc (GCC) 3.4.4 [FreeBSD] 20050518 Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Please, check, is this configure command line works for you.
[21 Jun 2006 13:29]
Tim Bishop
Sorry for the delayed reponse. I'm not sure what you're asking me to do. What do you want me to test those configure flags with? 5.0.22 with my change? or just vanilla 5.0.22?
[22 Jun 2006 10:34]
Valeriy Kravchuk
Please, test with vanilla 5.0.22 on your FreeBSD 5.2.1, without your change. Inform about the results.
[22 Jun 2006 13:45]
Tim Bishop
5.0.22 compiles fine with those compile options.
[23 Jun 2006 10:19]
Valeriy Kravchuk
So, last version, 5.0.22, does not have this problem.
[23 Jun 2006 10:42]
Tim Bishop
5.0.22 has exactly the same problem, and still requires the fix. However, you suggested different configure flags which worked around the problem.
[25 Jun 2006 19:21]
Kent Boortz
This looks like a problem with libtool and FreeBSD. The "-lc_r" passed by the port system in PTHREAD_LIBS is removed by libtool. But as configure did detect thread support, this means that the source is compiled to use threads, but linked with a non thread safe libc. The reason you can see this for one of several compiles only, is likely because of slightly different FreeBSD 5.0 version. Looking in "/usr/ports/Mk/bsd.port.mk" there seems to be some back and forth about using the newer kernel thread support or not .if ${OSVERSION} < 500016 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -pthread .elif ${OSVERSION} < 502102 PTHREAD_CFLAGS?= -D_THREAD_SAFE PTHREAD_LIBS?= -lc_r .else PTHREAD_CFLAGS?= PTHREAD_LIBS?= -pthread .endif I can reproduce the problem on FreeBSD 6.0 if forcing PTHREAD_LIBS to "-lc_r" % cd /usr/ports/databases/mysql50-server % make PTHREAD_LIBS=-lc_r Both these lines to build passes the failing point % make PTHREAD_LIBS=-lpthread % make LDFLAGS=-pthread PTHREAD_LIBS=no The second one is likely the "safest" for the FreeBSD version you see the problem (but if the port triggers other port builds and PTHREAD_LIBS is passed down to these builds, it will likely break). Could not 100% verify the solutions as I don't have access to the exact version of FreeBSD that shows this problem.
[6 Jul 2006 7:46]
Tim Bishop
Ok, I'm happy about the issues with threading libraries and FreeBSD. I don't think we need to worry too much about whether MySQL builds on the now obselete FreeBSD 5.2.1. But, I'd like to know if that additional entry in sql/share/errmsg.txt for japanese-sjis is a mistake or not? My gut feeling at the beginning was that it shouldn't have been there. Either way, after that's been looked at, feel free to close this bug.
[15 Jul 2006 15:04]
Valeriy Kravchuk
japanese-sjis is a valid separate locale supported on all platforms. So, it should be in that errmsg.txt file.