Bug #395 Failed to compile source code for 5.0
Submitted: 8 May 2003 4:04 Modified: 9 Aug 2004 14:45
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:5.0 OS:Linux (RedHat linux 7.2)
Assigned to: Lenz Grimmer CPU Architecture:Any

[8 May 2003 4:04] [ name withheld ]
Description:
Failed to compile source code for 5.0.

I believe I have the recommended GNU tools:
[root@beer]# rpm -q make
make-3.79.1-8
[root@beer]# rpm -q autoconf
autoconf-2.53-8
[root@beer]# rpm -q automake
automake-1.6.3-1
[root@beer]# rpm -q libtool 
libtool-1.4-8
[root@beer]# rpm -q gcc
gcc-2.96-98

The configure line:
./configure --prefix=/usr/local/mysql5 --with-tcp-port=4306 --with-unix-socket-path=/tmp/mysql5.sock

Then make, which ends like this:
[...]
*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
gcc -shared  libmysql.lo password.lo manager.lo get_password.lo errmsg.lo my_init.lo my_static.lo my_malloc.lo my_realloc.lo my_create.lo my_delete.lo mf_tempfile.lo my_open.lo my_read.lo my_write.lo errors.lo my_error.lo my_getwd.lo my_div.lo mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo my_symlink.lo my_fstream.lo mf_loadpath.lo my_pthread.lo my_thr_init.lo thr_mutex.lo mulalloc.lo string.lo default.lo my_compress.lo array.lo my_once.lo list.lo my_net.lo charset.lo hash.lo mf_iocache.lo mf_iocache2.lo my_seek.lo my_sleep.lo my_pread.lo mf_cache.lo md5.lo sha1.lo my_getopt.lo my_gethostbyname.lo my_port.lo my_lib.lo strmov.lo strxmov.lo strxnmov.lo strnmov.lo strmake.lo strend.lo strnlen.lo strfill.lo is_prefix.lo int2str.lo str2int.lo strinstr.lo strcont.lo strcend.lo bcmp.lo ctype-latin1.lo bchange.lo bmove.lo bmove_upp.lo longlong2str.lo strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo ctype-big5.lo ctype-czech.lo ctype-euc_kr.lo ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo ctype-gb2312.lo ctype-gbk.lo ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo xml.lo dbug.lo pack.lo vio.lo viosocket.lo viossl.lo viosslfactories.lo net.lo   -Wl,-soname -Wl, -o .libs/
/usr/bin/ld: cannot open output file .libs/: Is a directory
collect2: ld returned 1 exit status
make[2]: *** [libmysqlclient.la] Error 1
make[2]: Leaving directory `/usr/local/src/mysql-5.0/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mysql-5.0'
make: *** [all] Error 2

How to repeat:
Dont know.
[22 May 2003 9:41] Indrek Siitan
How did you create the configure file? (Since the 5.0 source must come frrom the BK tree, which 
doesn't have a configure file)

Can you try running "make clean" and then "BUILD/compile-pentium" to see if that compiles?
[26 May 2003 5:56] [ name withheld ]
I first ran the BUILD/compile-pentium command, and it created the configure script for me.
However compile-pentium gave me the exect same error message (as you see below.
even after make clean...)

*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
gcc -shared  libmysql.lo password.lo manager.lo get_password.lo errmsg.lo my_init.lo my_static.lo my_malloc.lo my_realloc.lo my_create.lo my_delete.lo mf_tempfile.lo my_open.lo my_read.lo my_write.lo errors.lo my_error.lo my_getwd.lo my_div.lo mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo my_symlink.lo my_fstream.lo mf_loadpath.lo my_pthread.lo my_thr_init.lo thr_mutex.lo mulalloc.lo string.lo default.lo my_compress.lo array.lo my_once.lo list.lo my_net.lo charset.lo hash.lo mf_iocache.lo mf_iocache2.lo my_seek.lo my_sleep.lo my_pread.lo mf_cache.lo md5.lo sha1.lo my_getopt.lo my_gethostbyname.lo my_port.lo my_lib.lo strmov.lo strxmov.lo strxnmov.lo strnmov.lo strmake.lo strend.lo strnlen.lo strfill.lo is_prefix.lo int2str.lo str2int.lo strinstr.lo strcont.lo strcend.lo bcmp.lo ctype-latin1.lo bchange.lo bmove.lo bmove_upp.lo longlong2str.lo strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo ctype-big5.lo ctype-czech.lo ctype-euc_kr.lo ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo ctype-gb2312.lo ctype-gbk.lo ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo xml.lo dbug.lo pack.lo vio.lo viosocket.lo viossl.lo viosslfactories.lo net.lo   -Wl,-soname -Wl, -o .libs/
/usr/bin/ld: cannot open output file .libs/: Is a directory
collect2: ld returned 1 exit status
gmake[2]: *** [libmysqlclient_r.la] Error 1
gmake[2]: Leaving directory `/usr/local/src/mysql-5.0/libmysql_r'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/src/mysql-5.0'
gmake: *** [all] Error 2
*** Warning: inter-library dependencies are not known to be supported.
*** All declared inter-library dependencies are being dropped.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
gcc -shared  libmysql.lo password.lo manager.lo get_password.lo errmsg.lo my_init.lo my_static.lo my_malloc.lo my_realloc.lo my_create.lo my_delete.lo mf_tempfile.lo my_open.lo my_read.lo my_write.lo errors.lo my_error.lo my_getwd.lo my_div.lo mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo my_symlink.lo my_fstream.lo mf_loadpath.lo my_pthread.lo my_thr_init.lo thr_mutex.lo mulalloc.lo string.lo default.lo my_compress.lo array.lo my_once.lo list.lo my_net.lo charset.lo hash.lo mf_iocache.lo mf_iocache2.lo my_seek.lo my_sleep.lo my_pread.lo mf_cache.lo md5.lo sha1.lo my_getopt.lo my_gethostbyname.lo my_port.lo my_lib.lo strmov.lo strxmov.lo strxnmov.lo strnmov.lo strmake.lo strend.lo strnlen.lo strfill.lo is_prefix.lo int2str.lo str2int.lo strinstr.lo strcont.lo strcend.lo bcmp.lo ctype-latin1.lo bchange.lo bmove.lo bmove_upp.lo longlong2str.lo strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo ctype-big5.lo ctype-czech.lo ctype-euc_kr.lo ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo ctype-gb2312.lo ctype-gbk.lo ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo xml.lo dbug.lo pack.lo vio.lo viosocket.lo viossl.lo viosslfactories.lo net.lo   -Wl,-soname -Wl, -o .libs/
/usr/bin/ld: cannot open output file .libs/: Is a directory
collect2: ld returned 1 exit status
gmake[2]: *** [libmysqlclient_r.la] Error 1
gmake[2]: Leaving directory `/usr/local/src/mysql-5.0/libmysql_r'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/src/mysql-5.0'
gmake: *** [all] Error 2
[12 Jun 2003 7:58] Michael Widenius
This problem is either in make or automake.

My guess is that the problem is in automake.
Try upgrading automake to 1.7.2 or downgrade it to 1.5

If this doesn't help, then you have to wait until we start building binaries for 5.0, as we at this point will test-build the 5.0 source on a lot of platforms, which should find things like this.
[18 Nov 2003 2:17] Meng Wang
Hi, I can compiled on suse 8.2/9.0 :) but compile on windows needed you fix vc projetc files (e.g. add charset-def.c and more).

I have used ./Build-tools/Do-linux-build ,very easy.but I have use make test find error msg by v5.0.0-a :(
[9 Aug 2004 14:45] Lenz Grimmer
There was no feedback for quite some time and I have not seen any other reports about this
since then. Closing.
[25 Sep 2007 8:24] saroj pandey
xml.c:97: error: static declaration of ‘second_arg_force_ref’ follows non-static declaration
/root/Desktop/php-4.0.3pl1/main/php.h:50: error: previous declaration of ‘second_arg_force_ref’ was here
xml.c: In function ‘xml_utf8_encode’:
xml.c:483: warning: comparison is always true due to limited range of data type
xml.c:487: warning: comparison is always true due to limited range of data type
make[3]: *** [xml.lo] Error 1
make[3]: Leaving directory `/root/Desktop/php-4.0.3pl1/ext/xml'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/Desktop/php-4.0.3pl1/ext/xml'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Desktop/php-4.0.3pl1/ext'
make: *** [all-recursive] Error 1
plz give solutions 
Saroj kumar pandey