From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 20 00:20:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79324803 for ; Mon, 20 Jan 2014 00:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59EEC1A3D for ; Mon, 20 Jan 2014 00:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0K0K09R027125 for ; Mon, 20 Jan 2014 00:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0K0K0Ih027124; Mon, 20 Jan 2014 00:20:00 GMT (envelope-from gnats) Resent-Date: Mon, 20 Jan 2014 00:20:00 GMT Resent-Message-Id: <201401200020.s0K0K0Ih027124@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ashish SHUKLA Received: from chateau.d.if (localhost [IPv6:::1]) by hub.freebsd.org (Postfix) with ESMTP id 01E867A6; Mon, 20 Jan 2014 00:15:19 +0000 (UTC) Received: from localhost (1001@localhost [local]); by localhost (OpenSMTPD) with ESMTPA id eae80eb6; Mon, 20 Jan 2014 05:45:18 +0530 (IST) Message-Id: <14542248059308657748.enqueue@chateau.d.if> Date: Mon, 20 Jan 2014 05:45:18 +0530 (IST) From: Ashish SHUKLA To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/185899: [PATCH] Fix building of textproc/luaexpat Cc: lx@FreeBSD.org X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Ashish SHUKLA List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2014 00:20:00 -0000 >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 .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: