On 06/20/2011 01:03 AM, Stephen Montgomery-Smith wrote:
I am maintainer of the science/vis5d+ port.  It doesn't build on the
i386 with FreeBSD-8.0-RELEASE, as is shown here:

http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/a.8.20110223062852/vis5d+-1.2.1_15.log

I know that other ports have this problem such as science/libctl.  This
port is currently marked broken for exactly this reason.

I have a work around at this PR: ports/155105.  This work around was
improved in ports/155655 (see the follow up comment by the maintainer,
who submits a patch to libctl).

I also reported the problem at ports/155546, although I don't think my
solution there is very good, and my description of the bug wa very
incomplete.  Furthermore, it turns out that this problem does not take
place under the FreeBSD-8.2-STABLE.  This can make the problem a little
bit hard to diagnose.  Nevertheless I can see this problem recurring
systematically again in the future, because libtool was not designed for
multiple compiler environments.

It would be great to find a work around.  One way would be to put in
some kind of construction like ports/155105 or ports/155655 into
Mk/bsd.autotools.mk.  So whenever the port has USE_LIBTOOLS set, we have
the following code

LIBTOOLS_DIR=${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+= PATH=${LIBTOOLS_DIR}:$$PATH

Or one could instead modify devel/libtools, maybe something like this.
Rename bin/libtool to libexec/libtool.sh, and then rewrite the libtool
script as something like:

#!/bin/sh
PREFIX=/usr/local
TEMPCCDIR=`mktemp -d -t /tmp`
export PATH=${WRKDIR}:$PATH
${LN} -s ${LOCALBASE}/bin/${CC} ${TEMPCCDIR}/cc
${LN} -s ${LOCALBASE}/bin/${CXX} ${TEMPCCDIR}/c++
${PREFIX}/libexec/libtool.sh $@
rm -r ${TEMPCCDIR}

I know these are real hacks.  But since we are trying to patch something
into libtool that it really isn't designed for, perhaps my hackish
approach has advantages.  In particular, one doesn't have to redesign
different patches every time there is a libtool version update.

Just some ideas.  In the meantime, do you think it is OK to commit
ports/155105 and the libctl part of ports/155655?  It would be nice to
get these ports working again on the i386, at least on a temporary basis.

It looks like my random ideas are not good.

However, in the meantime, do you think it would be OK to remove the "broken" status of the port science/libctl? It does build just fine under i386 FreeBSD-8.2-stable.

Or maybe a better idea is to rewrite the BROKEN message:

BROKEN= Does not build with some versions of FreeBSD with i386 or sparc64. But try make -DTRYBROKEN to see if it works for you.

_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to