cad/netgen: fix build

ld: error: libsrc/interface/libinterface.so: undefined reference to
	pthread_create [--no-allow-shlib-undefined]

This has been happening for over a month since an LLVM update
made it more sensitive to symbol-issues. I can't spot any
direct pthreads usage in the source, though, so the patch
is just a bodge.
This commit is contained in:
Adriaan de Groot 2021-04-11 23:05:35 +02:00
parent 251da67b65
commit f34213df16
2 changed files with 15 additions and 0 deletions

View file

@ -2,6 +2,7 @@
PORTNAME= netgen
PORTVERSION= 6.2.2102
PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= cad

View file

@ -0,0 +1,14 @@
To fix this linker error:
ld: error: libsrc/interface/libinterface.so: undefined reference to pthread_create [--no-allow-shlib-undefined]
bang pthread into the executable. It's not a **good** fix, though.
--- ng/CMakeLists.txt.orig 2021-03-18 07:16:55 UTC
+++ ng/CMakeLists.txt
@@ -32,6 +32,7 @@ if(USE_GUI)
endif(NOT APPLE)
target_link_libraries( netgen nglib gui netgen_python ${MPI_mpi_LIBRARY} ${MPI_CXX_LIBRARIES} ${LIBTOGL} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_Xmu_LIB} ${X11_X11_LIB} ${OCC_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY})
+ target_link_libraries( netgen pthread )
if(NOT WIN32)
target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis )