On 2019-Aug-6, at 09:55, Brooks Davis <brooks at freebsd.org> 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. > > -- 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= Install lit and FileCheck test tools LIT_LIB_DEPENDS= libz3.so:math/z3 LIT_VARS= _USES_PYTHON=python: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 => /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 => /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/CheckerOptionHandlingAnalyzerPlugin.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/LLVMgold.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x805400000) /usr/local/llvm90/lib/SampleAnalyzerPlugin.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/libLLVM-9.0.0.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x805200000) /usr/local/llvm90/lib/libLLVM-9.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x805200000) /usr/local/llvm90/lib/libLLVM.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x805200000) /usr/local/llvm90/lib/libLTO.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x805400000) /usr/local/llvm90/lib/libRemarks.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x805400000) /usr/local/llvm90/lib/libclang-cpp.so: libz3.so.0 => /usr/local/lib/libz3.so.0 (0x807a00000) /usr/local/llvm90/lib/libclang.so: libz3.so.0 => /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 => /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 => /lib/libthr.so.3 (0x800662000) libomp.so => /usr/lib/libomp.so (0x80068f000) libc++.so.1 => /usr/lib/libc++.so.1 (0x8020e4000) libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x800738000) libm.so.5 => /lib/libm.so.5 (0x80075a000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80078c000) libc.so.7 => /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: >> >> # grep compiler /usr/ports/math/z3/Makefile >> USES= compiler:c++11-lang python:2.7,build >> >> But devel/llvm90 requires math/z3 to have been built before >> devel/llvm90 is built: >> >> # 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 >> >> >> Hopefully this cycle can be avoided for system >> clang to eventually have progressed to clang 9. >> (I do not know the details.) >> >> 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.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) _______________________________________________ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
Re: devel/llvm90 requires math/z3 first; building math/z3 requires a c++ toolchain be in place
Mark Millard via freebsd-toolchain Tue, 06 Aug 2019 18:00:07 -0700
- devel/llvm90 requires math/z3 first; bu... Mark Millard via freebsd-toolchain
- Re: devel/llvm90 requires math/z3 ... Brooks Davis
- Re: devel/llvm90 requires math... Mark Millard via freebsd-toolchain
- Re: devel/llvm90 requires ... Mark Millard via freebsd-toolchain
- Re: devel/llvm90 requi... Mark Millard via freebsd-toolchain
- Re: devel/llvm90 requires ... Brooks Davis
- Re: devel/llvm90 requi... Mark Millard via freebsd-toolchain
- Re: devel/llvm90 ... Mark Millard via freebsd-toolchain
- Re: devel/llv... Brooks Davis
- Re: devel... Brooks Davis
- Re: devel... Mark Millard via freebsd-toolchain
- Re: devel... Brooks Davis
- Re: devel... Mark Millard via freebsd-toolchain