chieryw / distcc

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

OS X Yosemite Compile Fixes #146

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Answering the following questions is a big help:

1. What version of distcc are you using (e.g. "2.7.1")?  You can run "distcc 
--version" to see.  If you got distcc from a distribution package rather than 
building from source, please say which one.
distcc 3.1 i386-apple-darwin14.0.0

2. What platform are you running on (e.g. "Red Hat 8.0", "HP-UX 11.11")?  What 
compilare are you using ("gcc 3.3")?  Run "uname -a" and "cc --version" to see.
uname -a: Darwin 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 
2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
cc --version: Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)

3. What were you trying to do (e.g. "install distcc", "build Mozilla")?
Build distcc on OS X Yosemite

4. What went wrong?  Did you get an error message, did it hang, did it build a 
program that didn't work, did it not distribute compilation to machines that 
ought to get it?

5. If you have an example of a compiler invocation that failed, quote it, in 
full e.g.:
   distcc gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -I./src \ "-DSYSCONFDIR=\"/etc/\"" -I./lzo -g -O2 -W -Wall -W \ -Wimplicit -Wshadow -Wpointer-arith -Wcast-align \ -Wwrite-strings -Waggregate-return -Wstrict-prototypes \ -Wmissing-prototypes -Wnested-externs -o src/clirpc.o \ -c src/clirpc.c

---

6. What error logging do you get?  Turn on client and server error logging.  On 
the client, set these environment variables, and try to reproduce the problem: 
=export DISTCC_VERBOSE=1 DISTCC_LOG=/tmp/distcc.log=.  Start the server with 
the --verbose option. If the problem is intermittent, leave logging enabled and 
then pull out the lines from the log file when the problem recurs.

---

7. If you got an error message on stderr, quote that error exactly. Find the 
lines in the log files pertaining to the compile, and include all of them in 
your report, by looking at the process ID in square brackets. If you can't work 
that out, quote the last few hundred lines leading up to the failure.
WARNING include server: Preprocessing locally. Include server internal error: 
'<type 'exceptions.ValueError'>: ("Expected absolute path, but got 
'(framework'.",)' for translation unit 'unknown translation unit' ------- 
Include server stack trace -----------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/include_server/include_server.py", line 379, in handle
    include_analyzer.client_root_keeper))
  File "/usr/local/lib/python2.7/site-packages/include_server/include_analyzer.py", line 254, in DoCompilationCommand
    self.timer))
  File "/usr/local/lib/python2.7/site-packages/include_server/parse_command.py", line 435, in ParseCommandArgs
    compiler_defaults.SetSystemDirsDefaults(compiler, parse_state.language, timer)
  File "/usr/local/lib/python2.7/site-packages/include_server/compiler_defaults.py", line 353, in SetSystemDirsDefaults
    self.system_links)
  File "/usr/local/lib/python2.7/site-packages/include_server/compiler_defaults.py", line 104, in _MakeLinkFromMirrorToRealLocation
    raise ValueError("Expected absolute path, but got '%s'." % system_dir)
ValueError: Expected absolute path, but got '(framework'.

---
Attached patch will enable build on OS X Yosemite.
1) I had to add a few #include "config.h" - otherwise the compiler would think 
it does not have strlcpy, but it does have it and it was successfully found 
during  ./configure
2) there was an error with snprintf, vsnprintf. I am not sure this is the 
proper way to fix this issue - maybe the missing #include "config.h" again, but 
I do not know.
3) Modifying compiler_defaults.py. Without it, it would throw an error 
mentioned in (7).

The patch is against 3.1.

Feel free to apply just parts of the patch. Let me know if you need more 
info/testing.

Thanks,
--
David

Original issue reported on code.google.com by and...@gmail.com on 30 Oct 2014 at 4:50

Attachments: