From owner-freebsd-questions@freebsd.org Thu Apr 26 19:10:22 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8A7BFB5FF1 for ; Thu, 26 Apr 2018 19:10:22 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay113.isp.belgacom.be (mailrelay113.isp.belgacom.be [195.238.20.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEA086AA0A for ; Thu, 26 Apr 2018 19:10:21 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AQV2zkhxRDYEgpNbXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?1OMVIJqq85mqBkHD//Il1AaPAd2Araocw8Pt8InYEVQa5piAtH1QOLdtbDQizf?= =?us-ascii?q?ssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1?= =?us-ascii?q?JuPoEYLOksi7ze+/94HdbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeu?= =?us-ascii?q?BWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbO?= =?us-ascii?q?SxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHmiC?= =?us-ascii?q?kJKSM3/mLVhcx+g61UvB2vqgdjw4PWfI2ZKOZycr/Dcd4cWGFPXtxRVytEAo6k?= =?us-ascii?q?cYUPDugBPeJFpITjoFsOqgC+ChepBOz1zD9InWL90Kom0+QgEwHG2BctEdIUsH?= =?us-ascii?q?vKstr4KbocX+6vwKnP1zXDYOpb1DHg44bGdRAhpOuDXbN2ccfJzUkvFhjKgUmf?= =?us-ascii?q?qYz/JTyVzuQNv3KA7+pnU++klm0pqxlprzWs28sgkJfFi40Ixlze6yl13Jg5Kc?= =?us-ascii?q?elREN7b9OpFoZbuTuAOItsWMwiRnlluCM9yrIbp5G2ZDMKyJE7xx7HbPyHbpSI?= =?us-ascii?q?7grjVOmPJTd4g2poeLGliBa28Eigz/PzVtOz0FpQsipFk9vMtnQX2xPP7ciHTe?= =?us-ascii?q?B98Vmk2TmV0QDT8ftIIUcularUM5Ihw7gwmYQPsUnbHSL6hV/6gLGZe0k54OSk?= =?us-ascii?q?9fjrbqv8qpOBN4J5hBnyMqE0lcy+BeQ4PBIOX2+e+emkyL3j/E/5QLFRg/04iK?= =?us-ascii?q?nWro7VKt8ApqGkGQNV1Zwj6xmnAze8zNsYhWUHLE5CeB+fgYjpIU/BL+7jAvek?= =?us-ascii?q?nlugiS5rx+3YMb36HpXNL3/DkLH6fbtm5U5c0hQ8ws5E6JJPF74NOvXzWlX+tI?= =?us-ascii?q?+QMhhsHAWu0q7OCcl+24VWDWyVD6KTK6/6vUWF7+ckI+CXaZVTvyzyfasL/fnr?= =?us-ascii?q?2EM4m1tVVq6uxpYSYXajVqB6IkedSVT2j9orKktMuRAxGr+5wGaeWCJeMi7hF5?= =?us-ascii?q?k34Ss2Xdqr?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CYDgBWI+Ja/5nK8VFbHAEBAQQBAQoBA?= =?us-ascii?q?YNDUw56KIxLjBoBAYFzMQFdlQsmhFECgkciNxUBAgEBAQEBAQIBaxwMgjUigkw?= =?us-ascii?q?BBTocIxALDgoJJQ8qHgYTG4R4qlyIR4JFiiSEGopHAodVkDQIhWOIWmmBE4pkk?= =?us-ascii?q?WAyIoFSTTAIgn4JghcXihYgg2M9MJE0AQE?= X-IPAS-Result: =?us-ascii?q?A2CYDgBWI+Ja/5nK8VFbHAEBAQQBAQoBAYNDUw56KIxLjBo?= =?us-ascii?q?BAYFzMQFdlQsmhFECgkciNxUBAgEBAQEBAQIBaxwMgjUigkwBBTocIxALDgoJJ?= =?us-ascii?q?Q8qHgYTG4R4qlyIR4JFiiSEGopHAodVkDQIhWOIWmmBE4pkkWAyIoFSTTAIgn4?= =?us-ascii?q?JghcXihYgg2M9MJE0AQE?= Received: from 153.202-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.202.153]) by relay.skynet.be with ESMTP; 26 Apr 2018 21:09:11 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id w3QJ9Art019196; Thu, 26 Apr 2018 21:09:10 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Thu, 26 Apr 2018 21:09:10 +0200 From: Tijl Coosemans To: Gary Aitken Cc: FreeBSD Mailing List Subject: Re: recommended setup for building ports in development env? Message-ID: <20180426210910.475aeefd@kalimero.tijl.coosemans.org> In-Reply-To: <0cf315a5-dedf-29b9-13de-32240b52a5ad@dreamchaser.org> References: <20180425105447.7d69d2b9@kalimero.tijl.coosemans.org> <0cf315a5-dedf-29b9-13de-32240b52a5ad@dreamchaser.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2018 19:10:22 -0000 On Wed, 25 Apr 2018 11:22:30 -0600 Gary Aitken wrote: > On 04/25/18 02:54, Tijl Coosemans wrote: > > On Tue, 24 Apr 2018 19:18:50 -0600 Gary Aitken wrote: > >> Asked this on questions a while ago and got no response; > >> any thoughts would be much appreciated. > >> > >> I'm trying to set up a development environment for a few ports. > >> I established a parallel ports tree and set the environment variables > >> PREFIX=${MYFREEBSD}/usr/local > >> WORKDIR=${MYFREEBSD}/var/db/portsnap > >> PORTSDIR=${MYFREEBSD}/usr/ports > >> > >> With those set, I can build and install some things. > >> > >> For example, I can build and install graphics/ufraw, and with my PATH > >> properly extended to include ${MYFREEBSD}/usr/local/bin I can execute it. > >> I can also build and install x11/babl into ${MYFREEBSD}. > >> Running a normally built gimp finds the new libbabl located in a > >> different, non-standard place: > >> $ ldd `which gimp` | grep babl > >> libbabl-0.1.so.0 => /usr/home/.../usr/local/lib/libbabl-0.1.so.0 > >> I didn't expect that to work; nice. > >> > >> However, when I go to build graphics/gegl it fails because it can't find > >> the installed babl: > >> ===> gegl-0.3.34 depends on shared library: libbabl-0.1.so - not found > >> > >> If I set > >> LOCALBASE=${MYFREEBSD}/usr/local > >> it wants to rebuild all dependencies, since it doesn't find any of the > >> normally installed stuff. > >> > >> Adding > >> -L${MYFREEBSD}/usr/local/lib to LDFLAGS > >> -I${MYFREEBSD}/usr/local/include to CPPFLAGS > >> in the Makefile doesn't solve the problem. > >> > >> Is there a good solution to this, or do I have to set LOCALBASE with the > >> resulting build of everything else, not just the things that I need to > >> upgrade for this work? Hopefully there's a way to extend the normal > >> search path for port builds? > ... > > Try setting LIB_DIRS. Its default value is "/lib /usr/lib ${LOCALBASE}/lib". > > Thanks, that mostly did the trick. > However, I still have an issue with a library which resides in a subdir > of /usr/local/lib: > ===> gegl-0.3.34 depends on shared library: libcgraph.so - not found > $ pkg info -l graphviz > ... > /usr/local/lib/graphviz/libcgraph.so > /usr/local/lib/graphviz/libcgraph.so.6 > /usr/local/lib/graphviz/libcgraph.so.6.0.0 > > I tried tweaking the Makefile: > LIB_DEPENDS+= graphviz/libcgraph.so:graphics/graphviz > but that fails: > Error: pattern graphviz/libcgraph.so in LIB_DEPENDS is not valid > > Also tried some permutations with trailing '/' and '/*' on the directory > with no success. > > I could not find any discussion of this situation in the porter's > handbook, probably because it "just works" building in /usr/ports. > I can get it to work by explicitly adding the subdir as another element > of LIB_DIRS but that seems wrong; I have 92 subdirs to /usr/local/lib. The code to find libraries is in /usr/ports/Mk/Scripts/find-lib.sh. These are the directories: dirs="${LIB_DIRS} `cat ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || :`" So either you modified LOCALBASE or ${LOCALBASE}/libdata/ldconfig/ doesn't contain an file for graphviz.