I am trying to build php-4.0.3pl1 on a Mac G4 running YellowDogLinux1.2. When I run the configure script "./configure --with-mysql --with-apxs" I see this error:
cpp: -lang-c: linker input file unused since linking not done
I also see this many times if I run make.

This is from config.log :

configure:1664: checking for gcc
configure:1777: checking whether the C compiler (gcc ) works
configure:1793: gcc -o conftest conftest.c 1>&5
cpp: -lang-c: linker input file unused since linking not done
configure:1819: checking whether the C compiler (gcc ) is a cross-compiler
configure:1824: checking whether we are using GNU C
configure:1833: gcc -E conftest.c
cpp: -lang-c: linker input file unused since linking not done
configure:1852: checking whether gcc accepts -g
configure:1884: checking how to run the C preprocessor
configure:1905: gcc -E conftest.c >/dev/null 2>conftest.out
cpp: -lang-c: linker input file unused since linking not done
configure: failed program was:
#line 1899 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:1922: gcc -E -traditional-cpp conftest.c >/dev/null 2>conftest.out
cpp: -lang-c: linker input file unused since linking not done
configure: failed program was:
#line 1916 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:1939: gcc -nologo -E conftest.c >/dev/null 2>conftest.out
gcc: unrecognized option `-nologo'
cpp: -lang-c: linker input file unused since linking not done

What makes this really wierd is that I am able to compile php easily on a PowerMac7500 running YellowDog1.2 with the same configure options.

Can anyone help?

    2 months later

    SOLVED!!

    It turns out that this problem had to do with the installed gcc packages. When I compared the versions of the installed RPMs with a second YDL box, they were the same, but when I actually checked the file sizes of gcc they were different. So I downloaded a fresh copy from YDL's site and removed the installed RPM. When I went to install the fresh RPM, I got an error about conflicting with egcs-1.1.2-12e. So I removed egcs,
    and was able to successfully install the fresh RPM. After this, I was able to build php.

    The conflicting files with egcs were the same files I was trying to remove when I uninstalled gcc. I am assuming that when I originally installed YDL, and by selecting development tools, that YDL installed the gcc package and then installed the egcs package which overwrote gcc with the one that was included in egcs.

      Write a Reply...