It seems that the issues stem from not setting the include directories 
properly. Even with CPATH, C_INCLUDE_PATH, and CPLUS_INCLUDE_PATH set as I 
mentioned in my previous response, I am running into errors. The 
compilation proceeds for a while, but then at some point when cmath is 
included, it fails to find math.h,

[ 42%] Building CXX object 
source/sundials/CMakeFiles/obj_sundials_release.dir/arkode.cc.o

In file included from 
/home/ipausers/cumberworth/src/dealii-9.2.0/include/deal.II/base/numbers.h:28,
                 from 
/home/ipausers/cumberworth/src/dealii-9.2.0/build/include/deal.II/base/config.h:449,
                 from 
/home/ipausers/cumberworth/src/dealii-9.2.0/source/sundials/arkode.cc:17:
/opt/ohpc/pub/compiler/gcc/9.3.0/include/c++/9.3.0/cmath:45:15: fatal 
error: math.h: No such file or directory
   45 | #include_next <math.h>
      |               ^~~~~~~~
compilation terminated.

If I use make VERBOSE=1, I can manually modify the command to include

-isystem /opt/ohpc/pub/compiler/gcc/9.3.0/include/c++/9.3.0

which solves that issue, but I don't know how to add this during 
configuration. I tried setting

CMAKE_CXX_FLAGS_DEBUGRELEASE     -isystem 
/opt/ohpc/pub/compiler/gcc/9.3.0/include/c++/9.3.0

But it seems to put the flag in the wrong order, as it still is unable to 
find math.h.

In compiling a later file, it is unable to find the sacado header file, 
although it exists on the system and cmake seemed to indicate it had found 
the headers. I have set

SACADO_CONFIG_H                  
/opt/ohpc/pub/libs/gnu9/mpich/trilinos/13.0.0/include
SACADO_TRAD_HPP                  
/opt/ohpc/pub/libs/gnu9/mpich/trilinos/13.0.0/include

but this doesn't work.

In file included from 
/home/ipausers/cumberworth/src/dealii-9.2.0/build/include/deal.II/base/config.h:449,
                 from 
/home/ipausers/cumberworth/src/dealii-9.2.0/include/deal.II/base/exceptions.h:19,
                 from 
/home/ipausers/cumberworth/src/dealii-9.2.0/source/dofs/dof_objects.cc:16:
/home/ipausers/cumberworth/src/dealii-9.2.0/include/deal.II/base/numbers.h:151:12:
 
fatal error: Sacado.hpp: No such file or directory
  151 | #  include <Sacado.hpp>
      |            ^~~~~~~~~~~~
compilation terminated.

Again, I can set

-I/opt/ohpc/pub/libs/gnu9/mpich/trilinos/13.0.0/include

to compile, but then there are still further issues with other headers not 
being found.

Best,

Alex
On Monday, May 24, 2021 at 5:22:57 p.m. UTC+2 Wolfgang Bangerth wrote:

> On 5/21/21 11:03 AM, Alex Cumberworth wrote:
> > 
> > I don't really see how this can be, as this version of the compiler 
> fully 
> > supports C++11. I also tried setting the flag DEAL_II_CXX_VERSION_FLAG, 
> but 
> > using valid standard specifiers just results in errors like "The 
> supplied flag 
> > "c++11" was not recognized by the compiler." To be clear, I ran
> > 
> > cmake .. -DDEAL_II_CXX_VERSION_FLAG=c++11
>
> Try
> cmake .. -DDEAL_II_CXX_VERSION_FLAG="-std=c++11"
> or
> cmake .. -DDEAL_II_CXX_VERSION_FLAG=-std=c++11
> and see whether that works.
>
> GCC 9.2 is new enough so that it should work. There is probably something 
> else 
> that doesn't work, and you can find out what that is by looking at
> CMakeFiles/CMakeOutput.log
> CMakeFiles/CMakeError.log
>
> These files are lengthy, so it may take a bit of searching for the place 
> where 
> the C++11 flags are set.
>
> Best
> W.
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/afdb75a3-90dc-49a7-b0b2-6217a40d77dcn%40googlegroups.com.

Reply via email to