maintainer-feedback requested: [Bug 253749] devel/shiboken2: picks up wrong llvm,

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 21 21:16:49 GMT 2021


Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-kde (Team)
<kde at FreeBSD.org> for maintainer-feedback:
Bug 253749: devel/shiboken2: picks up wrong llvm,
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253749



--- Description ---
shiboken2 depends (per Makefile) on the "default" llvm port:

: LIB_DEPENDS=	  libclang.so:devel/llvm${LLVM_DEFAULT}

but the package shows:

: $ pkg info --dependencies py37-shiboken2 | grep llvm
:	 llvm10-10.0.1_5

and every poudriere run rebuilds py37-shiboken and it's downstreams (pyside2,
FreeCAD) with the remark  (paraphrasing) "new dependency: devel/llvm90"

The build log shows that shiboken2 recently started picking up llvm10 instead
of the desired llvm90:

: -- LLVM_CONFIG:	      /usr/local/bin/llvm-config10
: -- CLANG: /usr/local/llvm10, /usr/local/llvm10/lib/libclang.so detected by
/usr/local/bin/llvm-config10

and that dependency is registered in the final package

After some investigation, I found that shiboken2 picks up the highest versioned
llvm-config it can find - and until recently, the build environment only had
llvm90 (unless you're building in a dirty system, but then all bets are off
anyways, right?), but ports r566177 made qt5-gui depend on mesa-dri, which in
turn pulls in llvm10.
Our Makefile in devel/shiboken2 sets LLVM_CONFIG as CONFIGURE_ENV:

: CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT}

but shiboken2's build system uses the cmake variable LLVM_CONFIG, not the
environment variable of the same name - see
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/shiboken2/data/shi
boken_helpers.cmake?h=5.15.2#n141
for reference (it looks like I made this mistake when creating the port - and
until recently, it didn't matter much).

The most obvious fix is to pass LLVM_CONFIG via cmake, not environment - see
attached patch ("works for me and my poudriere"). Patch bumps PORTREVISION for
changed/fixed dependency.


More information about the kde-freebsd mailing list