git: f34213df1616 - main - cad/netgen: fix build

Adriaan de Groot adridg at FreeBSD.org
Mon Apr 12 09:18:51 UTC 2021


The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f34213df16160014b473ddb3f69e8acd10188d2f

commit f34213df16160014b473ddb3f69e8acd10188d2f
Author:     Adriaan de Groot <adridg at FreeBSD.org>
AuthorDate: 2021-04-11 21:05:35 +0000
Commit:     Adriaan de Groot <adridg at FreeBSD.org>
CommitDate: 2021-04-12 09:14:53 +0000

    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.
---
 cad/netgen/Makefile                      |  1 +
 cad/netgen/files/patch-ng_CMakeLists.txt | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/cad/netgen/Makefile b/cad/netgen/Makefile
index 6e8d84673c8b..8c2dc40e9cd7 100644
--- a/cad/netgen/Makefile
+++ b/cad/netgen/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	netgen
 PORTVERSION=	6.2.2102
+PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	cad
 
diff --git a/cad/netgen/files/patch-ng_CMakeLists.txt b/cad/netgen/files/patch-ng_CMakeLists.txt
new file mode 100644
index 000000000000..98e814b52965
--- /dev/null
+++ b/cad/netgen/files/patch-ng_CMakeLists.txt
@@ -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 )


More information about the dev-commits-ports-all mailing list