php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17218 PHP 4.2.1 doesn't compile after ./configure
Submitted: 2002-05-14 17:05 UTC Modified: 2002-05-16 09:15 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: dave at dsb3 dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.1 OS: Solaris 8
Private report: No CVE-ID: None
 [2002-05-14 17:05 UTC] dave at dsb3 dot com
Solaris 8 machine, using gcc from sunfreeware.com, trying to compile php4.2.1

$ ./configure
$ make

Making all in Zend
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main    -D_POSIX_PTHREAD_SEMANTICS -I../TSRM  -g -O2 -prefer-non-pic -static -c -o zend_language_parser.lo `test -f zend_language_parser.c || echo './'`zend_language_parser.c
In file included from zend_compile.h:24,
                 from zend_language_parser.c:147:
zend.h:55:19: unix.h: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `zend_language_parser.lo'
Current working directory /download/php-4.2.1/Zend
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-14 18:09 UTC] edink@php.net
Could you have a look in main/php_config.h. Can you find a line that says

#define HAVE_UNIX_H 1

If yes, could you try commenting that line out and compiling again.
 [2002-05-14 18:23 UTC] dave at dsb3 dot com
Undefining HAVE_UNIX_H took care of the first problem and introduced a mysql compile failure.  I don't know if this is new in 4.2.1 or not since for the 4.2.0 compile I used --with-mysql=/opt/mysql.  (I'd only omitted it for the original test case since it was the simplest ./configure option that duplicated the error).

I also needed undefine HAVE_SYS_SYSEXITS_H to get further in compilation, to then end up with this error (below).  I'll look into this further tomorrow and see if I can nail down what's causing it.


/bin/sh /download/php-4.2.1/libtool --silent --mode=link gcc  -I. -I/download/php-4.2.1/ -I/download/php-4.2.1/main -I/download/php-4.2.1 -I/opt/apache-1.3.24/include -I/download/php-4.2.1/Zend -I/opt/mysql/include -I/download/php-4.2.1/ext/xml/expat  -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=280 -DMOD_SSL=208108 -DEAPI -DEAPI_MM -DUSE_EXPAT -DSHARED_CORE -I/download/php-4.2.1/TSRM -g -O2 -prefer-pic   -o libphp4.la -rpath /download/php-4.2.1/libs -avoid-version -L/usr/ucblib -L/opt/mysql/lib  -R /usr/ucblib -R /opt/mysql/lib stub.lo  Zend/libZend.la  sapi/apache/libsapi.la  main/libmain.la  regex/libregex.la  /download/php-4.2.1/ext/ctype/libctype.la /download/php-4.2.1/ext/mysql/libmysql.la /download/php-4.2.1/ext/pcre/libpcre.la /download/php-4.2.1/ext/posix/libposix.la /download/php-4.2.1/ext/session/libsession.la /download/php-4.2.1/ext/standard/libstandard.la /download/php-4.2.1/ext/xml/libxml.la  TSRM/libtsrm.la -lpam -lmysqlclient -lz -lcrypt -lresolv -lresolv -lresolv -lm -ldl -lsocket -lsocket -lcrypt -ldl
main/.libs/libmain.al: object main/.libs/libmain.al(main.lo) in archive is not object
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libphp4.la'
Current working directory /download/php-4.2.1
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
 [2002-05-14 18:23 UTC] adrieder at sbox dot tugraz dot at
Same problem here...
after commenting out "#define HAVE_UNIX_H 1" I get a lot of warnings when compiling:

In file included from ../main/php_config.h:2084,
                 from zend_config.h:1,
                 from zend.h:48,
                 from zend_compile.h:24,
                 from zend_language_parser.c:147:
/usr/include/stdlib.h:79: warning: empty declaration
In file included from ../main/php_config.h:2088,
                 from zend_config.h:1,
                 from zend.h:48,
                 from zend_compile.h:24,
                 from zend_language_parser.c:147:
/usr/include/sys/types.h:339: warning: empty declaration
/usr/include/sys/types.h:480: warning: empty declaration
/usr/include/sys/types.h:481: warning: empty declaration

and so on....
 [2002-05-14 18:44 UTC] edink@php.net
I've just checked, and there were no changes made in configure script between 4.2.0 and 4.2.1 appart from version number and the register globals warning.

The only significant thing is that the configure was built using autoconf 2.53 in 4.2.0 tarball, and with autoconf 2.13 in 4.2.1 due to some probles we were having with the latest version.

Could you please try to copy configure script from 4.2.0 tarball over in 4.2.1 source and see if the build works?
 [2002-05-14 18:56 UTC] adrieder at sbox dot tugraz dot at
I copied the configure script from the 4.2.0 tarball and it seems to work, thanks for the hint.
 [2002-05-14 19:04 UTC] edink@php.net
Great. At least we have the problem diagnosed.
 [2002-05-15 09:21 UTC] dave at dsb3 dot com
Copying the 4.2.0 configure script over did the trick here as well.  Let me know if you'd like me to run any other tests to help track down where the problem is.

Thanks -- Dave
 [2002-05-15 13:50 UTC] mike at ftl dot com
Same goes here....If ya need any other testing on Solaris 8 or Solaris 7, please let me know.

 4.2.1 compiled fine on Linux :)

- Mike
 [2002-05-15 13:53 UTC] mfischer@php.net
Could someone with access to solaris provide the full output of ./configure and config.log from both 2.13 and 2.52 for download ? Seems another detection thing we need to fix.
 [2002-05-15 14:32 UTC] dave at dsb3 dot com
Configure output sent to mfischer by email since 4 files of ~ 100k each were attached (too large to paste into comment box).
 [2002-05-15 14:38 UTC] dave at dsb3 dot com
Configure output and config.log are here:

  http://dsb3.com/debug/php/
 [2002-05-15 14:39 UTC] adrieder at sbox dot tugraz dot at
Here you can download the two outputs:

ftp://ftp.tugraz.at/mirror/php/tmp/php-config/
 [2002-05-15 18:34 UTC] edink@php.net
I can see that configure in 4.2.1 tarball wrongly tries to use cc instead of gcc in all the tests it fails.

What happens if you try to run 4.2.1 configure with:

CC=gcc ./configure ...

 [2002-05-16 09:06 UTC] adrieder at sbox dot tugraz dot at
"export CC=gcc" solves the problems with the configure of 4.2.1! THANKS again

p.s: I'm gonna delete the output files from our ftp directory
 [2002-05-16 09:15 UTC] edink@php.net
Ok. We can conclude that this is an autoconf bug with an easy workaround. Closing the bug report.
 [2002-05-16 09:25 UTC] dave at dsb3 dot com
Confirmed here as well.  CC=gcc does the trick.

I'll take my configure output offline also. 

Thanks everyone who helped track down the problem!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 22:01:26 2024 UTC