From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Feb 23 08:40:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31D8116A404 for ; Sat, 23 Feb 2008 08:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 053BB13C478 for ; Sat, 23 Feb 2008 08:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1N8e0OG070273 for ; Sat, 23 Feb 2008 08:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1N8e0mT070272; Sat, 23 Feb 2008 08:40:00 GMT (envelope-from gnats) Resent-Date: Sat, 23 Feb 2008 08:40:00 GMT Resent-Message-Id: <200802230840.m1N8e0mT070272@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, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A506416A401 for ; Sat, 23 Feb 2008 08:35:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 88C3713C459 for ; Sat, 23 Feb 2008 08:35:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1N8WVkV099568 for ; Sat, 23 Feb 2008 08:32:31 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m1N8WV2v099567; Sat, 23 Feb 2008 08:32:31 GMT (envelope-from nobody) Message-Id: <200802230832.m1N8WV2v099567@www.freebsd.org> Date: Sat, 23 Feb 2008 08:32:31 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/120985: [patch] math/suitesparse does not build on amd64, because it ignores CFLAGS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 08:40:01 -0000 >Number: 120985 >Category: ports >Synopsis: [patch] math/suitesparse does not build on amd64, because it ignores CFLAGS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Feb 23 08:40:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_7 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #3: Wed Feb 13 17:52:28 CET 2008 root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b amd64 >Description: Building terminates in the following way: /usr/bin/find /usr/obj/mobileKamikaze.norad/usr/ports/math/suitesparse/work/SuiteSparse_shared -name "*\.a" -exec /bin/mv {} /usr/obj/mobileKamikaze.norad/usr/ports/math/suitesparse/work/tmp_shared \; cd /usr/obj/mobileKamikaze.norad/usr/ports/math/suitesparse/work/tmp_shared ; for i in `ls *.a | /usr/bin/sed 's/\.a//' `; do ld -Bshareable -o ${i}.so.1 -x -soname ${i}.so.1 --whole-archive ${i}.a ; /bin/ln -s ${i}.so.1 ${i}.so ; done ld: libcsparse.a(cs_add.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC libcsparse.a(cs_add.o): could not read symbols: Bad value *** Error code 1 Stop in /usr/ports/math/suitesparse. As you see in the following snippet both CC and CFLAGS are ignored throughout the build process. Thus the -fPic parameter that gets properly set by the ports Makefile does not get through. cc -O -I../../UFconfig -I../Include -DCS_LONG -DCS_COMPLEX -c ./Source/cs_print.c -o cs_print_cl.o cc -O -I../../UFconfig -I../Include -DCS_LONG -DCS_COMPLEX -c ./Source/cs_norm.c -o cs_norm_cl.o cc -O -I../../UFconfig -I../Include -DCS_LONG -DCS_COMPLEX -c ./Source/cs_load.c -o cs_load_cl.o cc -O -I../../UFconfig -I../Include -DCS_LONG -DCS_COMPLEX -c ./Source/cs_dfs.c -o cs_dfs_cl.o Only at the beginning of the build CC and CFLAGS is obeyed: /usr/local/bin/ccache cc -O2 -fno-strict-aliasing -pipe -march=nocona -fPIC -DGETRUSAGE -I../Include -I../Source -I../../AMD/Include -I../../UFconfig -DZLONG -c ../Source/umfpack_symbolic.c -o umfpack_zl_symbolic.o /usr/local/bin/ccache cc -O2 -fno-strict-aliasing -pipe -march=nocona -fPIC -DGETRUSAGE -I../Include -I../Source -I../../AMD/Include -I../../UFconfig -DZLONG -c ../Source/umfpack_transpose.c -o umfpack_zl_transpose.o /usr/local/bin/ccache cc -O2 -fno-strict-aliasing -pipe -march=nocona -fPIC -DGETRUSAGE -I../Include -I../Source -I../../AMD/Include -I../../UFconfig -DZLONG -c ../Source/umfpack_triplet_to_col.c -o umfpack_zl_triplet_to_col.o /usr/local/bin/ccache cc -O2 -fno-strict-aliasing -pipe -march=nocona -fPIC -DGETRUSAGE -I../Include -I../Source -I../../AMD/Include -I../../UFconfig -DZLONG -c ../Source/umfpack_scale.c -o umfpack_zl_scale.o >How-To-Repeat: Try to build on amd64. >Fix: --- /usr/ports/math/suitesparse/Makefile.orig 2008-02-23 09:29:28.000000000 +0100 +++ /usr/ports/math/suitesparse/Makefile 2008-02-23 09:30:29.000000000 +0100 @@ -90,12 +90,17 @@ @${REINPLACE_CMD} -e 's,%%CFLAGS%%,${CFLAGS},g' \ -e 's,%%FFLAGS%%,${FFLAGS},g' \ - ${WRKSRC}/UFconfig/UFconfig.mk \ + ${WRKSRC}/UFconfig/UFconfig.mk @${REINPLACE_CMD} -e 's,%%CFLAGS%%,${CFLAGS_SHARED},g' \ -e 's,%%FFLAGS%%,${FFLAGS_SHARED},g' \ ${WRKSRC_SHARED}/UFconfig/UFconfig.mk + @${FIND} ${WRKSRC} ${WRKSRC_SHARED} -name Makefile -exec \ + ${REINPLACE_CMD} -Ee 's,(CC =).*,\1 ${CC},1' \ + -Ee 's,(CFLAGS =).*,\1 ${CFLAGS_SHARED},1' \ + \{} \; + do-build: cd ${WRKSRC} ; ${GMAKE} cd ${WRKSRC_SHARED} ; ${GMAKE} >Release-Note: >Audit-Trail: >Unformatted: