> mail/rspamd

http://build-failures.rhaalovely.net/amd64/2020-08-07/mail/rspamd.log

--8<--
ld: error: /usr/local/lib/libluajit-5.1.so.1.0: undefined reference to 
_Unwind_DeleteException
ld: error: /usr/local/lib/libluajit-5.1.so.1.0: undefined reference to 
_Unwind_GetCFA
ld: error: /usr/local/lib/libluajit-5.1.so.1.0: undefined reference to 
_Unwind_RaiseException
ld: error: /usr/local/lib/libluajit-5.1.so.1.0: undefined reference to 
_Unwind_SetGR
ld: error: /usr/local/lib/libluajit-5.1.so.1.0: undefined reference to 
_Unwind_SetIP
-->8--

This is fixed by linking libluajit.so with libc++abi (which ships the
required the required unwind symbols).  TARGET_LDFLAGS were only used to
link the luajit interpreter, not the library. I suspect that a few other
ports can benefit from this diff.

I have no idea why ld.lld starts looking at undefined symbols in library
dependencies (cc'ing kettenis so that he knows about this case).

ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/luajit/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- Makefile    12 Jul 2019 20:47:19 -0000      1.30
+++ Makefile    9 Aug 2020 10:17:32 -0000
@@ -11,7 +11,7 @@ SHARED_LIBS +=        luajit-${MODLUA_VERSION} 
 
 COMMENT =      just-in-time compiler for Lua
 V =            2.0.5
-REVISION =     1
+REVISION =     2
 DISTNAME =     LuaJIT-${V}
 PKGNAME =      ${DISTNAME:L}
 
@@ -61,7 +61,7 @@ do-test:
 .include <bsd.port.arch.mk>
 
 .if ${PROPERTIES:Mclang}
-MAKE_FLAGS += TARGET_LDFLAGS='-lc++abi -lpthread'
+MAKE_FLAGS += TARGET_LIBS='-lc++abi -lpthread'
 WANTLIB +=     c++abi pthread
 .endif
 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/luajit/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   3 May 2014 14:24:03 -0000       1.2
+++ pkg/PLIST   9 Aug 2020 10:17:32 -0000
@@ -8,12 +8,10 @@ include/luajit-2.0/luaconf.h
 include/luajit-2.0/luajit.h
 include/luajit-2.0/lualib.h
 @comment lib/libluajit-${MODLUA_VERSION}.so
-lib/libluajit-${MODLUA_VERSION}.a
+@static-lib lib/libluajit-${MODLUA_VERSION}.a
 @lib lib/libluajit-${MODLUA_VERSION}.so.${LIBluajit-${MODLUA_VERSION}_VERSION}
-lib/lua/${MODLUA_VERSION}/
 lib/pkgconfig/luajit.pc
 @man man/man1/luajit.1
-share/lua/${MODLUA_VERSION}/
 share/lua/${MODLUA_VERSION}/jit/
 share/lua/${MODLUA_VERSION}/jit/bc.lua
 share/lua/${MODLUA_VERSION}/jit/bcsave.lua


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to