Export to GitHub

distcc - issue #37

Can't build on Leopard


Posted on Jan 28, 2009 by Quick Rabbit

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_extensions/distcc_pump_c_extensions_module.o -o ./_include_server/lib.macosx-10.5-fat-2.5/include_server/distcc_pump_c_extensions.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

Comment #1

Posted on Jan 29, 2009 by Helpful Panda

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.

Comment #2

Posted on Apr 24, 2009 by Grumpy Rabbit

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,$@)

Comment #3

Posted on Apr 25, 2009 by Helpful Panda

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

Comment #4

Posted on Jun 4, 2012 by Swift Camel

Comment deleted

Comment #5

Posted on Jun 4, 2012 by Swift Camel

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?

Status: New