pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/54501: devel/lua-bitlib broken on macOS patch
>Number: 54501
>Category: pkg
>Synopsis: devel/lua-bitlib broken on macOS patch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 29 07:05:00 +0000 2019
>Originator: clement bouvier
>Release: current
>Organization:
>Environment:
macosx mojave 10.14.6
>Description:
The linker does not recognize flags like -fPIC and -shared.
===> Building for lua51-bitlib-5.3.0
clang -O2 -pipe -I/Users/cbouvier/pkg/include/lua-5.1 -fPIC -c -I /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/c-api /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/lbitlib.c -o /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/bit32.o
ld -L/Users/cbouvier/pkg/lib -L/usr/lib -shared /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/bit32.o -o /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/bit32.so
ld: unknown option: -shared
===> Building for lua51-bitlib-5.3.0
clang -O2 -pipe -I/Users/cbouvier/pkg/include/lua-5.1 -fPIC -c -I /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/c-api /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/lbitlib.c -o /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/bit32.o
ld -L/Users/cbouvier/pkg/lib -L/usr/lib -fPIC -shared /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/bit32.o -o /Users/cbouvier/prj/pkgsrc/devel/lua-bitlib/work/lua-compat-5.2-bitlib-5.3.0/bit32.so
ld: unknown option: -fPIC
>How-To-Repeat:
build the package
>Fix:
The following patch:
* Use libtool for compiling, linking and installing the package.
* Change ${LUA_CDIR}/bit32 into ${LUA_CDIR} (Maybe I am wrong but I don't understand why it is not LUA_CDIR directly).
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/lua-bitlib/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile 20 Nov 2018 17:26:20 -0000 1.1
+++ Makefile 29 Aug 2019 07:02:16 -0000
@@ -16,17 +16,16 @@
LUA_VERSIONS_ACCEPTED= 51
NO_CONFIGURE= yes
+USE_LIBTOOL= yes
-INSTALLATION_DIRS+= ${LUA_CDIR}/bit32
-
-.include "../../lang/lua/module.mk"
+INSTALLATION_DIRS+= ${LUA_CDIR}
do-build:
- ${CC} ${CFLAGS} -fPIC -c -I ${WRKSRC}/c-api ${WRKSRC}/lbitlib.c -o ${WRKSRC}/bit32.o
- ${LD} ${LDFLAGS} -fPIC -shared ${WRKSRC}/bit32.o -o ${WRKSRC}/bit32.so
+ ${LIBTOOL} --tag=CC --mode=compile ${CC} ${CFLAGS} -fPIC -I ${WRKSRC}/c-api -c -o ${WRKSRC}/bit32.lo ${WRKSRC}/lbitlib.c
+ ${LIBTOOL} --tag=CC --mode=link ${CC} ${LDFLAGS} -rpath ${PREFIX}/${LUA_CDIR} -shared -module -avoid-version -export-dynamic -o ${WRKSRC}/bit32.la ${WRKSRC}/bit32.lo
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/bit32.so \
- ${DESTDIR}${PREFIX}/${LUA_CDIR}
+ ${LIBTOOL} --mode=install ${INSTALL_DATA} ${WRKSRC}/bit32.la ${DESTDIR}${PREFIX}/${LUA_CDIR}
+.include "../../lang/lua/module.mk"
.include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/lua-bitlib/PLIST,v
retrieving revision 1.1
diff -u -r1.1 PLIST
--- PLIST 20 Nov 2018 17:26:20 -0000 1.1
+++ PLIST 29 Aug 2019 07:02:16 -0000
@@ -1,2 +1,2 @@
@comment $NetBSD: PLIST,v 1.1 2018/11/20 17:26:20 maya Exp $
-${LUA_CDIR}/bit32.so
+${LUA_CDIR}/bit32.la
Home |
Main Index |
Thread Index |
Old Index