- Thank you received: 0
Preserving the directory structure of include files using 'make install'
5 years 4 months ago #1702
by Jeremy
Hello everyone,
For my project I am using an in-house written HDG-code that is built by including header files of the install directory ngsolve-install. To date, I have been using Netgen/NGSolve 5.0.0 for this purpose.
After the User Meeting I wanted to compile the code with the latest version of NGSolve. Off course, many syntax changes have to be made in the c++-files of the HDG-code, but I cannot manage to compile the code without adapting the header files in ngsolve-install/include (which I want to avoid at all times).
The problem are header files such as nginterface.h that include header files in wrong directories,
This should be:
However, this would be incorrect if you consider the directory
ngsolve-src/external_dependencies/netgen/libsrc/include.
From here you indeed get access to ngcore.hpp by first going back to libsrc.
Moreover, I noticed that the directory libsrc/include contains nginterface.h, nginterface_v2.hpp and nginterface_v2_impl.hpp.
The directory ngsolve-install/include contains only the first two, whereas nginterface_v2_impl.hpp is put into the subdirectory ngsolve-install/include/include/.
(I am not very experienced with Make in general, so my next question may be very generic/basic)
Is there a specific reason why make install does not preserve the directory structure as in the Netgen/NGSolve source directories?
Friendly greetings,
Jeremy
For my project I am using an in-house written HDG-code that is built by including header files of the install directory ngsolve-install. To date, I have been using Netgen/NGSolve 5.0.0 for this purpose.
After the User Meeting I wanted to compile the code with the latest version of NGSolve. Off course, many syntax changes have to be made in the c++-files of the HDG-code, but I cannot manage to compile the code without adapting the header files in ngsolve-install/include (which I want to avoid at all times).
The problem are header files such as nginterface.h that include header files in wrong directories,
Code:
#include "../core/ngcore.hpp"
Code:
#include "core/ngcore.hpp"
However, this would be incorrect if you consider the directory
ngsolve-src/external_dependencies/netgen/libsrc/include.
From here you indeed get access to ngcore.hpp by first going back to libsrc.
Moreover, I noticed that the directory libsrc/include contains nginterface.h, nginterface_v2.hpp and nginterface_v2_impl.hpp.
The directory ngsolve-install/include contains only the first two, whereas nginterface_v2_impl.hpp is put into the subdirectory ngsolve-install/include/include/.
(I am not very experienced with Make in general, so my next question may be very generic/basic)
Is there a specific reason why make install does not preserve the directory structure as in the Netgen/NGSolve source directories?
Friendly greetings,
Jeremy
5 years 4 months ago #1705
by matthiash
Replied by matthiash on topic Preserving the directory structure of include files using 'make install'
Hello Jeremy,
Thank you for the report. There were many changes concerning the ngcore lib recently. Please check again with the latest master if your issues still remain.
Best,
Matthias
Thank you for the report. There were many changes concerning the ngcore lib recently. Please check again with the latest master if your issues still remain.
Best,
Matthias
5 years 4 months ago #1707
by Jeremy
Replied by Jeremy on topic Preserving the directory structure of include files using 'make install'
Hello Matthias,
Thank you for offering your help.
The header files in nginterface.h and nginterface_v2.hpp are now set correctly. However, I stumbled upon a few more issues. Here is a quick summary:
Changing the above lines is however not sufficient to build the HDG-code. Now I get stuck on a more intrinsic issue.
In nginterface_v2.hpp:251 there is a class Mesh that is a forward declaration, which results in the following compilation error
(full compilation log can be found in
)
If I change the class declaration in nginterface_v2.hpp:251 (class Mesh {}), then I get a more problematic error:
(full compilation log can be found in
)
I'm not sure if this is due to some incorrect implementation in the HDG-code. Any help is very much appreciated.
Friendly greetings,
Jeremy
Thank you for offering your help.
The header files in nginterface.h and nginterface_v2.hpp are now set correctly. However, I stumbled upon a few more issues. Here is a quick summary:
- soldata.hpp
Code:#include <myadt.hpp>Code:#include "include/myadt.hpp"
- include/myadt.hpp
Code:#include <../general/myadt.hpp>Code:#include "../general/myadt.hpp"
- vtkoutput.hpp
All instances of 'ELEMENT_MAXPOINTS' changed to 'NG_ELEMENT_MAXPOINTS'
Changing the above lines is however not sufficient to build the HDG-code. Now I get stuck on a more intrinsic issue.
In nginterface_v2.hpp:251 there is a class Mesh that is a forward declaration, which results in the following compilation error
Code:
/home/ngsolve19/ngsuite2/ngsolve-install/include/core/archive.hpp: In instantiation of ‘ngcore::Archive& ngcore::Archive::operator&(std::shared_ptr<_Tp>&) [with T = netgen::Mesh]’:
...
error: invalid use of incomplete type ‘class netgen::Mesh’
logger->debug("Store shared ptr of type {}", Demangle(typeid(T).name()));
If I change the class declaration in nginterface_v2.hpp:251 (class Mesh {}), then I get a more problematic error:
Code:
/home/ngsolve19/ngsuite2/ngsolve-install/include/core/archive.hpp:474:55: error: no match for ‘operator&’ (operand types are ‘ngcore::Archive’ and ‘netgen::Mesh’)
return (*this) << -1 & (*p);
I'm not sure if this is due to some incorrect implementation in the HDG-code. Any help is very much appreciated.
Friendly greetings,
Jeremy
Attachments:
Time to create page: 0.107 seconds