From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 4 11:00:08 2007 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 9F10016A46B for ; Tue, 4 Sep 2007 11:00:08 +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 7E04713C45E for ; Tue, 4 Sep 2007 11:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l84B08t8070071 for ; Tue, 4 Sep 2007 11:00:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l84B08M8070070; Tue, 4 Sep 2007 11:00:08 GMT (envelope-from gnats) Resent-Date: Tue, 4 Sep 2007 11:00:08 GMT Resent-Message-Id: <200709041100.l84B08M8070070@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, Markus Hitter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E593816A419 for ; Tue, 4 Sep 2007 10:59:25 +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 D41F213C459 for ; Tue, 4 Sep 2007 10:59:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l84AxPlX035213 for ; Tue, 4 Sep 2007 10:59:25 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l84AxPoM035212; Tue, 4 Sep 2007 10:59:25 GMT (envelope-from nobody) Message-Id: <200709041059.l84AxPoM035212@www.freebsd.org> Date: Tue, 4 Sep 2007 10:59:25 GMT From: Markus Hitter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/116078: Handling of PREFIX doesn't work as documented 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: Tue, 04 Sep 2007 11:00:08 -0000 >Number: 116078 >Category: ports >Synopsis: Handling of PREFIX doesn't work as documented >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 04 11:00:08 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Markus Hitter >Release: 6.2-RELEASE >Organization: >Environment: FreeBSD testBSD.jump-ing.de 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: The Ports system features the PREFIX variable to let one install a port into a different location than /usr/local. /usr/ports/Mk/bsd.port.mk says: # PREFIX - Where *this* port installs its files. The handbook documents this feature: (Section 4.5.2.1) Accordingly, any dependencies of a port should be installed without PREFIX. However, this variable is maintained when installing dependencies. Follow the steps in "How-to-repeat", the result is a build failure. The reason of the failure is, the dependency is built with the same PREFIX as libiconv which neither matches the dependency mechanism nor matches the documentation: testBSD# portsnap update Ports tree is already up to date. testBSD# cd /usr/ports/converters/libiconv testBSD# make PREFIX=/usr install libiconv has the following tunable option(s): WITHOUT_EXTRA_ENCODINGS=yes Disable extra character sets WITH_EXTRA_PATCHES=yes Apply extra patches (fixes cp932, adds EUCJP-MS) ===> Vulnerability check disabled, database not found ===> Extracting for libiconv-1.9.2_2 => MD5 Checksum OK for libiconv-1.9.2.tar.gz. => SHA256 Checksum OK for libiconv-1.9.2.tar.gz. ===> Patching for libiconv-1.9.2_2 ===> Applying FreeBSD patches for libiconv-1.9.2_2 ===> libiconv-1.9.2_2 depends on file: /usr/local/bin/libtool - not found ===> Verifying install for /usr/local/bin/libtool in /usr/ports/devel/libtool15 ===> Vulnerability check disabled, database not found => libtool-1.5.22.tar.gz doesn't seem to exist in /usr/ports/distfiles/. [...] [...] /bin/sh /usr/local/bin/libtool --mode=compile cc -I. -I. -I.. -I./.. -I../include -O2 -fno-strict-aliasing -pipe -DLIBDIR=\"/usr/lib\" -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libcharset_set_relocation_prefix -Drelocate=libcharset_relocate -DHAVE_CONFIG_H -DLIBDIR=\"/usr/libdata\" -c ./localcharset.c /usr/local/bin/libtool: Can't open /usr/local/bin/libtool: No such file or directory *** Error code 2 Stop in /usr/ports/converters/libiconv/work/libiconv-1.9.2/libcharset/lib. *** Error code 1 Stop in /usr/ports/converters/libiconv/work/libiconv-1.9.2/libcharset. *** Error code 1 Stop in /usr/ports/converters/libiconv/work/libiconv-1.9.2. *** Error code 1 Stop in /usr/ports/converters/libiconv. testBSD# testBSD# find / -name libtool /usr/bin/libtool /usr/share/libtool /usr/ports/converters/libiconv/work/libiconv-1.9.2/libcharset/libtool /usr/ports/converters/libiconv/work/libiconv-1.9.2/libtool /usr/ports/devel/libtool15/work/libtool-1.5.22/libltdl/libtool /usr/ports/devel/libtool15/work/libtool-1.5.22/libtool testBSD# - - - - - - - - - - Note: This is a follow-up on PR #115988. To cite from there: > Am 04.09.2007 um 06:26 schrieb Jeremy Messenger: > > > Yeah, I agree with you about that the 'make PREFIX=/foo' shouldn't affect on the > > dependencies. I noticed this behavior when I wrote auto-plist[1], which I had to get it > > runs 'make depends' first before do the 'make PREFIX=/foo install'. > > > > [1] http://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi/portstools/auto-plist/ >How-To-Repeat: 1) Set up a fresh machine, virtual environments are pretty convenient here: preconfigured installation type 4 "Developer" with "Ports" checked, root account only. 2) Update the ports tree: portsnap fetch portsnap extract portsnap update 3) Attempt to install libiconv with a prefix: cd /usr/ports/converters/libiconv make PREFIX=/usr install clean >Fix: While there are workarounds like building dependencies without PREFIX first, I've attached a patch to fix the behaviour, allowing an install with a single "mak", as documented. >Release-Note: >Audit-Trail: >Unformatted: