From owner-freebsd-ports@FreeBSD.ORG Mon Jun 20 09:54:50 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA6A1065676; Mon, 20 Jun 2011 09:54:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB0E8FC16; Mon, 20 Jun 2011 09:54:49 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p5K9G92A083602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Jun 2011 12:16:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p5K9G9rX054988; Mon, 20 Jun 2011 12:16:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p5K9G8c7054987; Mon, 20 Jun 2011 12:16:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 20 Jun 2011 12:16:08 +0300 From: Kostik Belousov To: Stephen Montgomery-Smith Message-ID: <20110620091608.GG48734@deviant.kiev.zoral.com.ua> References: <4DFEE295.3090204@missouri.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3C1+oG8NxxW+Hf7i" Content-Disposition: inline In-Reply-To: <4DFEE295.3090204@missouri.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: "ports@FreeBSD.org" , Stas Timokhin , ade@freebsd.org Subject: Re: libtool issues X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2011 09:54:50 -0000 --3C1+oG8NxxW+Hf7i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 20, 2011 at 01:03:01AM -0500, Stephen Montgomery-Smith wrote: > I am maintainer of the science/vis5d+ port. It doesn't build on the=20 > i386 with FreeBSD-8.0-RELEASE, as is shown here: >=20 > http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/a.8.20110223062852/= vis5d+-1.2.1_15.log >=20 > I know that other ports have this problem such as science/libctl. This= =20 > port is currently marked broken for exactly this reason. >=20 > I have a work around at this PR: ports/155105. This work around was=20 > improved in ports/155655 (see the follow up comment by the maintainer,=20 > who submits a patch to libctl). >=20 > I also reported the problem at ports/155546, although I don't think my=20 > solution there is very good, and my description of the bug wa very=20 > incomplete. Furthermore, it turns out that this problem does not take=20 > place under the FreeBSD-8.2-STABLE. This can make the problem a little= =20 > bit hard to diagnose. Nevertheless I can see this problem recurring=20 > systematically again in the future, because libtool was not designed for= =20 > multiple compiler environments. >=20 > It would be great to find a work around. One way would be to put in=20 > some kind of construction like ports/155105 or ports/155655 into=20 > Mk/bsd.autotools.mk. So whenever the port has USE_LIBTOOLS set, we have= =20 > the following code >=20 > LIBTOOLS_DIR=3D${WRKDIR}/.libtools.dir.${PORTNAME}.${PREFIX:S/\//_/g} > ${LN} -s ${LOCALBASE}/bin/${CC} ${LIBTOOLS_DIR}/cc > ${LN} -s ${LOCALBASE}/bin/${CXX} ${LIBTOOLS_DIR}/c++ > MAKE_ENV+=3D PATH=3D${LIBTOOLS_DIR}:$$PATH >=20 > Or one could instead modify devel/libtools, maybe something like this.=20 > Rename bin/libtool to libexec/libtool.sh, and then rewrite the libtool=20 > script as something like: >=20 > #!/bin/sh > PREFIX=3D/usr/local > TEMPCCDIR=3D`mktemp -d -t /tmp` > export PATH=3D${WRKDIR}:$PATH > ${LN} -s ${LOCALBASE}/bin/${CC} ${TEMPCCDIR}/cc > ${LN} -s ${LOCALBASE}/bin/${CXX} ${TEMPCCDIR}/c++ > ${PREFIX}/libexec/libtool.sh $@ > rm -r ${TEMPCCDIR} >=20 > I know these are real hacks. But since we are trying to patch something= =20 > into libtool that it really isn't designed for, perhaps my hackish=20 > approach has advantages. In particular, one doesn't have to redesign=20 > different patches every time there is a libtool version update. >=20 > Just some ideas. In the meantime, do you think it is OK to commit=20 > ports/155105 and the libctl part of ports/155655? It would be nice to=20 > get these ports working again on the i386, at least on a temporary basis. The libtool binding to the compiler is done for the reason. Your hack will cause more subtle breakage, since it causes libtool to be used with compiler with different internals. In particular, libtool overrides the linking stage arguments, manually providing crt* objects. This is what breaks your ports, but the hack has the same undefined consequences there. You are just lucky that you do not see them. Wouldn't it be easier to have per-compiler libtool port ? devel/libtool for the base compiler, devel/libtool-gcc45 for lang/gcc45, probably devel/libtool-clang_base for clang from base and so on. --3C1+oG8NxxW+Hf7i Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3/D9gACgkQC3+MBN1Mb4hNCwCeJRAG5k8CVZuxvi0Ddw1uDCPZ ZUQAnj9yES7RWh64FJw5Be+plSabPv6Z =XbhW -----END PGP SIGNATURE----- --3C1+oG8NxxW+Hf7i--