Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent nggui/netgen_gui (USE_GUI) configuration triggers tcl.h error #166

Open
drew-parsons opened this issue Nov 8, 2023 · 0 comments

Comments

@drew-parsons
Copy link

I'm trying to build netgen 6.2.2305. My build configuration sets USE_OCC=ON and keeps the default USE_GUI=ON. Tcl is found (8.6.13) setting TCL_INCLUDE_PATH=/usr/include/tcl (which contains tcl.h). But the build fails at libsrc/occ/occpkg.cpp via inctcl.hpp,

[ 85%] Building CXX object CMakeFiles/nggui.dir/libsrc/occ/occpkg.cpp.o
/usr/bin/c++ -DHAVE_DLFCN_H -DHAVE_FREEIMAGE -DHAVE_FREETYPE -DHAVE_OPENGL_EXT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_XLIB -DNETGEN_PYTHON -DNG_PYTHON -DOCCGEOMETRY -DOCC_CONVERT_SIGNALS -DPARALLEL -DPYBIN
D11_SIMPLE_GIL_MANAGEMENT -Dnggui_EXPORTS -I/projects/netgen/obj-x86_64-linux-gnu -I/projects/netgen -I/projects/netgen/include -I/project/netgen/libsrc -I/projects/netgen/libsrc/include -I/usr/include/opencascade -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr
/include/python3.11 -DMPICH_SKIP_MPICXX -lmpi -fPIC -Wall -g -O2 -ffile-prefix-map=/projects/netgen=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-
protection -O2 -g -DNDEBUG -std=gnu++17 -fPIC -fvisibility=hidden -MD -MT CMakeFiles/nggui.dir/libsrc/occ/occpkg.cpp.o -MF CMakeFiles/nggui.dir/libsrc/occ/occpkg.cpp.o.d -o CMakeFiles/nggui.dir/libsrc/occ/occpkg
.cpp.o -c /projects/netgen/libsrc/occ/occpkg.cpp
...
In file included from /projects/netgen/libsrc/occ/occpkg.cpp:10:
/projects/netgen/libsrc/include/inctcl.hpp:1:10: fatal error: tcl.h: No such file or directory
    1 | #include <tcl.h>
      |          ^~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/nggui.dir/build.make:93: CMakeFiles/nggui.dir/libsrc/occ/occpkg.cpp.o] Error 1

As far as I can tell the error arises due to an inconsistency introduced in 03347e8, where (CMakeLists.txt)

target_include_directories(nggui PRIVATE ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH})

was replaced with

target_include_directories(netgen_gui INTERFACE ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH})

But libsrc/occ/CMakeLists.txt still uses

target_sources(nggui PRIVATE vsocc.cpp occpkg.cpp)

occpkg.cpp includes inctcl.hpp, so needs TCL_INCLUDE_PATH. But it is built for nggui, while TCL_INCLUDE_PATH is only added to netgen_gui

There seems to be an inconsistency between the nggui and netgen_gui targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant