Opened 11 years ago
Closed 5 years ago
#6697 closed Bugs (fixed)
toolset darwin-4.7 error: unrecognized option -no-cpp-precomp
Reported by: | Julian Gonggrijp | Owned by: | Vladimir Prus |
---|---|---|---|
Milestone: | To Be Determined | Component: | build |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I installed gcc 4.7 from macports and added the following to my user-config.jam:
using darwin : 4.7 : /opt/local/bin/g++-mp-4.7 ;
Now when I run
$ b2 darwin-4.7
, the build process will stop at compilation stage because of an error:
g++-mp-4.7: error: unrecognized command line option '-no-cpp-precomp'
-no-cpp-precomp
was already unrecognized in darwin-4.4, but then it only caused a warning without further obstructing the build process. I don't know at what version of darwin-gcc this changed into an error.
If I repeat the displayed command without the -no-cpp-precomp
option it works fine. Linking also works without errors.
Change History (7)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
I too am having this problem (with gcc 4.6, from macports). Is there a workaround that doesn't involve modifying the boost jamfiles?
comment:3 by , 11 years ago
Also, I'm not sure of the purpose of this file http://svn.boost.org/svn/boost/trunk/tools/build/v2/tools/darwin.py but does it need to be modified as well?
comment:4 by , 10 years ago
How to solve this problem? I am getting this with gcc-4.7.2 installed from source.
comment:5 by , 10 years ago
I think it was fixed in boost 1.50, are you using an old version of boost? If you are then look for -no-cpp-precomp
in tools/build/v2/tools/darwin.jam
and remove it (as in the change I linked to above).
comment:6 by , 10 years ago
For later versions of OS X, clang allows the -no-cpp-precomp flag, so link c++ to /usr/bin/clang or set $CXX to /usr/bin/clang as necessary. This worked for me to overcome the error.
comment:7 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I removed it from trunk in [75659]. I assumed it would have been merged by now, but I think it can safely cherry-picked if that's okay.