php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21859 php cant compile/make
Submitted: 2003-01-24 04:43 UTC Modified: 2003-01-24 11:01 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: sc2 at gmx dot at Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.0 OS: RedHat 7
Private report: No CVE-ID: None
 [2003-01-24 04:43 UTC] sc2 at gmx dot at
when i try to make "make" with php 4.3 then this comes..
on older versions there no problems with compiling / make


In file included from /usr/src/php-4.3.0/Zend/zend.h:59,
                 from /usr/src/php-4.3.0/main/php.h:34,
                 from /usr/src/php-4.3.0/ext/ctype/ctype.c:23:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or storage class
/usr/local/include/unix.h:196: parse error before `*'
/usr/local/include/unix.h:197: parse error before `*'
/usr/local/include/unix.h:198: parse error before `*'
/usr/local/include/unix.h:199: parse error before `*'
/usr/local/include/unix.h:200: parse error before `*'
/usr/local/include/unix.h:201: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: parse error before `*'
/usr/local/include/unix.h:202: warning: data definition has no type or storage class
/usr/local/include/unix.h:203: parse error before `*'
/usr/local/include/unix.h:204: parse error before `*'
/usr/local/include/unix.h:206: parse error before `*'
much more of the warnings then
.
.
.
make: *** [ext/ctype/ctype.lo] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-24 05:40 UTC] sniper@php.net
What was the configure line you used?

Also, check if you have more of them in your system:

# find /usr/include -name unix.h

This is caused by wrong install of c-client libs/headers,
you don't need unix.h there..check this manual page:

  http://www.php.net/manual/en/ref.imap.php


 [2003-01-24 06:14 UTC] sc2 at gmx dot at
./configure --with-apache=/usr/src/apache_1.3.26 --enable-track-vars --enable-force-cgi --enable-ftp --enable-dbase --with-pear

i looked (searched) for unix.h but i dont have it in 
/usr/include or other dir
 [2003-01-24 09:56 UTC] james at citysolar dot net
I found this problem too, and it took me a little while to work out not only what's going on but also the 'right' way to fix it. I'm no expert, but this seemed to be what's happening:

- That rogue unix.h has probably come from installing the imap c-client.

Q: Ok, but what should we have there instead? Where's the 'right' unix.h? Why are we trying to use it in building PHP? Is it important?

A: When you ./configure PHP, it looks to see if it can find a unix.h lying around, and if it can, it decides it really ought to include it. That means in our case, the 'rogue' unix.h is marked for inclusion. Only when you come to 'make' does it discover it's not the expected kind of unix.h at all, and things fall over.

Fix:
1. Shove the rogue unix.h out of the way 
   # cd /usr/local/include
   # mv unix.h unix_.h
2. Return to your php directory
   # cd /usr/local/lib/php-xxx  ( OR /usr/src/php-xxx OR wherever your php install lives )
3. If you've already experienced the error, chances are the 'Yes we should include a unix.h' information is cached, so we need to remove that.
   # rm config.cache
4. Repeat your ./configure
   # ./configure --with-... --enable-... etc.
5. Do the make - now it won't be expecting to include the unix.h file and so everything will run fine without it.
6. If you're in the mood, remember to move the unix_.h back to unix.h

HTH, it worked for me.

James
-- proudly sponsoring online youth support at tscnow.com --
 [2003-01-24 10:51 UTC] sc2 at gmx dot at
that worked :-) 
thanks

ps: what means 
In function `my_tempnam':
/usr/src/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is dangerous, better use `mkstemp'

this is for the coders of php, or?
 [2003-01-24 11:01 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

The problem was a result of a bad unix.h due to c-client installation.

The compile warning you are seeing can be safely ignored, it occures in the libmysql, which is bundled by PHP and will go away once MySQL developers choose to address this issue.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Feb 08 19:00:02 2026 UTC