From owner-freebsd-questions@FreeBSD.ORG Mon Nov 9 06:56:15 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB3D11065694 for ; Mon, 9 Nov 2009 06:56:15 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC858FC0A for ; Mon, 9 Nov 2009 06:56:14 +0000 (UTC) Received: by ewy18 with SMTP id 18so112197ewy.43 for ; Sun, 08 Nov 2009 22:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=dc6y51crvx8iMP/BrZ7DwW9RdqSsH+D4uTlUaNcB+RQ=; b=TKP+Z7oCIUkUZkU66/U+Fa5usnn72bYVHjwx4vcZWY7ozGEqhraLv9Ekm54xRTX2gZ crVh3XHED3TISMqdLlj1cFWdtsecd4XmfhulzPRidOu7zhex7kuVfEvOSK1d3FJsHkxs bGlsZWVHCK0QBjEAzAEIkaqtQTcVK2Q0VbRpQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=KtV2PediDk3JSLLSd0hT7JYnHq/Ry2LNRMBiDiMfnbi6JBPjpwyJWpWcrjvWohpv97 7k5736lokcZTlnFkTuS1CrzbC1FTYvNi9l03UfG8nQpKLFikObQVlU3VH+A6OnJJtEZD clW+gaEep7D7K/+hq6Bz2PISkrQV+6wXlB7aI= MIME-Version: 1.0 Received: by 10.216.89.213 with SMTP id c63mr2340214wef.211.1257749773996; Sun, 08 Nov 2009 22:56:13 -0800 (PST) Date: Mon, 9 Nov 2009 06:56:13 +0000 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: dougb@FreeBSD.org, Scott Bennett Subject: Re: math/py-numpy vs. math/atlas-devel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 06:56:15 -0000 Scott Bennett wrote: >I would like to install science/gnudatalanguage but have been running >into various obstacles. Lars Engels very kindly just fixed one of them >(devel/lasi) (Thanks, Lars!), so now I'm on to the next one, which may not >be a showstopper, but it's at least a nuisance. One of the gnudatalanguage >dependencies is math/py-numpy, which, in turn, depends upon math/atlas. >However, I have math/atlas-devel installed and do not wish to revert to an >older, slower version of the ATLAS library. Adding a "-x atlas-\*" onto >the portmaster command to build math/py-numpy fails to prevent portmaster >from trying to build math/atlas. Creating a >/var/db/pkg/atlas-3.8.3_1,1/+IGNOREME file in addition doesn't help. How >can I force math/py-numpy to accept the already installed math/atlas-devel >libraries? >Thanks in advance for any help! Congratulations, you've managed to defeat three sets of safeguards in portmaster. Problem #1 math/atlas and math/atlas-devel don't have proper CONFLICTS entries in their Makefiles (this should be fixed), so the following code in portmaster, from dependency_check (): 1612 conflicts='' 1613 if pm_cd $d_port; then 1614 grep -ql ^CONFLICTS Makefile && 1615 conflicts=`pm_make_b -V CONFLICTS` 1616 else 1617 fail "Cannot cd to $d_port" 1618 fi 1619 for glob in $conflicts; do 1620 confl_p=`pkg_info -I $glob 2>/dev/null` 1621 if [ -n "$confl_p" ]; then 1622 confl_p=${confl_p%% *} 1623 echo '' 1624 echo "===>>> The dependency for ${origin}" 1625 echo " seems to be handled by $confl_p" 1626 echo '' 1627 d_port="$pd/`origin_from_pdb $confl_p`" 1628 fi 1629 done doesn't substitute your alternative dependency, math/atlas-devel, for math/atlas. Problem #2: You're using the -x flag incorrectly. Or portmaster isn't implementing it properly when the port to be excluded is not actually installed, take your pick. It's not completely fool-proof. Since you don't have math/atlas installed, the code in portmaster's dependency_check (): 1632 origin="${d_port#$pd/}" ; iport=`iport_from_origin ${origin}` 1633 1634 if [ -n "$iport" ]; then 1635 check_exclude $iport || continue 1636 else 1637 check_exclude $origin || continue 1638 fi gives origin="math/atlas", and then uses: 385 iport_from_origin () { 386 local dir 387 dir=`grep -l "@comment ORIGIN:${1}$" $pdb/*/+CONTENTS` 388 389 # It should not happen that more than one port meets this 390 # requirement, but it can if the pkg data is corrupted. 391 dir="${dir%%/+CONTENTS*}" 392 echo ${dir#$pdb/} 393 } to find that iport="" , so "check_exclude math/atlas" is called. Then, in accordance with: 1483 check_exclude () { 1484 [ -n "$PM_EXCL" ] || return 0 1485 1486 local pat 1487 1488 for pat in $PM_EXCL; do 1489 case "$1" in 1490 *${pat}*) 1491 if [ -n "$PM_VERBOSE" ]; then 1492 echo "===>>> Skipping $1" 1493 echo " because it matches the pattern: *${pat}*" 1494 echo '' 1495 fi 1496 return 1 ;; 1497 esac 1498 done 1499 1500 return 0 1501 } check_exclude tries to match your patterns in PM_EXCL against "math/atlas". But you've got "atlas-" in PM_EXCL (after portmaster's globstrip removed the trailing asterisk, negating your attempt protect it with quotes), which won't match because of the hyphen. It would have matched if math/atlas were actually installed, in which case iport="atlas-3.8.3_1,1" and portmaster would have compared iport with *atlas-*. You must use a port origin glob with the -x flag when the port that you wish to exclude isn't installed. Problem #3: The +IGNOREME checks in portmaster aren't properly implemented for this case, so they fail to prevent math/atlas from being built. To see this, Continue along in dependency_check (). Here, since iport="", dependency_check () next calls "check_interactive math/atlas": 1459 check_interactive () { 1460 [ -n "$INTERACTIVE_UPDATE" ] || return 0 1461 1462 local update_to 1463 1464 [ -n "$2" ] && update_to=" to $2" 1465 1466 case "$INTERACTIVE_YES" in *:${1}:*) return 0 ;; esac 1467 case "$INTERACTIVE_NO" in *:${1}:*) return 1 ;; esac 1468 1469 if [ -e "$pdb/$1/+IGNOREME" ]; then 1470 echo '' 1471 echo "===>>> +IGNOREME file is present for $1" 1472 fi 1473 1474 echo '' ; echo -n "===>>> Update ${1}${update_to}? [y] " 1475 local answer ; read answer 1476 case "$answer" in 1477 [nN]*) INTERACTIVE_NO="${INTERACTIVE_NO}${1}:" ; return 1 ;; 1478 *) INTERACTIVE_YES="${INTERACTIVE_YES}${1}:" ;; 1479 esac 1480 return 0 1481 } This subroutine can only fail if you've specified an interactive update and you decline to update math/atlas. If that case, portmaster will start to build math/py-numpy, and if math/atlas-devel is installed with the needed static libraries, then math/py-numpy should build normally. Apparently this didn't happen during your attempts. The +IGNOREME check is useless here because the subroutine checks only for /var/db/pkg/math/atlas/+IGNOREME, not the usual /var/db/pkg/atlas-3.8.3_1,1/+IGNOREME. Returning to dependency_check (), "update_port math/atlas" is called next, which then recursively calls "portmaster math/atlas" with many of your original flags. This jumps to 1943 # Figure out what we are going to be working on Shortly afterwards, portdir is found to be ="math/atlas", and 2020 [ -z "$upg_port" -a -z "$REPLACE_ORIGIN" ] && 2021 upg_port=`iport_from_origin ${portdir}` gives upg_port="", as before when computing iport in dependency_check (). Hence 2023 if [ -e "$pdb/$upg_port/+IGNOREME" ]; then is false, and another +IGNOREME check is bypassed. math/atlas is then built. So what can you do while these problems are being fixed? You could either: 1) Install math/atlas-devel, and use -x math/atlas on the portmaster command line; or 2) Install math/atlas-devel, and use only interactive portmaster builds in which you decline to build math/atlas; or 3) Install math/atlas-devel, and patch the math/atlas Makefile: --- ports/math/atlas/Makefile.orig 2009-11-09 01:19:21.000000000 -0500 +++ ports/math/atlas/Makefile 2009-11-09 01:15:55.000000000 -0500 @@ -22,6 +22,7 @@ USE_GMAKE= yes WRKSRC= ${WRKDIR}/ATLAS USE_LDCONFIG= yes +CONFLICTS= atlas-devel-[0-9]* .include ; or 4) Patch the math/py-numpy Makefile: --- ports/math/py-numpy/Makefile.orig 2009-11-08 20:49:13.000000000 -0500 +++ ports/math/py-numpy/Makefile 2009-11-08 20:49:30.000000000 -0500 @@ -35,7 +35,7 @@ .include .if defined(WITH_ATLAS) -LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas +LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas-devel .if !exists(${LOCALBASE}/lib/libalapack.a) IGNORE= atlas needs to be built with WITH_STATICLIB for numpy to function properly .endif ; or 5) Use portupgrade for science/gnudatalanguage and math/py-numpy, instead of portmaster, with ALT_PKGDEP set to substitute math/atlas-devel for math/atlas in pkgtools.conf; or 6) Put an +IGNOREME in directories for science/gnudatalanguage and math/py-numpy as well as math/atlas, and update these ports by hand, with make -C ... deinstall clean install ... ; or 7) (Ugly hack) Install math/atlas-devel, and then math/py-numpy, by hand. Thereafter, before each invocation of portmaster involving math/py-numpy, edit that port's registration information, switching it's math/atlas-related entries in +CONTENTS to math/atlas-devel. b.