From:             [EMAIL PROTECTED]
Operating system: Linux/Redhat 8.0.92
PHP version:      4.3.0
PHP Bug Type:     *Configuration Issues
Bug description:  PHP fails to build on MySQL section

  Not sure if this is a problem of my own making or not, but something I've
been profoundly frustrated with.  I'm running Redhat 8.0.92 (Phoebe -
Beta) with Apache 2.0.44 (tried .43 as well) and MySQL.  I run into what
appears to be the same error whether I use --with-mysql=/path/to/mysql or
leave it built with the internal MySQL access libraries.  

  When using the following build string:

./configure --with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql/
--with-gettext --with-zlib --enable-track-vars
--enable-force-cgi-redirect

I get the following results:

checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more
information.

Inside config.log I see:

configure:47975: gcc -o conftest -g -O2
    -L/opt/mysql//lib
    conftest.c -lmysqlclient  -lz -lcrypt -lresolv -lm -ldl -lnsl  -lcrypt
1>&5
/opt/mysql//lib/libmysqlclient.a(my_malloc.o)(.text+0x28): In function
`my_mallo
c':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_realloc.o)(.text+0x65): In function
`my_real
loc':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x2e1): In function
`my_dir':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x3d1): In function
`my_stat':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0x44): In function
`my_getwd'
:
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0xce): more undefined
referen
ces to `errno' follow
collect2: ld returned 1 exit status
configure: failed program was:
#line 47964 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_close();

int main() {
mysql_close()
; return 0; }
configure:48102: checking for mysql_error in -lmysqlclient
configure:48121: gcc -o conftest -g -O2
        -L/usr/lib -L/opt/mysql//lib
        -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient  -lz -lz -lcrypt
-lresol
v -lm -ldl -lnsl  -lcrypt 1>&5
/opt/mysql//lib/libmysqlclient.a(my_malloc.o)(.text+0x28): In function
`my_mallo
c':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_realloc.o)(.text+0x65): In function
`my_real
loc':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x2e1): In function
`my_dir':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x3d1): In function
`my_stat':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0x44): In function
`my_getwd'
:
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0xce): more undefined
referen
ces to `errno' follow
collect2: ld returned 1 exit status
configure: failed program was:
#line 48110 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_error();
int main() {
mysql_error()
; return 0; }

If I build without the --with-mysql=/opt/mysql, the configure script
completes correctly but during 'make' I get the following error:

ext/mysql/libmysql/my_tempnam.lo(.text+0x4c): In function `my_tempnam':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use
of `tempnam' is dangerous, better use `mkstemp'
ext/mysql/libmysql/my_lib.lo(.text+0x3d1): In function `my_dir':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_lib.c:169: undefined
reference to `errno'
ext/mysql/libmysql/my_lib.lo(.text+0x5ef): In function `my_stat':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_lib.c:588: undefined
reference to `errno'
ext/mysql/libmysql/my_malloc.lo(.text+0xde): In function `my_malloc':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_malloc.c:24: undefined
reference to `errno'
ext/mysql/libmysql/my_realloc.lo(.text+0xd5): In function `my_realloc':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_realloc.c:44:
undefined reference to `errno'
ext/mysql/libmysql/my_delete.lo(.text+0x86): In function `my_delete':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_delete.c:16: undefined
reference to `errno'
ext/mysql/libmysql/my_tempnam.lo(.text+0x89):/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:108:
more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


As I said, I'm not sure if this isn't a problem with RH 8.0.92 but I've
complied many other things succesfully.  Please let me know if I can be of
any help testing.
-- 
Edit bug report at http://bugs.php.net/?id=21831&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21831&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21831&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21831&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21831&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21831&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21831&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21831&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21831&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21831&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21831&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21831&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21831&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21831&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21831&r=gnused

Reply via email to