Date: Mon, 20 Jan 2014 05:45:18 +0530 (IST) From: Ashish SHUKLA <ashish@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Cc: lx@FreeBSD.org Subject: ports/185899: [PATCH] Fix building of textproc/luaexpat Message-ID: <14542248059308657748.enqueue@chateau.d.if> Resent-Message-ID: <201401200020.s0K0K0Ih027124@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 185899 >Category: ports >Synopsis: [PATCH] Fix building of textproc/luaexpat >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 20 00:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Ashish SHUKLA >Release: FreeBSD 9.2-RELEASE amd64 >Organization: The FreeBSD Project >Environment: System: FreeBSD chateau.d.if 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Building textproc/luaexpat fails with following error: λ make ===> lua51-luaexpat-1.2.0 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by lua51-luaexpat-1.2.0 for building ===> Extracting for lua51-luaexpat-1.2.0 => SHA256 Checksum OK for luaexpat-1.2.0.tar.gz. ===> Patching for lua51-luaexpat-1.2.0 ===> Applying FreeBSD patches for lua51-luaexpat-1.2.0 ===> lua51-luaexpat-1.2.0 depends on shared library: expat.6 - found ===> lua51-luaexpat-1.2.0 depends on shared library: lua-5.1.1 - found ===> Configuring for lua51-luaexpat-1.2.0 ===> Building for lua51-luaexpat-1.2.0 clang -O2 -g -march=corei7 -Wall -pedantic -Waggregate-return -Wcast-align -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wwrite-strings -ansi -O2 -I/usr/local/include/lua51 -I/usr/local/lib/lua/5.1 -I/usr/local/include -c src/lxplib.c export MACOSX_DEPLOYMENT_TARGET="10.3"; clang -o src/lxp.so.1.2.0 -L/usr/local/lib -shared lxplib.o -lexpat /usr/bin/ld: lxplib.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC lxplib.o: could not read symbols: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) *** [src/lxp.so.1.2.0] Error code 1 1 error ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** [do-build] Error code 1 Stop in /home/abbe/ports/textproc/luaexpat. λ make -V CFLAGS -O2 -g -march=corei7 -fPIC -fstack-protector -fno-strict-aliasing The attached diff not only fixes the above mentioned issue, but also STAGEifies the port. Thanks! Maintainer is CC'ed. >How-To-Repeat: λ sudo make -C /usr/ports/textproc/luaexpat build >Fix: Index: Makefile =================================================================== --- Makefile (revision 340358) +++ Makefile (working copy) @@ -13,6 +13,7 @@ LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 +USES= gmake MAKEFILE= makefile ALL_TARGET= lib USE_LUA= 5.0-5.1 @@ -21,7 +22,6 @@ CFLAGS+= -fPIC -NO_STAGE= yes .include <bsd.port.pre.mk> .if ${LUA_VER} == 5.0 Index: files/patch-makefile =================================================================== --- files/patch-makefile (revision 340358) +++ files/patch-makefile (working copy) @@ -1,6 +1,9 @@ ---- makefile.orig 2009-06-25 06:07:16.000000000 +0000 -+++ makefile 2009-06-25 06:23:06.000000000 +0000 -@@ -4,15 +4,11 @@ + +$FreeBSD$ + +--- makefile.orig ++++ makefile +@@ -4,10 +4,6 @@ include $(CONFIG) @@ -11,9 +14,20 @@ OBJS= src/lxplib.o $(COMPAT_O) lib: src/$(LIBNAME) - src/$(LIBNAME) : $(OBJS) -- export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) -o src/$(LIBNAME) $(LIB_OPTION) $(OBJS) -lexpat -+ export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) -o src/$(LIBNAME) $(LIB_OPTION) lxplib.o $(COMPAT_O) -lexpat +@@ -18,11 +14,11 @@ + $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c - $(COMPAT_DIR)/compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c - $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c + install: +- mkdir -p $(LUA_LIBDIR) +- cp src/$(LIBNAME) $(LUA_LIBDIR) +- cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so +- mkdir -p $(LUA_DIR)/$T +- cp src/$T/lom.lua $(LUA_DIR)/$T ++ mkdir -p $(DESTDIR)$(LUA_LIBDIR) ++ cp src/$(LIBNAME) $(DESTDIR)$(LUA_LIBDIR) ++ cd $(DESTDIR)$(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so ++ mkdir -p $(DESTDIR)$(LUA_DIR)/$T ++ cp src/$T/lom.lua $(DESTDIR)$(LUA_DIR)/$T + + clean: + rm -f src/$(LIBNAME) $(OBJS) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14542248059308657748.enqueue>