From owner-freebsd-ports@freebsd.org Wed Aug 7 00:59:25 2019 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C65B0B8695 for ; Wed, 7 Aug 2019 00:59:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-10.consmr.mail.ne1.yahoo.com (sonic308-10.consmr.mail.ne1.yahoo.com [66.163.187.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 463Cnm6gkpz40Jb for ; Wed, 7 Aug 2019 00:59:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: OKhOQfwVM1nHwWW8zUmk70PUsVlAU4JUB406P9VqUlpMflCJq6nX79ib1Inp.2K aJ5QhoUoYcRHizD3amOeW0UJ7un44h8LSoZ1wrmxIfmPsTrzI9Q2Yavn.H7rW2MhcHrqr16t1ixz LfOYH2xd8GjU9idaHByyQr.cLNv55UmiF9Oz7fTewVOvDpi7hUDmHSBFZDglSvKud3Lbnu83iqI4 MtiKGzQa8DTD0Iu1fXIdPIyJH6wb0uKUJAGuT6Yp6cNtdTQITYMNhe0hiienjnUOm7dc5t5AyM.f 1F7knjjUUdmkJZI8g2gXFaC_fRY0_bSw.ffnOiDMJ96Dq3srInyDxR6F43NFMi2.8YUE7pXjJIMj aslE3aEWUo.YnXJW34rAkWzUuGoKN5jNojFH.BGeNE2Ht9pi_ADTr_yKcT4j2ntM0Wxt239X2jiL jeYfSYv7fMjtwpaxdKP_FOXk.juV3s8Z9sjh1AAlpVRtTeBTnOwGykgoDLIJimS3krTW7aDXGV2T bE_ooEtaBlWI.r7D4QFj8QOOlbMY2a0HMpgjDaoeyjb0t3IBDCPqckogR8h6IcMBm0qw.gv0cA02 2wtjW0wd9O56qNk2U9iiitaxwwCx1bgbCM0gwzx7WfT5nUzUyAVMHxSOH_FJYGEhFXWYoVLhg.37 vTfKKpGOauLQyneMqwOZo5Sq8jNe5KZTzHCq0op.HtCw3N4aR9OLQCwmwWoBq2MouimcX5nF7X5W WLhQ.Uk8F7uzoGcQU2gQCrtk0x1lxDDALuKPDuhXdYC4DLlv_HfONc8YHwbJ4vL26I4s15xeNe8V eZi5Bzh7te_T0rxxOkLvKZvvSieBDiMUiuT89jw5NPTilpfSerOw275l_XqsHbJURGr0Ltt51PVN g_tx7Po1nxpMLLJl5yrTLv66g6UHwhnT0fIuTCDKm63UHl3us7dp7PVfRm.jP61Ttl68MX6Mknz1 TbcGSwDpdzMuacedR0NGfQZFN8w5PygvQYJE5.O3qageklwgQB9zQWrOcQwk446sAH6Z7_3ntiCc wz06ejXvcqKnldl8mSdezesXeeMwPsG7iuR00G.od2Qv5MKxxbFDtzCZg5U0UI0lWmpB3tWs23ch sEbCOOy8gBG95YYvD8T5GpUxV5fSSaYMKc.9yCEY7K8j2Wmzmk3Dr5R_ukDfGjUZeaLVSkDO9M.s NoSU0zKcrfX1WqkBaHuqLDU6ZpACY7xHV4OfizM8JfOoWn8YW.8LimSo1dC2Wtojs8Sv7JHBEbAC 2D5VdZksC6RhmdLjVWqc- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Wed, 7 Aug 2019 00:59:23 +0000 Received: by smtp417.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 55213c009e7839e8e91199ed2c2176c6; Wed, 07 Aug 2019 00:59:22 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: devel/llvm90 requires math/z3 first; building math/z3 requires a c++ toolchain be in place From: Mark Millard In-Reply-To: <20190806165525.GC94703@spindle.one-eyed-alien.net> Date: Tue, 6 Aug 2019 17:59:21 -0700 Cc: freebsd-toolchain@freebsd.org, freebsd-ports@freebsd.org, freebsd-ppc@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2A88AADC-8ED0-4FFD-85A8-34C0186D5D4F@yahoo.com> References: <8DB3EAA4-2B88-4180-8386-673524D27C64@yahoo.com> <20190806165525.GC94703@spindle.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 463Cnm6gkpz40Jb X-Spamd-Bar: / X-Spamd-Result: default: False [-0.22 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.26)[-0.265,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.88)[0.882,0]; NEURAL_HAM_LONG(-0.34)[-0.336,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (4.70), ipnet: 66.163.184.0/21(1.27), asn: 36646(1.02), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[33.187.163.66.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2019 00:59:25 -0000 On 2019-Aug-6, at 09:55, Brooks Davis wrote: > I'd prefer to disable this dependency. There's a knob that worked in > the 8.0 timeframe, but the lit build now autodetects z3 when it is > present and I've failed to find a knob to disable it. For now, the = easy > workaround is probably to disable options LIT. We could make that the > default on non-LLVM platforms is that makes sense. >=20 > -- Brooks Okay. poudriere-devel automatically built math/z3 because I'd indicated to build devel/llvm90 . math/z3 was not previously built: I've never had other use of it. So my context was not one of an implicit autodetect. It looks like that happened because of devel/llvm90/Makefile having: LIT_DESC=3D Install lit and FileCheck test tools LIT_LIB_DEPENDS=3D libz3.so:math/z3 LIT_VARS=3D _USES_PYTHON=3Dpython:3.6+ Of course someone that has math/z3 for other reasons would not necessarily want it used by llvm90 materials, so merely not listing it in LIT_LIB_DEPENDS might not be enough to cover all contexts. [Stop reading here if you do not care about what from llvm90 uses z3 and some of the consequences.] It turns out that the direct dependency is (via reviewing ldd -a output): /usr/local/llvm90/lib/../lib/libLLVM-9.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 The indirect reference via libLLVM-9.so use leads to most of llvm90 materials binding to libz3.so : # ldd /usr/local/llvm90/lib/*.so | egrep '(^/|z3)' /usr/local/llvm90/lib/CheckerDependencyHandlingAnalyzerPlugin.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/CheckerOptionHandlingAnalyzerPlugin.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/LLVMgold.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x805400000) /usr/local/llvm90/lib/SampleAnalyzerPlugin.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/libLLVM-9.0.0.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x805200000) /usr/local/llvm90/lib/libLLVM-9.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x805200000) /usr/local/llvm90/lib/libLLVM.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x805200000) /usr/local/llvm90/lib/libLTO.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x805400000) /usr/local/llvm90/lib/libRemarks.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x805400000) /usr/local/llvm90/lib/libclang-cpp.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/libclang.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x807200000) /usr/local/llvm90/lib/libgomp.so: /usr/local/llvm90/lib/libiomp5.so: /usr/local/llvm90/lib/liblldb.so: libz3.so.0 =3D> /usr/local/lib/libz3.so.0 (0x807e00000) /usr/local/llvm90/lib/libomp.so: /usr/local/llvm90/lib/libomptarget.so: (I'll not list the /usr/local/llvm90/bin/ programs that in turn bind to these libraries, but most end up bound to libz3.so .) ldd reports some of the details as far as what librraries the libz3.so depends on: # ldd /usr/local/lib/*z3.so /usr/local/lib/libz3.so: libthr.so.3 =3D> /lib/libthr.so.3 (0x800662000) libomp.so =3D> /usr/lib/libomp.so (0x80068f000) libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x8020e4000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x800738000) libm.so.5 =3D> /lib/libm.so.5 (0x80075a000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x80078c000) libc.so.7 =3D> /lib/libc.so.7 (0x800242000) This makes clear that mixing in libstdc+++ or the like would likely not be appropriate unless llvm90 was also using such. So a default gcc based build of libz3.so likely would not be appropriate if llvm90 is to also be built such that it can bind to libz3.so if found. > On Mon, Aug 05, 2019 at 08:45:31PM -0700, Mark Millard via = freebsd-toolchain wrote: >> Building math/z3 involves: >>=20 >> # grep compiler /usr/ports/math/z3/Makefile >> USES=3D compiler:c++11-lang python:2.7,build >>=20 >> But devel/llvm90 requires math/z3 to have been built before >> devel/llvm90 is built: >>=20 >> # pkg info -d llvm90 >> llvm90-9.0.0.r1: >> libxml2-2.9.9 >> z3-4.8.5_1 >> python36-3.6.9 >> perl5-5.28.2 >> libedit-3.1.20190324,1 >> # pkg info -B llvm90 >> llvm90-9.0.0.r1: >> libpython3.6m.so.1.0 >> libedit.so.0 >> libz3.so.0 >> libxml2.so.2 >>=20 >>=20 >> Hopefully this cycle can be avoided for system >> clang to eventually have progressed to clang 9. >> (I do not know the details.) >>=20 >> For architectures still at gcc/g++ 4.2.1, some >> alternate c++ tool chain needs to be used to >> build libz3.so but the result needs to be >> compatible with llvm90 later using the libz3.so's >> content. (I do not know the details.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)