Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2021 09:18:50 GMT
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f34213df1616 - main - cad/netgen: fix build
Message-ID:  <202104120918.13C9Iou4082274@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by adridg:

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

commit f34213df16160014b473ddb3f69e8acd10188d2f
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2021-04-11 21:05:35 +0000
Commit:     Adriaan de Groot <adridg@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 )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104120918.13C9Iou4082274>