Building the NGS-Suite and ngsxfem together

More
4 years 7 months ago #2507 by nepomuk
Hi,
I'm quite a newby to Linux (using Ubuntu 19.10) and had some troubles while installing NGS and xfem together. I did the following (sudo where necessary):
Code:
cd usr/share git clone https://github.com/ngsxfem/ngsxfem.git cd ngsxfem mkdir build git submodule update --init cd build cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/share -DBUILD_NGSOLVE=ON

and got the following response:
Code:
... ... [ 81%] Building CXX object comp/CMakeFiles/ngcomp.dir/pde.cpp.o /usr/share/ngsxfem/external_dependencies/ngsolve/comp/pde.cpp:8:10: fatal error: tcl.h: Datei oder Verzeichnis nicht gefunden 8 | #include <tcl.h> | ^~~~~~~ compilation terminated. make[5]: *** [comp/CMakeFiles/ngcomp.dir/build.make:479: comp/CMakeFiles/ngcomp.dir/pde.cpp.o] Fehler 1 make[4]: *** [CMakeFiles/Makefile2:507: comp/CMakeFiles/ngcomp.dir/all] Fehler 2 make[3]: *** [Makefile:141: all] Fehler 2 make[2]: *** [CMakeFiles/ngsolve.dir/build.make:116: dependencies/Stamp/ngsolve/ngsolve-build] Fehler 2 make[1]: *** [CMakeFiles/Makefile2:222: CMakeFiles/ngsolve.dir/all] Fehler 2 make: *** [Makefile:152: all] Fehler 2 [ 30%] Built target netgen_project ... ... [ 61%] Built target ngfem [ 61%] Building CXX object comp/CMakeFiles/ngcomp.dir/pde.cpp.o /usr/share/ngsxfem/external_dependencies/ngsolve/comp/pde.cpp:8:10: fatal error: tcl.h: Datei oder Verzeichnis nicht gefunden 8 | #include <tcl.h> | ^~~~~~~ compilation terminated. make[5]: *** [comp/CMakeFiles/ngcomp.dir/build.make:479: comp/CMakeFiles/ngcomp.dir/pde.cpp.o] Fehler 1 make[4]: *** [CMakeFiles/Makefile2:507: comp/CMakeFiles/ngcomp.dir/all] Fehler 2 make[3]: *** [Makefile:141: all] Fehler 2 make[2]: *** [CMakeFiles/ngsolve.dir/build.make:116: dependencies/Stamp/ngsolve/ngsolve-build] Fehler 2 make[1]: *** [CMakeFiles/Makefile2:222: CMakeFiles/ngsolve.dir/all] Fehler 2 make: *** [Makefile:152: all] Fehler 2 CMake Error at CMakeLists.txt:91 (find_package): Could not find a package configuration file provided by "NGSolve" with any of the following names: NGSolveConfig.cmake ngsolve-config.cmake Add the installation prefix of "NGSolve" to CMAKE_PREFIX_PATH or set "NGSolve_DIR" to a directory containing one of the above files. If "NGSolve" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! See also "/usr/share/ngsxfem/build/CMakeFiles/CMakeOutput.log".

I attached the CMakeOutput.log

What went wrong - what should I do? Thanks a lot for the help!
More
4 years 7 months ago #2508 by schruste
Hi nepomuk,

To build from sources you require a few libraries, see ngsolve.org/docu/latest/install/installlinux.html

You should do the following first:
sudo apt-get update && sudo apt-get -y install python3 python3-tk libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev liblapacke-dev

Furthermore as installation location you should use /usr instead of /usr/share. Even better is to use a user local installation.

Best,
Christoph
More
4 years 7 months ago #2509 by nepomuk
Hi Christoph,

thanks for your quick reply.

So I first did the commands you told me, then I cloned ngsxfem to /home/nepomuk. Should I do also the other steps performed at ngsolve.org/docu/latest/install/installlinux.html first, or can I proceed with the cmake command?

Best, Nepomuk
More
4 years 7 months ago #2510 by schruste
Hi,

ngsxfem builds ngsolve, so you can directly step to the cmake command. However, the section "Finishing the installation" is again relevant to make use of the local installation once the installation was successful.

Good luck,
Christoph
More
4 years 7 months ago #2511 by nepomuk
Hi Christoph,
doing the cmake command (what took a lot of time as the other times I tried) it hanged up again and threw an error at the same point I describe in my first post.

Trying to do the make command anyway didn't work.

What went wrong?

BR, Nepomuk
More
4 years 7 months ago #2512 by schruste
Hi,

I don't really know. As it is a problem already appearing in the NGSolve-part of the installation, I recommend you try to install ngsolve from scratch first (without xfem) and only afterwards try to involve ngsxfem.

Alternatively, you can also install ngsolve binaries on ubuntu, see ngsolve.org/downloads . Check if the corresponding ngsolve installation works. If yes, try to build ngsxfem, but this time with BUILD_NGSOLVE=OFF .

Best,
Christoph
Time to create page: 0.108 seconds