[Dune] UG-3.10.0 with Apple's clang compiler
Oliver Sander
sander at igpm.rwth-aachen.de
Fri Apr 11 12:17:05 CEST 2014
Hi Christoph,
setting either _2 or _3 from the command line is the UG way of setting the grid dimension.
Apparently, the same cpp symbol is also used somewhere inside clang++. Luckily, UG
renames the _2 macro almost immediately. Try renaming the occurrences of _2 in
ug/low/dimension.h to something else, and make the corresponding change in the build
system. No guarantees, though.
Cheers,
Oliver
Am 11.04.2014 12:06, schrieb Christoph GrĂ¼ninger:
> Hi Dune and UG and Mac users,
> one of our students uses a Mac (10.9, current command line tools) and
> tried to compile UG. He got an error from the libc++:
>
>> libtool: compile: clang++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../low -I../../gm -I../../dev -I../../dom -I../../np -I../../ui -I../../graphics/uggraph -I../../np/algebra -I../../np/udm -I../../np/procs -I../../parallel -I../../parallel/ddd -I../../parallel/ppif -I../../parallel/ddd/include -I../../parallel/dddif -I../../parallel/util -DUGLIB -DFOR_DUNE -D_2 -g -O2 -MT libdomS2_la-std_domain.lo -MD -MP -MF .deps/libdomS2_la-std_domain.Tpo -c std_domain.c -o libdomS2_la-std_domain.o
>> clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
>> In file included from std_domain.c:54:
>> In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/set:388:
>> In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/functional:1203:
>> /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/__functional_03:1876:18: error: expected unqualified-id
>> extern __ph<2> _2;
>> ^
>> <command line>:4:12: note: expanded from here
>> #define _2 1
>> ^
>
> I don't know what to do about that. Because of some other constraints he
> doesn't want to install GCC or Clang from MacPorts.
> Has anybody successfully compiled UG with Apple' clang? Or any hint?
>
> Thanks
> Christoph
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 534 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140411/ea5260d2/attachment.sig>
More information about the Dune
mailing list