Bug #17155 build of 5.0.18 fails
Submitted: 6 Feb 2006 14:41 Modified: 3 Mar 2006 2:21
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.18 OS:Linux (Linux)
Assigned to: Kent Boortz CPU Architecture:Any

[6 Feb 2006 14:41] [ name withheld ]
Description:
make aborts with the following message:

make[3]: Entering directory `/usr/src2/mysql-5.0.18/.obj/server-tools/instance-manager'
make[3]: *** No rule to make target `../../libmysql/get_password.o', needed by `liboptions.a'.  Stop.

How to repeat:
I tried to build mysql. Created .obj subdir
and then did this:

../configure \
--prefix=/usr/app/mysql-5.0.18			\
--exec-prefix=/usr/app/mysql-5.0.18		\
--bindir=/usr/bin				\
--sbindir=/usr/sbin				\
--libexecdir=/usr/app/mysql-5.0.18/libexec	\
--datadir=/usr/app/mysql-5.0.18/share		\
--sysconfdir=/etc				\
--sharedstatedir=/usr/app/mysql-5.0.18/var/com	\
--localstatedir=/usr/app/mysql-5.0.18/var	\
--libdir=/usr/app/mysql-5.0.18/lib		\
--includedir=/usr/include			\
--infodir=/usr/info				\
--mandir=/usr/man				\
\
--oldincludedir=/usr/include			\
\
--build=i386-pc-linux-gnu			\
--disable-rpath					\
--disable-nls					\
\
--disable-static				\
\
2>&1 | tee !cfg.log

It ran ok.

