Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2021 21:16:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 253749] devel/shiboken2: picks up wrong llvm,
Message-ID:  <bug-253749-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253749

            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@FreeBSD.org
          Reporter: cmt@freebsd.org
          Assignee: kde@FreeBSD.org
             Flags: maintainer-feedback?(kde@FreeBSD.org)

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

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

: LIB_DEPENDS=3D    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 (pyside=
2,
FreeCAD) with the remark  (paraphrasing) "new dependency: devel/llvm90"

The build log shows that shiboken2 recently started picking up llvm10 inste=
ad
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 versi=
oned
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+=3D LLVM_CONFIG=3D${LOCALBASE}/bin/llvm-config${LLVM_DEFAUL=
T}

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=3D5.15.2#n141
for reference (it looks like I made this mistake when creating the port - a=
nd
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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253749-7788>