[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


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253749

            Bug ID: 253749
           Summary: devel/shiboken2: picks up wrong llvm,
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: easy, patch, patch-ready
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: kde at FreeBSD.org
          Reporter: cmt at freebsd.org
          Assignee: kde at FreeBSD.org
             Flags: maintainer-feedback?(kde at FreeBSD.org)

Created attachment 222707
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=222707&action=edit
fix llvm detection

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/shiboken_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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list