Subsequent make ends with:
...
make[2]: Leaving directory `/usr/src2/mysql-5.0.18/.obj/support-files'
Making all in server-tools
make[2]: Entering directory `/usr/src2/mysql-5.0.18/.obj/server-tools'
Making all in instance-manager
make[3]: Entering directory `/usr/src2/mysql-5.0.18/.obj/server-tools/instance-manager'
make[3]: *** No rule to make target `../../libmysql/get_password.o', needed by `liboptions.a'.  Stop.
make[3]: Leaving directory `/usr/src2/mysql-5.0.18/.obj/server-tools/instance-manager'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src2/mysql-5.0.18/.obj/server-tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src2/mysql-5.0.18/.obj'
make: *** [all] Error 2

/usr/src2/mysql-5.0.18/.obj/libmysql dir indeed seems to have
a problem with get_password. Note lack of get_password.c -> ...
symlink below:

# ls -l /usr/src2/mysql-5.0.18/.obj/libmysql/
total 536
...
lrwxrwxrwx  1 root root    17 Jan 30 16:02 dbug.c -> ..
[6 Feb 2006 14:50] [ name withheld ]
[Internet ate the tail of the report. Here you go]

/usr/src2/mysql-5.0.18/.obj/libmysql dir indeed seems to have
a problem with get_password. Note lack of get_password.c -> ...
symlink below:

# ls -l /usr/src2/mysql-5.0.18/.obj/libmysql/
total 536
...
lrwxrwxrwx  1 root root    17 Jan 30 16:02 dbug.c -> ../../dbug/dbug.c
-rw-r--r--  1 root root   297 Jan 30 16:56 dbug.lo
lrwxrwxrwx  1 root root    21 Jan 30 16:02 default.c -> ../../mysys/default.c
-rw-r--r--  1 root root   303 Jan 30 16:51 default.lo
lrwxrwxrwx  1 root root    28 Jan 30 16:02 default_modify.c -> ../../mysys/default_modify.c
-rw-r--r--  1 root root   317 Jan 30 16:51 default_modify.lo
-rw-r--r--  1 root root   301 Jan 30 16:48 errmsg.lo
lrwxrwxrwx  1 root root    20 Jan 30 16:02 errors.c -> ../../mysys/errors.c
-rw-r--r--  1 root root   301 Jan 30 16:49 errors.lo
-rw-r--r--  1 root root   313 Jan 30 16:48 get_password.lo
lrwxrwxrwx  1 root root    18 Jan 30 16:02 hash.c -> ../../mysys/hash.c
-rw-r--r--  1 root root   297 Jan 30 16:51 hash.lo
lrwxrwxrwx  1 root root    23 Jan 30 16:02 int2str.c -> ../../strings/int2str.c
-rw-r--r--  1 root root   303 Jan 30 16:53 int2str.lo
lrwxrwxrwx  1 root root    25 Jan 30 16:02 is_prefix.c -> ../../strings/is_prefix.c
-rw-r--r--  1 root root   307 Jan 30 16:53 is_prefix.lo
...

Retested by buinding directly in source tree (not in a subdir).
Does not work either.
[6 Feb 2006 14:53] Valeriy Kravchuk
Thank you for a problem report. Please, send the results of the following commands from your system:

uname -a
cat /etc/issue
gcc -v

Why did you created that .obj directory explicitely? It is not needed to build MySQL successfully.
[6 Feb 2006 15:02] [ name withheld ]
bash-3.00# uname -a
Linux firebird 2.6.15 #1 SMP Sat Jan 7 20:20:55 EET 2006 i686 unknown unknown GNU/Linux

# cat /etc/issue
Welcome to Linux 2.6.15.

# gcc -v
Using built-in specs.
Target: i386-pc-linux-gnu
Configured with: ../gcc-4.0.0.src/configure --prefix=/usr/app/gcc-4.0.0 --exec-prefix=/usr/app/gcc-4.0.0 --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/app/gcc-4.0.0/libexec --datadir=/usr/app/gcc-4.0.0/share --sysconfdir=/etc --sharedstatedir=/usr/app/gcc-4.0.0/var/com --localstatedir=/usr/app/gcc-4.0.0/var --libdir=/usr/lib --includedir=/usr/include --infodir=/usr/info --mandir=/usr/man --with-slibdir=/usr/app/gcc-4.0.0/lib --with-local-prefix=/usr/local --with-gxx-include-dir=/usr/app/gcc-4.0.0/include/g++-v3 --enable-languages=c,c++ --with-system-zlib --disable-nls --enable-threads=posix i386-pc-linux-gnu
Thread model: posix
gcc version 4.0.0

>Why did you created that .obj directory explicitely?

It's a common practice to have build directory separate from source. Some projects do have bugs in this area and want configure/make to be done in top
level dir of source tree, and I usually do that if building in subdir fails.
However, mysql 5.0.18 won't build in top level dir of source tree too. :(
[12 Feb 2006 15:46] Valeriy Kravchuk
Verified just as described on our quadxeon:

if g++ -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER -I. -I../../../server-tools/instance-manager -I../.. -I../../../zlib -I../../../include -I../../include   -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti -DDEFAULT_PID_FILE_NAME="/users/vkravchuk/dbs/5.0-quad/var/mysqlmanager.pid" -DDEFAULT_LOG_FILE_NAME="/users/vkravchuk/dbs/5.0-quad/var/mysqlmanager.log" -DDEFAULT_SOCKET_FILE_NAME="/tmp/mysqlmanager.sock" -DDEFAULT_PASSWORD_FILE_NAME="/users/vkravchuk/dbs/5.0-quad/etc/mysqlmanager.passwd" -DDEFAULT_MYSQLD_PATH="/users/vkravchuk/dbs/5.0-quad/libexec/mysqld" -DDEFAULT_MONITORING_INTERVAL="20" -DDEFAULT_PORT="2273" -DDEFAULT_CONFIG_FILE="/etc/my.cnf" -DPROTOCOL_VERSION=10 -O3 -DDBUG_OFF    -fno-implicit-templates -fno-exceptions -fno-rtti -MT liboptions_a-priv.o -MD -MP -MF
".deps/liboptions_a-priv.Tpo" -c -o liboptions_a-priv.o `test -f 'priv.cc' || ec
ho '../../../server-tools/instance-manager/'`priv.cc; \
then mv -f ".deps/liboptions_a-priv.Tpo" ".deps/liboptions_a-priv.Po"; else rm -
f ".deps/liboptions_a-priv.Tpo"; exit 1; fi
make[3]: *** No rule to make target `../../libmysql/get_password.o', needed by `
liboptions.a'.  Stop.
make[3]: Leaving directory `/users/vkravchuk/mysql-5.0.18/.obj/server-tools/inst
ance-manager'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/users/vkravchuk/mysql-5.0.18/.obj/server-tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users/vkravchuk/mysql-5.0.18/.obj'
make: *** [all] Error 2
vkravchuk@quadxeon .obj $ uname -a
Linux quadxeon.mysql.com 2.4.21-15.ELsmp #1 SMP Wed Jun 2 00:59:03 CEST 2004 i686 i686 i386 GNU/Linux
vkravchuk@quadxeon .obj $ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)

I used the following simplified configure:

../configure --prefix=/users/vkravchuk/dbs/5.0-quad --disable-rpath --disable-nls --disable-static

Looks like one of these --disable-* options is the reason. Wihout them it compiled and worked OK.
[3 Mar 2006 2:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/3412
[3 Mar 2006 2:21] Kent Boortz
Correction will be in 5.0.19