I´m trying to install PHP as Script in Solaris 2.6 and I found the following error.
Can anybody help me?

checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

Thanks.

loading cache ./config.cache
checking for a BSD compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking whether to enable maintainer-specific portions of Makefiles... no
checking host system type... sparc-sun-solaris2.6
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.25 (ok)
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

    As you can see the compiler can't see the gcc binaries, so, first of all you've got to download the gcc compiler (www.sunfreeware.com), if you have already done that, that means that the shell didn't find the gcc, so you've got to add those parameters to the appropriate rc shell path file, you must include also the path for the ld, ln and as.

    [root@mysunbox]# which gcc
    /usr/local/bin/gcc
    [root@mysunbox]# which ld
    /usr/ccs/bin/ld
    [root@mysunbox]# which ln
    /usr/bin/ln
    [root@mysunbox]# which as
    /usr/ccs/bin/as

    And voilá,

      This is the output, when I execute the commands.

      Artemisa:/ #which gcc
      no gcc in /usr/sbin /usr/bin /usr/local/bin /usr/ccs/bin
      Artemisa:/ #cd /usr/local/bin
      Artemisa:/usr/local/bin #ls

      a2p cpp ifnames pl2pm
      aclocal find2perl igawk pod2html
      autoconf flex jcf-dump pod2latex
      autoheader flex++ jv-scan pod2man
      automake g++ libtool pod2text
      autoreconf g77 libtoolize protoize
      autoscan gawk m4 pstruct
      autoupdate gawk-3.1.0 make s2p
      awk gcc perl sparc-sun-solaris2.6-gcc
      bison gcj perl5.00503 splain
      c++ gcjh perlbug unprotoize
      c++filt gcov perlcc
      c2ph h2ph perldoc
      chill h2xs pgawk
      Artemisa:/usr/local/bin #ls -la gcc
      -rw-r--r-- 1 root other 247440 Jun 18 19:04 gcc
      Artemisa:/usr/local/bin #which ld
      /usr/ccs/bin/ld
      Artemisa:/usr/local/bin #which ls
      /usr/bin/ls
      Artemisa:/usr/local/bin #which as
      no as in /usr/sbin /usr/bin /usr/local/bin /usr/ccs/bin
      Artemisa:/usr/local/bin #

      Now I´ve changed the permision to the gcc file, and I find the gcc: Now, I have the following output:
      Artemisa:/ #which gcc
      /usr/local/bin/gcc
      Artemisa:/ #which ln
      /usr/bin/ln
      Artemisa:/ #which ld
      /usr/ccs/bin/ld
      Artemisa:/ #which as
      no as in /usr/sbin /usr/bin /usr/local/bin /usr/ccs/bin

      The problem is that I don´t have the as file. How can I get it?

      Thanks.
      Nacho

        Try checking /usr/local/sparc-sun-solaris2.7/bin

        or something related you'll find "ar" "as" etc... you should point your $PATH to this directory and retry compiling...

          Write a Reply...