[Dune] clang compilation error
Edscott Wilson
edscott.wilson.garcia at gmail.com
Wed Jan 16 17:31:14 CET 2019
Hi Bernd,
I figured it out. It seems that clang-6.0.1 defaults to c++14, but
std::bool_constant is c++17. I solved it by setting
CXXFLAGS="-std=c++17 -stdlib=libc++"
I suppose "set_property(TARGET tgt PROPERTY CXX_STANDARD 17)" in
CMakeLists.txt would also work for cmake >= 3.82, but I have not tested
that.
best regards,
Edscott
El mar., 15 de ene. de 2019 a la(s) 14:29, Flemisch, Bernd (
bernd.flemisch at iws.uni-stuttgart.de) escribió:
> Hi Edscott,
>
> can you post the complete output of
> make VERBOSE=1 ...
> where ... is the target that you try to compile and that triggers the
> error?
>
> Kind regards
> Bernd
>
>
>
> On Tue, Jan 15, 2019 at 8:23 PM +0100, "Ed Scott Wilson Garcia" <
> edscott at imp.mx> wrote:
>
> Hello,
>>
>> I've currently compiled the release versions of dune-2.6 and dumux-3.0 using clang 6.0.1 on a FreeBSD-12 host. In order to do this, I've set CMAKE_CXX_COMPILER=clang++, CMAKE_CXX_FLAGS=-stdlib=libc++, CMAKE_EXE_LINKER_FLAGS='-lpthread -lstdthreads -lc++' .
>>
>> But when I try to compile an example program from the dumux templates, I get
>> error: no member named 'bool_constant' in namespace 'std'
>> on the instruction (dune/common/std/type_traits.hh:102)
>> using std::bool_constant
>>
>> I'm using the same --opts file used to compile dune, but I must be missing something.
>>
>> I'm going to keep on looking for an answer, but I would appreciate it if someone on this list has any clue.
>>
>> regards,
>>
>> Edscott
>>
>> _______________________________________________
>> Dune mailing listDune at lists.dune-project.orghttps://lists.dune-project.org/mailman/listinfo/dune
>>
>> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> https://lists.dune-project.org/mailman/listinfo/dune
--
------------------------------------------------------------------------------------
Dr. Edscott Wilson Garcia
Reservoir Engineering
Mexican Petroleum Institute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20190116/65a3ff2e/attachment.htm>
More information about the Dune
mailing list