Closed annegehrke closed 1 year ago
Did you recompile with -fPIC
? (position-independent code)
Yes, we have tried that already. Unfortunately, the above error remains.
Did you use c++filt do demangle the name? It loooks like it is dstore(double). Can you compile tetgen
standalone?!
Also much more details are required about the toolchain and the operating system.
That's a good point. @annegehrke, could you elaborate on that? Also you could try the suggestion by @stephanmg, typing
echo _Z6dstored | c++filt -s
after you get the build error message. Building tetgen
standalone seems to work, at least as library. @annegehrke, maybe try compiling tetgen
by
make tetgen
instead of
make tetlib
as well.
I'm still betting it's an fPIC issue.
The tetgen lib (of the ug4 tool) is statically built without -fPIC added to the compiler flags.
When you add the line
set_property(TARGET tet PROPERTY POSITION_INDEPENDENT_CODE ON)
after the add_library command in tools/tetgen/CMakeLists.txt and recompile, does that resolve the issue?
Thank you very much for your contributions!
I tested the advise of @bsumirak but it made no difference (CXXFLAGS = -03 -fPIC
was still set). I got the same error message.
It was possible to build the tetgen standalone by typing make tetgen
.
@stephanmg Your guess was right: echo _Z6dstored | c++filt
yielded dstore(double)
. What does that mean?
FIY:
CXXFLAGS = -03 -fPIC
instead of line 22 in the tetgen makefile:
https://github.com/UG4/tool_tetgen/blob/0d664a9831da2292ab48ba44880edd3ebbb211f0/makefile#L22
This has previously resolved the same kind of issue in case of a Ubuntu on Windows Subsystem for Linux build.
@annegehrke yeah I checked this already, not really helpful. I think @bsumirak hinting to was a good idea, try if this or @mastep84 version helps.
Btw.: Could you state your OS and toolchain?
Pondering this once more, I first want to clarify what your setup is. This is what I gather, correct me if I am wrong:
If that is the case, then modifications to the tetgen CMakeFile would not make any difference. But I think I know what is happening nonetheless. Please try the following:
Working now?
@bsumirak Thank you very much for the solution of the problem! You guessed right about my setup and you suggested the right approach :) I could compile ug4 now with tetgen and already tested it by creating a geometry.
Many thanks also to @stephanmg and @mastep84 for your help :)
The following error message appeared when I tried to compile UG4 with tetgen (the path to tetgen is correct) on a linux machine:
Does anyone have an idea what went wrong?