While libmesh builds fine on OSX 10.9 with a hand-built GCC, apparently the
same cannot be said for a hand-built clang (or maybe any clang?).  We
specifically tried the following one (since it includes OpenMP support)

$ clang++ --version
> clang version 3.3.1 
> (https://github.com/clang-omp/clang47e909e53fa2eef93a2d14fc46d326c2ac18e44d) (
> https://github.com/clang-omp/llvmb488751c4fd745867e44dedb160c480bd37b3dc9)
>


and it produces the following error while building netcdf:



> In file included from ../../../../../contrib/netcdf/v4/ncgen3/load.c:14:
> ../../../../../contrib/netcdf/v4/ncgen3/genlib.h:84:15: error: expected
> parameter declarator
> extern size_t strlcat(char *dst, const char *src, size_t siz);
>               ^
> /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
>   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
>                                            ^
> /usr/include/secure/_common.h:39:62: note: expanded from macro
> '__darwin_obsz'
> #define __darwin_obsz(object) __builtin_object_size (object,
> _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>                                                              ^
> /usr/include/secure/_common.h:30:32: note: expanded from macro
> '_USE_FORTIFY_LEVEL'
> #    define _USE_FORTIFY_LEVEL 2
>                                ^



I've seen a couple of other threads [0,1] which report basically the same
problem on clang/OSX 10.9.  The latter eventually ended in a patch that
added -fno-builtin to the list of compiler flags to work around the
problem.  I tried that, but it didn't seem to fix the issue.  I don't know
what the right solution is, and it's kind of important because apparently
/usr/bin/gcc is _actually clang_ on Mavericks:

$ /usr/bin/gcc --version
> Configured with: --prefix=/Library/Developer/CommandLineTools/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



And, although I haven't tried installing it yet, GCC is supposedly not part
of Xcode 5.0 either [2].

[0] https://github.com/Homebrew/homebrew-science/issues/369
[1] https://code.google.com/p/go/issues/detail?id=6506
[2]
http://stackoverflow.com/questions/19061966/how-to-use-a-recent-gcc-with-xcode-5

-- 
John
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to