Alternatively, the README could mention that it needs to be installed.
I fixed the README. Will add a check to the script as well.
Hm, building doesn't work for me. I installed cmake, sourced setenv_mjau.sh, and ran ./scripts/macosx-build-dependencies.sh. The build of libboost failed with ...failed updating 2 targets.... The first error is
...failed updating 2 targets...
libs/program_options/src/options_description.cpp: In instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]’:
libs/program_options/src/options_description.cpp:444: instantiated from here
libs/program_options/src/options_description.cpp:444: error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]’ but no definition available
I tried again with passing -c to macosx-build-dependencies.sh, but clang complained about something else.
This is with Xcode 4.6 and its command line tools. gcc is a symlink to llvm-gcc-4.2 in this configuration.
Is this known to not work? Are there ways to build with Xcode 4.6?
I guess llvm-gcc-4.2 just isn't able to build boost, and clang is the way forward on OS X anyways. I'll try to get the clang build going again and send a pull request, but that's not what this issue is about.
Reopening to address boost build issue with gcc:
Could you verify that this is an issue, and which git commit version of OpenSCAD and which version of gcc you're using?
I've successfully build this on with gcc from Xcode 4.6 on both 10.7 and 10.8 with a770947 and the following gcc version:
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Wops, you're right: I overlooked an error far back on my shell history.
Apparently, Xcode 4.6 on 10.8 cannot build 10.5-compatible binaries.
If we modify the line specifying backwards compatibility in macosx-build-dependencies.sh, it should work (testing needed):
This line should be changed to specify 10.6 or 10.7.
I don't know, exactly, why it doesn't work - perhaps some old std c++ headers are missing from this Xcode install..
Running just ./scripts/macosx-build-dependencies.sh with the diff you suggested (this one:
$ git diff
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index 11d9919..c99a17f 100755
@@ -23,7 +23,7 @@ BASEDIR=$PWD/../libraries
However, if I run ./scripts/macosx-build-dependencies.sh -c, I do need #316 . (Note that the patch in this pull request merges in a commit from the official Qt tree, and http://trac.macports.org/ticket/37874 suggests that macports's Qt has a patch like that too.)
In macosx-build-dependencies.sh, the following line handles the Qt issue. Doesn't it work as it should?
if $OPTION_CLANG; then
# FIX for clang
sed -i "" -e "s/::TabletProximityRec/TabletProximityRec/g" src/gui/kernel/qt_cocoa_helpers_mac_p.h
Err yes, everything is fine on HEAD. Sorry for the noise, thanks for fixing.