I am trying to get PHP 4.2.1 setup on a Solaris 8 machine. I am using the following ./configure....

./configure --without-mysql --with-apache=../apache_1.3.24/ --enable-track-vars

seems to work fine.

But when I try the "make" i get the following.....

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 /root/src/php-4.2.1/Zend
*** Error code 1
make: Fatal error: Command failed for target
all-recursive'

The "zend.h:55:19: unix.h: No such file or directory" seeming to be the key to this all failing, but I cannot find anything about this.....Can anyone help me on this?

    Do you have gcc and all the header files installed? I think you might need GNU compiler to do this.. look on the php website and i think you might be able to find something.

    Thanks
    - Justin

      'Am tring the same via using the following, and configure seems ok:

      ./configure --with-mysql --with-apxs

      But, I'm getting the following during make:

      Making all in Zend
      /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main -D_POSIX_PTHREAD_SEMANTICS -DEAPI -DMOD_PERL -DUSE_EXPAT -I../TSRM -g -O2 -prefer-pic -c -o zend_language_parser.lo test -f zend_language_parser.c || echo './'zend_language_parser.c
      /usr/ccs/bin/as: "/var/tmp/ccpH0fm1.s", line 15386: error: unknown opcode ".subsection"
      /usr/ccs/bin/as: "/var/tmp/ccpH0fm1.s", line 15386: error: statement syntax
      /usr/ccs/bin/as: "/var/tmp/ccpH0fm1.s", line 15732: error: unknown opcode ".previous"
      /usr/ccs/bin/as: "/var/tmp/ccpH0fm1.s", line 15732: error: statement syntax
      *** Error code 1
      make: Fatal error: Command failed for target zend_language_parser.lo'
      Current working directory /usr1/astatspe/php/php-4.2.1/Zend
      *** Error code 1
      make: Fatal error: Command failed for target
      all-recursive'

      Can someone tell me what I'm doing wrong?

        Hmm... I have just upgraded my sparc with no problem to 4.2.1

        Here is my configure:

        './configure' \
        '--with-mysql=/usr/local/' \
        '--with-apxs=/usr/local/apache/bin/apxs' \
        '--enable-track-vars' \
        '--enable-bcmath' \
        '--with-vpopmail=/var/vpop' \
        "$@"

        Here is my output of crle:

        Configuration file [2]: /var/ld/ld.config

        Default Library Path (ELF): /usr/local/lib:/usr/local/lib/mysql:/usr/ccs/lib:/var/lib:/usr/local/ssl/lib:/lib:/usr/lib
        Trusted Directories (ELF): /usr/lib/secure (system default)

        Dont know if any of that helps or not ....

          Had the same problem. It appears that the configure script gets confused when 'cc' isn't available on the system. Try setting the environment var 'CC' via:

          setenv CC gcc

          This will explicitly force 'configure' to use 'gcc' instead of, or trying to use 'cc'

          Worked for me!

            Hey

            Ya everything is installed as suggested as well as the proper order on the $PATH. As some of the other posts have suggested is seems to be a matter of what the "make" is using to compile with....I'll try some of the suggestions and let everyone know.

            Thanks

              I'll give it try, and let you know...thanks

                And we have a winner!!!! Thanks all for the help.....it was the gcc problem.

                  a month later

                  Hi Nels, I have a Solaris 8 with apache 2.x, mysql 3.23.45 and I'm trying to install php, but I still have the same problem
                  I have probed to export CC to gcc in this way

                  CC=gcc;export CC

                  At the list of the environment variables I have the line
                  CC=gcc but the problem persists. Is there any step I have forgotten??

                    11 days later

                    I was receiving the same error about unix.h missing, but setting the environment variable 'CC' to gcc (setenv CC gcc) didn't work until I ran 'make distclean' first.

                      Write a Reply...