From owner-freebsd-ports@FreeBSD.ORG Mon Feb 20 04:18:16 2006 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F35DE16A420 for ; Mon, 20 Feb 2006 04:18:15 +0000 (GMT) (envelope-from pfgshield-freebsd@yahoo.com) Received: from web32907.mail.mud.yahoo.com (web32907.mail.mud.yahoo.com [68.142.206.54]) by mx1.FreeBSD.org (Postfix) with SMTP id 957B643D58 for ; Mon, 20 Feb 2006 04:18:15 +0000 (GMT) (envelope-from pfgshield-freebsd@yahoo.com) Received: (qmail 3231 invoked by uid 60001); 20 Feb 2006 04:18:15 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=Ez9+lWJ+vZDDkKjDPK2nGUyOgB60MWdgoWU//qw9TTtFfMDnTRZoNBDsxLmlxp9poqmNcYdy2Rdm9Ky6Q09NVJih4Jb/pss5tfjAnG5vo2ObZ7v/21D3bMoZvIeiEBhCeZkjHUaGbBm0yZKQM6kizsUT9sMcuKp780Vo9qYC0Gk= ; Message-ID: <20060220041815.3229.qmail@web32907.mail.mud.yahoo.com> Received: from [200.118.65.164] by web32907.mail.mud.yahoo.com via HTTP; Mon, 20 Feb 2006 05:18:15 CET Date: Mon, 20 Feb 2006 05:18:15 +0100 (CET) From: To: freebsd-ports@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: Subject: amd64 and -fPIC X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-freebsd@yahoo.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2006 04:18:16 -0000 Hi; amd64 has a rather nasty issue: in order to mix shared and static libraries everything has to be built with -fPIC. Most ports are either static or dynamic so it's usually not a problem, but I'm stating to find problems in the math section: packages like arpack and glpk are only built static and without -fPIC. And lately we are only building the dynamic version of ATLAS so packages that use many math libraries will have problems on amd64. Someone would say the easy way out of this would be to add -fPIC to everything by default, which works, but has some performance issues. If someone has a better solution I would like to hear it (please!) but if not I would like to suggest instead a general guideline: If the package includes a library that might be used frequently and doesn't include a shared version please add -fPIC to the amd64 version of the port, for example for math/arpack (and feel free to commit this): diff -ruN arpack.orig/Makefile arpack/Makefile --- arpack.orig/Makefile Sun Feb 19 22:42:24 2006 +++ arpack/Makefile Sun Feb 19 22:45:11 2006 @@ -29,7 +29,6 @@ BLAS_LIBS?= ${LOCALBASE}/lib/libblas.a INSTALLS_SHLIB= yes -USE_REINPLACE= yes pre-patch: @(cd ${WRKSRC}; ${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/patch.tar.gz) @@ -51,4 +50,10 @@ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/ug.ps.gz ${DOCSDIR} .endif -.include +.include + +.if ${ARCH} == "amd64" +FFLAGS+= -fPIC +.endif + +.include --- Pedro F. Giffuni M. Sc. Industrial Eng. University of Pittsburgh Mech. Eng. Universidad Nacional de Colombia --- Yahoo is powered by FreeBSD http://www.FreeBSD.org/ ___________________________________ Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive http://it.messenger.yahoo.com