[petsc-dev] PETSc on OS X 10.8.x with Apple clang
Lawrence Mitchell
wence at gmx.li
Wed Oct 9 11:39:23 CDT 2013
On 09/10/13 17:34, Jed Brown wrote:
> Satish Balay <balay at mcs.anl.gov> writes:
>
>> The nightlybuilds on OSX are primarily with gcc. We don't have a build
>> with clang.
>>
>> I have Xcode 4.6 on OSX 10.8. I just attempted a build with clang and see errors.
>
> Definitely looks like a bug in Clang, but there are newer versions so
> there's probably no point reporting it unless you can reproduce with the
> current version.
>
This is llvm.org/bugs/show_bug.cgi?id=14249 which is not fixed in the
clang apple ships with xcode 4.6. I think the following example should
fail for you:
$ cat > foo.c <<EOF
#define INT_TYPE 0
static const int an_int __attribute__((type_tag_for_datatype(CHECK,
int))) = INT_TYPE;
int checked_call(const void *buf, int type)
__attribute__((pointer_with_type_tag(CHECK, 1, 2)));
int foo()
{
return checked_call(0, INT_TYPE);
}
EOF
$ cc -c foo.c
However, it's fixed in the clang shipped with Xcode 5.
FWIW, I too can build petsc fine with:
mpich 3.0.4
xcodebuild -version: 5A1413
mac os 10.8.5 (12F45)
Lawrence
More information about the petsc-dev
mailing list