On 5/26/21 11:17 AM, Alex Cumberworth wrote:
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 suspect that you will get an endless sequence of problems beyond just this one if you go down the road of trying to address this with compiler flags. I suspect that what is happening is that you compiled and installed GCC 9.3 yourself, and then moved everything from the directory you installed it in to /opt/ohpc/pub/compiler/gcc/9.3.0? You will have to install GCC in a way so that it knows where not only its header files are, but also the libraries, the linker, etc.

What happens if you use that compiler (without passing extra flags) to compile a trivial .cc file that only #includes <cmath>?

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@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/3c7a2b5c-c610-2216-577b-4dcf46911469%40colostate.edu.

Reply via email to