sid24ss / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

Can't build on Leopard #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Here is my environment:

distcc 3.1

Darwin mikehale.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24
17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)

I'm trying to install on leopard, but I keep getting the following error
when running make:

if test -z "/opt/local/bin/python2.5"; then \
      echo "Not building include-server: No suitable python found"; \
    else                        \
      mkdir -p "./_include_server" &&      \
      DISTCC_VERSION="3.1"          \
      SRCDIR="."                            \
      CFLAGS="-g -O2 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Wnested-externs -Wmissing-declarations
-Wuninitialized -D_THREAD_SAFE  -Wno-missing-prototypes
-Wno-missing-declarations -Wno-write-strings -Wp,-U_FORTIFY_SOURCE"           \
      CPPFLAGS="-DHAVE_CONFIG_H -D_GNU_SOURCE
-DSYSCONFDIR="\"/usr/local/etc\""
-DPKGDATADIR="\"/usr/local/share/distcc\"" -Isrc -I"./src" -I"./lzo"
-I"./popt""                        \
      /opt/local/bin/python2.5 "./include_server/setup.py" \
          build                     \
            --build-base="./_include_server"  \
            --build-temp="./_include_server"; \
    fi
setup.py: PYTHON_CFLAGS must be defined.
running build
running build_py
running build_ext
building 'include_server.distcc_pump_c_extensions' extension
ccache /usr/bin/gcc-4.0 -arch i386 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.5.sdk -L/opt/local/lib -bundle -undefined
dynamic_lookup -g -O2 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Wnested-externs -Wmissing-declarations
-Wuninitialized -D_THREAD_SAFE -Wno-missing-prototypes
-Wno-missing-declarations -Wno-write-strings -Wp,-U_FORTIFY_SOURCE
-DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR=/usr/local/etc
-DPKGDATADIR=/usr/local/share/distcc -Isrc -I./src -I./lzo -I./popt
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/clirpc.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/clinet.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/state.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/srvrpc.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/pump.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/rpc.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/io.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/include_server_if.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/trace.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/snprintf.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/util.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/tempfile.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/filename.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/bulk.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/sendfile.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/compress.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/argutil.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/cleanup.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/emaillog.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/timeval.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/src/netutil.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/lzo/minilzo.o
./_include_server/Users/mikehale/Downloads/distcc-3.1/include_server/c_extension
s/distcc_pump_c_extensions_module.o
-o
./_include_server/lib.macosx-10.5-fat-2.5/include_server/distcc_pump_c_extension
s.so
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple
-arch flags
error: command 'ccache' failed with exit status 1
make: *** [include-server] Error 1

Original issue reported on code.google.com by mikeh...@gmail.com on 28 Jan 2009 at 8:58

GoogleCodeExporter commented 9 years ago
This one is a tricky three-way incompatibility between MacOS gcc, Python, and 
distcc.
MacOS gcc extends gcc with support for multiple -arch options; Python uses them;
and distcc invokes gcc via Python, hence picking up the "-arch" options;
but MacOS gcc doesn't support the standard gcc "-MD" option when multiple 
"-arch"
options are used.

The work-around is to comment out the "-MD" from the Makefile.

Original comment by fergus.h...@gmail.com on 29 Jan 2009 at 10:08

GoogleCodeExporter commented 9 years ago
please add -MF xxx.d after -MD  CFLAG, you maybe need to modify the makefile, 

for example, if you compile use 
gcc src.c -MD -o ../out/src.o 

try this, 

gcc src.c -MD -MF ../out/src.d -o ../out/src.o

In makefile, you may need change the rules, like -MD -MF $(patsubst %.o,%.d,$@) 

Original comment by kzjeef on 24 Apr 2009 at 3:56

GoogleCodeExporter commented 9 years ago
How does adding "-MF xxx.d" help?

I didn't think it would help, but I just tried it, and I still get

bash$ make
...
gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc -g -O2 -MD 
-MF
include-server.d ...
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch 
flags

Original comment by fergus.h...@gmail.com on 25 Apr 2009 at 1:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If we can't figure out a perfect solution for this issue, why not directly 
remove "-MD" flag when it detects it's using MacOS gcc?
Or is it better to remove multiple "-arch" since I guess it's less necessary in 
this case?

Original comment by compan...@gmail.com on 4 Jun 2012 at 12:38