php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23330 Compile fails
Submitted: 2003-04-24 09:21 UTC Modified: 2003-04-24 15:47 UTC
From: news105 at guidoni dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.3.1 OS: RHL 9.0 Shrike - everything inst
Private report: No CVE-ID: None
 [2003-04-24 09:21 UTC] news105 at guidoni dot com
emporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo 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/cgi/cgi_main.lo sapi/cgi/getopt.lo main/internal_functions.lo -lcrypt -lresolv -lm -ldl -lnsl -lcrypt  -o sapi/cgi/php
ext/mysql/libmysql/my_tempnam.o(.text+0x40): In function `my_tempnam':
/root/php-4.3.1/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is dangerous, better use `mkstemp'
ext/mysql/libmysql/my_lib.o(.text+0x37a): In function `my_dir':
/root/php-4.3.1/ext/mysql/libmysql/my_lib.c:169: undefined reference to `errno'
ext/mysql/libmysql/my_lib.o(.text+0x546): In function `my_stat':
/root/php-4.3.1/ext/mysql/libmysql/my_lib.c:588: undefined reference to `errno'
ext/mysql/libmysql/my_malloc.o(.text+0xbd): In function `my_malloc':
/root/php-4.3.1/ext/mysql/libmysql/my_malloc.c:24: undefined reference to `errno'
ext/mysql/libmysql/my_realloc.o(.text+0xb4): In function `my_realloc':
/root/php-4.3.1/ext/mysql/libmysql/my_realloc.c:44: undefined reference to `errno'
ext/mysql/libmysql/my_delete.o(.text+0x6d): In function `my_delete':
/root/php-4.3.1/ext/mysql/libmysql/my_delete.c:16: undefined reference to `errno'
ext/mysql/libmysql/my_tempnam.o(.text+0x79):/root/php-4.3.1/ext/mysql/libmysql/my_tempnam.c:108: more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1
root@gandalf /root/php-4.3.1 289#

desperately need a command line version that will let (uggh) html/os do a system("php somescript.php") without sending Content-type: text/html ELF.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-24 10:41 UTC] jay@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

This looks like a duplicate of 22346  
(http://bugs.php.net/bug.php?id=22346), and it appears to 
be fixed.  
 
J 
 [2003-04-24 11:01 UTC] news105 at guidoni dot com
i read http://bugs.php.net/bug.php?id=22346 and downloaded 
the latest snapshot, php4-200304241530.  i do a simple
  ./configure
then a
  make

it gives this output and fails:
[previous lines deleted]
/root/junk/php4-200304241530/ext/mysql/libmysql/
my_tempnam.c:103: the use of `tempnam' is dangerous, better 
use `mkstemp'
ext/mysql/libmysql/my_lib.o(.text+0x37a): In function 
`my_dir':
/root/junk/php4-200304241530/ext/mysql/libmysql/
my_lib.c:169: undefined reference to `errno'
ext/mysql/libmysql/my_lib.o(.text+0x546): In function 
`my_stat':
/root/junk/php4-200304241530/ext/mysql/libmysql/
my_lib.c:588: undefined reference to `errno'
ext/mysql/libmysql/my_malloc.o(.text+0xbd): In function 
`my_malloc':
/root/junk/php4-200304241530/ext/mysql/libmysql/
my_malloc.c:24: undefined reference to `errno'
ext/mysql/libmysql/my_realloc.o(.text+0xb4): In function 
`my_realloc':
/root/junk/php4-200304241530/ext/mysql/libmysql/
my_realloc.c:44: undefined reference to `errno'
ext/mysql/libmysql/my_delete.o(.text+0x6d): In function 
`my_delete':
/root/junk/php4-200304241530/ext/mysql/libmysql/
my_delete.c:16: undefined reference to `errno'
ext/mysql/libmysql/my_tempnam.o(.text+0x79):/root/junk/
php4-200304241530/ext/mysql/libmysql/my_tempnam.c:108: more 
undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1
[root@gandalf php4-200304241530]# rpm -qa |grep glbic
 [2003-04-24 11:29 UTC] news105 at guidoni dot com
i forgot to mention that i did do a rpmbuild --rebuild --
target i686-redhat-linux for mysql and httpd (apache).

many thanks for your efforts.

--michele
 [2003-04-24 12:37 UTC] jay@php.net
What version of MySQL are you using? I tried out a fresh 
CVS checkout with 3.23.38 and it seemed to work okay.  
 
J 
 [2003-04-24 12:43 UTC] sniper@php.net
Get a working compiler. (gcc 2.95.3 works fine here, anything higher is fubar)

 [2003-04-24 13:02 UTC] news105 at guidoni dot com
bogus?  whatever.  gcc 3.2.2 is being distributed with rhl9 
and 2.9.6 is what came with rhl7.  does it require a 486?  
i appreciate your efforts, but wonder why one would suggest 
that the latest version of their software is somehow not 
fubar relative to a 4 year old version of someone elses.

is it that php is only stable when used with an os > 4 
years old?
 [2003-04-24 13:08 UTC] news105 at guidoni dot com
we're using mysql 3.23.54a-11.  thanks in advance.

--michele
 [2003-04-24 14:14 UTC] jay@php.net
Try putting 
 
#include <errno.h> 
 
near the top of the offending files, such as my_tempnam.c, 
my_delete.c, etc. and see if that helps. 
 
J 
 [2003-04-24 14:48 UTC] news105 at guidoni dot com
thanks a 10^9, j.  that worked like a charm.  got the cli 
binary.

how does that get propogated into the source or will it?

--michele
 [2003-04-24 15:20 UTC] jay@php.net
Glad that worked.  
 
Which files needed the change, specifically? I don't have 
a box with MySQL, glibc 2.3.x and gcc 3.2.2 on it so I 
can't test at the moment. (I think the problem was glibc, 
not gcc, btw.) 
 
J 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC