[haiku-development] Re: Trouble building @vmware-image on Mac OS X 10.9 Mavericks

  • From: Simon Taylor <simontaylor1@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 29 Oct 2013 08:24:37 +0000

On 29 Oct 2013, at 01:24, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> The makebootable code actually always tries to read the resources and only 
> when that fails it reads the attribute, regardless of the platform for which 
> it is compiled. So scratch that. The issue is indeed just that the exception 
> thrown in ResourceFile::_InitFile() isn't caught in ResourceFile::SetTo() 
> despite the matching catch statement. Why that is I do not know.

I’ve just switched to Mavericks too and found some slightly odd stuff when 
compiling things from the command line:

1) It looks like gcc has been completely removed now. g++ still exists, but 
appears just to invoke clang. I’ve never tried compiling Haiku from OS X, but I 
think the clang build works now?

$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

2) The default c++ library is now libc++ rather than libstdc++. I was bitten by 
a weird linking error which turned out to be a difference in the c++ library 
between the dylib and the code I was trying to link it with. Functions with 
parameters such as std::vector<int>& wouldn’t link.

I suspect this might also have something to do with exceptions. It took me a 
while to track this one down as neither library nor executable compilation used 
the option to select the c++ lib. It turned out in the end the 
-mmacosx-version-min=10.6 ends up setting it to libstdc++. Setting 
-stdlib=libstdc++ seemed to have the same effect.

Simon

Other related posts: