From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 29 11:33:41 2014 Return-Path: Delivered-To: freebsd-ports-bugs@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 06BD06B5 for ; Fri, 29 Aug 2014 11:33:41 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0CF11E7B for ; Fri, 29 Aug 2014 11:33:40 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s7TBXeSd057315 for ; Fri, 29 Aug 2014 11:33:40 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 193120] New: [bsd.xfce.mk] erroneously poisons CPPFLAGS with -L${LOCALBASE}/lib Date: Fri, 29 Aug 2014 11:33:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: amdmi3@FreeBSD.org X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2014 11:33:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193120 Bug ID: 193120 Summary: [bsd.xfce.mk] erroneously poisons CPPFLAGS with -L${LOCALBASE}/lib Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Many People Priority: Normal Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: amdmi3@FreeBSD.org Created attachment 146483 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=146483&action=edit bsd.xfce.mk.patch xfce4-notification-daemon haven't built without my fix: --- /usr/bin/ld: .libs/theme.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC .libs/theme.o: could not read symbols: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) --- the fix (r366484): --- Index: Makefile =================================================================== --- Makefile (revision 366483) +++ Makefile (revision 366484) @@ -26,6 +26,7 @@ USE_GNOME= librsvg2 USE_LDCONFIG= yes USE_XFCE= configenv libutil libgui +CFLAGS+= -fPIC CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/xfce4 \ --libexecdir=${PREFIX}/libexec/xfce4 \ --- tijl@ pointed out that it's not quite correct: --- > Can you check config.log to see if the configure test for -fPIC fails > without this change? > Adding -fPIC to CFLAGS is a big hammer solution for what is usually a > small problem and it causes executables and static libraries to be > compiled with -fPIC as well when normally only shared libraries have > to be compiled with it. --- after investigation, I've found out that -fPIC test in configure really fails as configure checks for -fPIC support not by analyzing compiler exit code by by checking if it emits a warning (as it's expected to emit a warning and ignore -fPIC if it's not supported). This check fails, as compiler does emit a warning: --- configure:7357: checking for cc option to produce PIC configure:7567: result: -fPIC configure:7575: checking if cc PIC flag -fPIC works configure:7593: cc -c -O2 -pipe -fno-strict-aliasing -I/usr/local/include -L/usr/local/lib -fPIC -DPIC conftest.c >&5 cc: warning: argument unused during compilation: '-L/usr/local/lib' configure:7597: $? = 0 configure:7610: result: no --- this -L/usr/local/lib gets there from bsd.xfce.mk --- configenv_CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib" --- Is there a reason for -L${LOCALBASE}/lib there? It seems to me that it should be removed, and probably whole thing should be changed to appending CPPFLAGS instead of CONFIGURE_ENV, as CONFIGURE_ENV always contains CPPFLAGS anyway. See fix. -- You are receiving this mail because: You are the assignee for the bug.