From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jul 27 11:40:31 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08083D7C for ; Sun, 27 Jul 2014 11:40:31 +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 DD44122AA for ; Sun, 27 Jul 2014 11:40:30 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6RBeUIt041026 for ; Sun, 27 Jul 2014 11:40:30 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 192158] Ccache generates relocation errors Date: Sun, 27 Jul 2014 11:40:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: melvyn@magemana.nl X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2014 11:40:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192158 --- Comment #2 from melvyn@magemana.nl --- Definitely an issue with libtool: /bin/sh ../libtool --tag=CC --mode=link cc -I/usr/local/include/libxml2 -I/usr/include -O2 -pipe -fno-strict-aliasing -Wall -Wl,--version-script=./libxslt.syms -version-info 2:28:1 -L/usr/local/lib -fPIC -o libxslt.la -rpath /usr/local/lib attrvt.lo xslt.lo xsltlocale.lo xsltutils.lo pattern.lo templates.lo variables.lo keys.lo numbers.lo extensions.lo extra.lo functions.lo namespaces.lo imports.lo attributes.lo documents.lo preproc.lo transform.lo security.lo -L/usr/local/lib -lxml2 -lz -L/usr/lib -lm libtool: link: cc -shared .libs/attrvt.o .libs/xslt.o .libs/xsltlocale.o .libs/xsltutils.o .libs/pattern.o .libs/templates.o .libs/variables.o .libs/keys.o .libs/numbers.o .libs/extensions.o .libs/extra.o .libs/functions.o .libs/namespaces.o .libs/imports.o .libs/attributes.o .libs/documents.o .libs/preproc.o .libs/transform.o .libs/security.o -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libxml2.so -lz -L/usr/lib -lm -O2 -Wl,--version-script=./libxslt.syms -Wl,-soname -Wl,libxslt.so.2 -o .libs/libxslt.so.2 /usr/bin/ld: .libs/attrvt.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC .libs/attrvt.o: could not read symbols: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) LDFLAGS ammended with -fPIC, passed on to libtool, but when called for link it's been deleted. Zooming in more: configure:9679: checking if cc PIC flag -fPIC -DPIC works configure:9697: cc -c -O2 -pipe -fno-strict-aliasing -I/usr/local/include -fPIC -DPIC -DPIC conftest.c >&5 cc: warning: argument unused during compilation: '-L/usr/local/lib' configure:9701: $? = 0 configure:9714: result: no So, exit status is OK, but it still finds result no: if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; the n lt_cv_prog_compiler_pic_works=yes fi The unused argument generates stderr output that makes libtool think it doesn't support it, even though $? is 0. Braindead by design. Adding -Qunused-arguments fixes the issue. I still don't get how it relates to ccache and why adding NO_CCACHE to a port's Makefile fixes things. Is there some magic that adds -Qunused-arguments if CC = clang and that fails to detect that CC=clang when CC=ccache? -- You are receiving this mail because: You are the assignee for the bug.