Skip to content

./scripts/macosx-build-dependencies.sh doesn't install cmake but assumes it's there #315

Closed
nico opened this Issue Mar 22, 2013 · 9 comments

2 participants

@nico
nico commented Mar 22, 2013

Alternatively, the README could mention that it needs to be installed.

@kintel
openscad member
kintel commented Mar 22, 2013

I fixed the README. Will add a check to the script as well.

@nico
nico commented Mar 22, 2013

Thanks!

@nico nico closed this Mar 22, 2013
@nico
nico commented Mar 23, 2013

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

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?

@nico nico reopened this Mar 23, 2013
@nico
nico commented Mar 23, 2013

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.

@nico nico closed this Mar 23, 2013
@kintel kintel reopened this Mar 25, 2013
@kintel
openscad member
kintel commented Mar 25, 2013

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)

@kintel
openscad member
kintel commented Mar 25, 2013

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):

MAC_OSX_VERSION_MIN=10.5

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..

@nico
nico commented Mar 25, 2013

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
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -23,7 +23,7 @@ BASEDIR=$PWD/../libraries
 OPENSCADDIR=$PWD
 SRCDIR=$BASEDIR/src
 DEPLOYDIR=$BASEDIR/install
-MAC_OSX_VERSION_MIN=10.5
+MAC_OSX_VERSION_MIN=10.6
 OPTION_32BIT=true
 OPTION_LLVM=false
 OPTION_CLANG=false

) works.

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.)

@kintel
openscad member
kintel commented Mar 25, 2013

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
fi

@nico
nico commented Mar 26, 2013

Err yes, everything is fine on HEAD. Sorry for the noise, thanks for fixing.

@nico nico closed this Mar 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.