Bug #33958 A configure.in bug in 5.1.23
Submitted: 21 Jan 2008 13:25 Modified: 29 Jan 2008 20:57
Reporter: SINISA MILIVOJEVIC Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1 OS:Linux
Assigned to: Timothy Smith CPU Architecture:Any

[21 Jan 2008 13:25] SINISA MILIVOJEVIC
Description:
> In the recent Bit Keeper version of 5.1 (or may be which will be in 5.1.23); there is a change in the configure.in, which does not ignore the usual warnings when checking for a support of a perticular feature....this was working fine in earlier releases till 5.1.22..

How to repeat:
Here is the config.log output for -fPIC support in the latest 5.1.23:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure:8146: checking for /usr/bin/gcc option to produce PIC
configure:8323: result: -fPIC
configure:8331: checking if /usr/bin/gcc PIC flag -fPIC works
configure:8349: /usr/bin/gcc -c -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE  -g -O2 -Wall -pipe -MD -DLINUX -D_GNU_SOURCE -D_THREAD_SAFE -DUSE_STD_YUTSTRING -DNO_FACTORY -I/home/y/include -I../../../.. -I../../../../libraries -Wl,-rpath,/home/y/lib64 -L/home/y/lib64 -lbsd-compat    -fPIC -DPIC conftest.c >&5
gcc: -rpath: linker input file unused because linking not done
gcc: /home/y/lib64: linker input file unused because linking not done
gcc: -lbsd-compat: linker input file unused because linking not done
configure:8353: $? = 0
configure:8364: result: no
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
and here is how the 5.1.22 used to work..

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure:8211: checking for /usr/bin/gcc option to produce PIC
configure:8421: result: -fPIC
configure:8429: checking if /usr/bin/gcc PIC flag -fPIC works
configure:8447: /usr/bin/gcc -c -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE  -g -O2 -Wall -pipe -MD -DLINUX -D_GNU_SOURCE -D_THREAD_SAFE -DUSE_STD_YUTSTRING -DNO_FACTORY -I/home/y/include -I../../../.. -I../../../../libraries -Wl,-rpath,/home/y/lib64 -L/home/y/lib64 -lbsd-compat    -fPIC -DPIC conftest.c >&5
gcc: -rpath: linker input file unused because linking not done
gcc: /home/y/lib64: linker input file unused because linking not done
gcc: -lbsd-compat: linker input file unused because linking not done
configure:8451: $? = 0
configure:8464: result: yes
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The only difference is 'skipping the warnings' in the new version; which makes it feature as 'UN SUPPORTED'.

Suggested fix:
1. Revert the changes in configure.in to have checks on usual warnings, so that it can skip it as it was in earlier versions.. or
2. Fix the new configure.in not to include linker flags during the compile only stage(-c) of verification ..(in the above case rpath and -l is not needed when using -c) or
3. Fix not to pass -Wall flag in configure.in (which is not a recommended way)...
[23 Jan 2008 16:33] Daniel Fischer
This check is part of libtool, and not of MySQL. It works in all our recent internal 5.1 builds. Please verify that the same version of libtool was used.
[28 Jan 2008 21:18] Venu Anuganti
I tried with 1.5.24 and the same results; means it does not eliminate the warnings.

Here is the libtool version:
ltmain.sh (GNU libtool) 1.5.24 (1.1220.2.455 2007/06/24 02:13:29)
[29 Jan 2008 20:57] Timothy Smith
Venu,

Hi!

I'm unable to repeat this, still.  I tried on a FreeBSD 6.0 amd64 host:

FreeBSD bsd60-64 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Wed Nov  2 19:07:38 UTC 2005     root@rat.samsco.home:/usr/obj/usr/src/sys/GENERIC  amd64

Using libtool 1.5.18 (from ports):

mysqldev@bsd60-64$ libtool --version
ltmain.sh (GNU libtool) 1.5.18 (1.1220.2.245 2005/05/16 08:55:27)

I ran a simple './configure' (I'm not sure exactly how you're calling configure, this may be a crucial detail in sorting out what's happening):

mysqldev@bsd60-64$ ./configure
checking build system type... x86_64-unknown-freebsd6.0
checking host system type... x86_64-unknown-freebsd6.0
checking target system type... x86_64-unknown-freebsd6.0
...
checking "C Compiler version"... "gcc gcc (GCC) 3.4.4 [FreeBSD] 20050518"
checking "C++ compiler version"... "g++ g++ (GCC) 3.4.4 [FreeBSD] 20050518"
...
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes

Inside config.log, I see:

configure:8221: checking for gcc option to produce PIC
configure:8431: result: -fPIC
configure:8439: checking if gcc PIC flag -fPIC works
configure:8457: gcc -c     -fPIC -DPIC conftest.c >&5
configure:8461: $? = 0
configure:8474: result: yes

I'll follow up via your Support contract to ask for specific details which hopefully will narrow down the problem.

Regards,

Timothy