tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

devel/gnustep-objc: Undefined references to libunwind symbols



Hello,

devel/gnustep-objc currently doesn't build due to this linkage failure:
http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20220904.2257/gnustep-objc-1.8.1/build.log

The library does refer to symbols from LLVM libunwind without linking with -lunwind, but what confuses me is that exactly the same package built fine on Feb 25 2022. To my surprise libobjc at that time did contain definitions of those symbols even though the source code didn't.

Does anyone have any clue what's going on? I can build the package with the attached diff, but I'm not sure if it's the correct way to fix it.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gnustep-objc/Makefile,v
retrieving revision 1.36
diff -u -u -r1.36 Makefile
--- Makefile	28 Nov 2021 15:45:13 -0000	1.36
+++ Makefile	8 Sep 2022 09:44:24 -0000
@@ -20,6 +20,10 @@
 MAKE_ENV+=			MAJOR_VERSION=4
 MAKE_ENV+=			MINOR_VERSION=6
 
+# libobjc uses symbols from LLVM libunwind (see ${WRKSRC}/unwind-itanium.h)
+# but CMakeLists.txt does not mention the library.
+LDFLAGS+=			-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib -lunwind
+
 INSTALLATION_DIRS=		lib include/objc
 
 do-configure:
@@ -41,5 +45,6 @@
 PLIST.objcxx=	yes
 .endif
 
+.include "../../lang/libunwind/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index