php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21896 Compile warning for Mysql
Submitted: 2003-01-27 01:33 UTC Modified: 2003-02-01 10:43 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: thetamail at rediffmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.0 OS: RH linux 7.2
Private report: No CVE-ID: None
 [2003-01-27 01:33 UTC] thetamail at rediffmail dot com
I am  trying to
Upgrade / Install php from php4.2.3 to php4.3.0
System config:
Redhat :Linux 7.2 Kernel 2.4.7-10 , apache 1.2.7 , pgsql 7.3
, Mysql  3.23.41

While i am compiling the source i recve the following error
I have tried to compile on an other machine with same configuration .
The configure script is
<code>
./configure \--with-apxs= /usr/local/apache/bin/apxs  \--enable-bcmath \--with-zlib \--with-b2z \--enable-sockets \--enable-wddx \--enable-calendar
\--enable-multibyte \--with-pgsql \--with-gettext

Error is ------------
.lo -lcrypt -lresolv -lm -ldl -lnsl -lcrypt  -o sapi/cgi/php
ext/mysql/libmysql/my_tempnam.o: In function `my_tempnam':
/hdc6/apache/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam'
 is dangerous, better use `mkstemp'
/usr/bin/ld: BFD internal error, aborting at elf32-i386.c line 1741 in elf_i386_
relocate_section

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1
------ends here
</code>

Do any one have any idea whats wrong ?????

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-27 01:41 UTC] sniper@php.net
First of all, the warning for mysql part is harmless and
can be ignored. The other one is an error..

Your configure line is broken for starters, you don't 
specify the path for apxs correctly. (notice the space between --with-apxs= and the path..)

What gcc version you have?

And try this:

# make clean ; rm config.cache
# ./configure --with-apxs=/usr/local/apache/bin/apxs --disable-all
# make

And let us know the result.

 [2003-01-27 02:01 UTC] thetamail at rediffmail dot com
sorry the apache version is Apache/1.3.27
the gcc version is gcc version 2.96 20000731
----------------------------------------
I did as you said but got a new error here is the output
----------------- START FROM HERE
d_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Z
end/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Z
end/zend_execute.lo sapi/apache/sapi_apache.lo sapi/apache/mod_php4.lo sapi/apac
he/php_apache.lo main/internal_functions.lo -lcrypt -lresolv -lm -ldl -lnsl -lcr
ypt  -o libphp4.la
ext/standard/array.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
gmake: *** [libphp4.la] Error 1

-----------Ends
 [2003-01-27 02:16 UTC] sniper@php.net
gcc 2.96? iirc, that has some serious issues..anyway,
try same again, but use this configure line:

# make clean
# rm config.cache
# ./configure --disable-all --disable-cgi
# make 

To minimize the compiled stuff to minimum..

 [2003-01-27 02:17 UTC] thetamail at rediffmail dot com
i tried the said by sniper@php.net 2 to 3 times then at last the output  was / If this is successfull make then what about pgsql and Mysql and other support
--------------------------
d/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_i
ni.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/ph
p_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lresolv -lm
-ldl -lnsl -lcrypt  -o sapi/cli/php
 [2003-01-27 02:32 UTC] thetamail at rediffmail dot com
with configuration the output is
# make clean
# rm config.cache
# ./configure --disable-all --disable-cgi
# make 
---------------Start
o Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/
zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/
zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.
lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/geto
pt.lo main/internal_functions_cli.lo -lcrypt -lresolv -lm -ldl -lnsl -lcrypt  -o
 sapi/cli/php
----End

This completes but what about support'S
 [2003-01-27 02:34 UTC] sniper@php.net
So you say it didn't work for 2 first times, but the 3rd
one worked? That would really mean there are some problems
in your system rather than anything wrong with PHP..

 [2003-01-27 02:49 UTC] sniper@php.net
Do the same again, but use './configure' instead.

 [2003-01-27 06:50 UTC] thetamail at rediffmail dot com
Thanks sniper@php.net you were right the culprit in our case was ::::
GCC version 2.96 20000731 ,
What i did 
1. removed said version and installed GCC 3.0.2 20010905
2. Made a symbolic link to gcc3 as gcc 
3. Did used my old confgiurtion script for php (ofcource after /make clean ;rm -rf config.cache; )
4. Rest all went fine just the error which you said could be ingnored Still persist
------Start
"/hdc6/apache/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of
`tempnam'
 is dangerous, better use `mkstemp'"
---End

Will you please explain me why this erorr .

Now my all apps are running fine and with God speed.The phpinfo is fine.


Thanks for the valuable input
 [2003-01-27 09:11 UTC] sniper@php.net
As it wasn't any bug in PHP -> bogus.

(the warning can be ignored since tempnam() is not used 'dangerously' there)

 [2003-02-01 08:03 UTC] thetamail at rediffmail dot com
Dear It was not BOGUS  dont you get that 
PHP has some issues while compiling with GCC 2.96 20000731
or vis-versa.
 [2003-02-01 10:43 UTC] sniper@php.net
It's not PHP problem if you have used a broken compiler, such as the RH provided GCC 2.96 is.

http://gcc.gnu.org/gcc-2.96.html

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC