Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 793038 - net-libs/libtorrent-rasterbar-2.0.3[python]: does not compile - fails to find boost python config
Summary: net-libs/libtorrent-rasterbar-2.0.3[python]: does not compile - fails to find...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-30 12:49 UTC by Klemen Mihevc
Modified: 2021-08-27 01:17 UTC (History)
15 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,5.54 KB, application/octet-stream)
2021-05-30 12:49 UTC, Klemen Mihevc
Details
cmakeoutput.log if it helps (CMakeOutput.log,50.29 KB, text/plain)
2021-05-30 12:52 UTC, Klemen Mihevc
Details
cmakeerror.log (CMakeError.log,2.45 KB, text/plain)
2021-05-30 12:52 UTC, Klemen Mihevc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klemen Mihevc 2021-05-30 12:49:18 UTC
libtorrent-rasterbar-2.0.3 fails to compile with python use flag with following error:

-- Found Python3: /var/tmp/portage/net-libs/libtorrent-rasterbar-2.0.3/temp/python3.9/bin/python3 (found version "3.9.5") found components: Interpreter Development Development.Module Development.Embed
CMake Error at /usr/lib64/cmake/Boost-1.76.0/BoostConfig.cmake:141 (find_package):
  Could not find a package configuration file provided by "boost_python3.9"
  (requested version 1.76.0) with any of the following names:

    boost_python3.9Config.cmake
    boost_python3.9-config.cmake

  Add the installation prefix of "boost_python3.9" to CMAKE_PREFIX_PATH or
  set "boost_python3.9_DIR" to a directory containing one of the above files.
  If "boost_python3.9" provides a separate development package or SDK, be
  sure it has been installed.
Call Stack (most recent call first):
  /usr/lib64/cmake/Boost-1.76.0/BoostConfig.cmake:258 (boost_find_component)
  /usr/share/cmake/Modules/FindBoost.cmake:594 (find_package)
  bindings/python/CMakeLists.txt:42 (find_package)

compiles fine without it.

Reproducible: Always




Portage 3.0.19 (python 3.9.5-final-0, default/linux/amd64/17.1, gcc-11.1.0, glibc-2.33, 5.12.8-gentoo x86_64)
=================================================================
System uname: Linux-5.12.8-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_X5670_@_2.93GHz-with-glibc2.33
KiB Mem:    12268376 total,   3960224 free
KiB Swap:   16777684 total,  16777684 free
Timestamp of repository gentoo: Sun, 30 May 2021 12:20:07 +0000
Head commit of repository gentoo: fc98e5cb5fe91a1c0b62208b73afd2b2395072f2

sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p3) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0::gentoo
dev-lang/python:          3.9.5_p1::gentoo
dev-util/cmake:           3.20.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r2::gentoo
sys-apps/openrc:          0.43.3::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r1::gentoo
sys-devel/gcc:            11.1.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true

local
    location: /var/db/repos/local
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -pipe -O2 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -pipe -O2 -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -pipe -O2 -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -pipe -O2 -fomit-frame-pointer"
GENTOO_MIRRORS="https://mirror.netcologne.de/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ https://mirror.yandex.ru/gentoo-distfiles/"
LANG="sl_SI.utf8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu"
LINGUAS="en sl"
MAKEOPTS="-j12 -l12"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl acpi amd64 apache2 apng berkdb bittorrent btrfs bzip2 caps cgi cli client corefonts crypt curl dhcp dlz dovecot-sasl dri eap exif expat experimental extraengine fontconfig fortran ftp gd gdbm glib gmp gssapi gzip hardened http2 iconv icu idn intl iptables ipv6 ithreads jpeg kerberos lcms libglvnd libtirpc lm-sensors lz4 lzma lzo managesieve mp3 multilib mysql mysqli ncurses nls nping nptl openmp openssl pam pch pci pcntl pcre pcre16 pcre32 pdo perl png posix python rar readline rpc rtmp samba seccomp server session sieve slang smtp soap sockets socks5 spf split-usr sqlite ssh ssl suexec tcpd threads tiff tracepath truetype udev unicode urandom usb vhosts webui x264 x265 xattr xml xmlreader xmlrpc xmlwriter xslt xvid xz zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias authn_dbd authn_socache authz_dbd cache_socache dbd http2 proxy proxy_html proxy_http proxy_http2 proxy_wstunnel xml2enc" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en sl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-0" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="geoip"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Klemen Mihevc 2021-05-30 12:49:54 UTC
Created attachment 712551 [details]
build.log
Comment 2 Klemen Mihevc 2021-05-30 12:52:26 UTC
Created attachment 712554 [details]
cmakeoutput.log if it helps
Comment 3 Klemen Mihevc 2021-05-30 12:52:45 UTC
Created attachment 712557 [details]
cmakeerror.log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-30 13:11:06 UTC
emerge -pv boost boost-build?
Comment 5 Klemen Mihevc 2021-05-30 13:20:35 UTC
mih ~ # emerge -pv boost boost-build

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-util/boost-build-1.76.0-r2::gentoo  USE="-examples" 0 KiB
[ebuild   R    ] dev-libs/boost-1.76.0-r1:0/1.76.0::gentoo  USE="bzip2 icu lzma nls python threads zlib zstd -context -debug -doc -mpi -numpy -static-libs -tools" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_9 -python3_7 -python3_8" 0 KiB

boost and boost-build compile just fine, i also recompiled them but it doesnt fixes a problem.
Comment 6 Boris 2021-05-30 17:27:34 UTC
I confirm the problem. 
I have the same.
Comment 7 Tero Paloheimo 2021-05-31 05:33:54 UTC
I have the same problem as well, re-emerging boost-build and boost has no impact.
Comment 8 jmdorfman 2021-06-12 16:35:55 UTC
Same issue.

It looks like the Boost package creates:
boost_python-config.cmake

but not:
boost_python3.9Config.cmake
boost_python3.9-config.cmake

which libtorrent-rasterbar is looking for.

thor /usr/portage/dev-libs/boost # equery files boost | grep boost_python
/usr/lib64/cmake/boost_python-1.76.0
/usr/lib64/cmake/boost_python-1.76.0/boost_python-config-version.cmake
/usr/lib64/cmake/boost_python-1.76.0/boost_python-config.cmake
/usr/lib64/cmake/boost_python-1.76.0/libboost_python-variant-shared-py3.8.cmake
/usr/lib64/cmake/boost_python-1.76.0/libboost_python-variant-shared-py3.9.cmake
/usr/lib64/libboost_python38-mt.so
/usr/lib64/libboost_python38.so
/usr/lib64/libboost_python38.so.1.76.0
/usr/lib64/libboost_python39-mt.so
/usr/lib64/libboost_python39.so
/usr/lib64/libboost_python39.so.1.75.0
/usr/lib64/libboost_python39.so.1.76.0


It seems like something should be fixed in the Boost package then?

I was able to got this to compile and install with a temporary workaround.  I haven't tried running anything yet that it depends on though.

The workaround is in the source file directory of this package in bindings/python/CMakeLists.txt,

change line 40 from:
set(boost-python-module-name "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" CACHE STRING "Boost::python module name, e.g. 'python-3.6'")

to:
set(boost-python-module-name "python")

Then it would compile and install.
Comment 9 10walls 2021-06-15 06:16:36 UTC
I made a one liner change to /usr/lib64/cmake/Boost-1.76.0/BoostConfig.cmake on my boost local install at line 116 from:
if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9])$")
to:
if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])\.?([0-9])$")

libtorrent-rasterbar seems to be looking for boost_python3.9 but the cmake file checks for python39. I don't know what the "correct" python versions should be specified, but this fixed the configure phase, qbittorrent seems to work fine after rebuilding.
Comment 10 10walls 2021-06-16 10:10:18 UTC
A test with:
if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])\\.?([0-9])$")

with double backslashes seem to work better, so non python components work.
Comment 11 Boris 2021-06-18 13:20:29 UTC
a new version 2.0.4 has been released
Comment 12 Michiel Hazelhof 2021-07-05 12:31:19 UTC
Looks like the ebuild is ignoring the PYTHON_TARGET:

[ebuild     U  ] net-libs/libtorrent-rasterbar-2.0.3-r1:0/2.0::gentoo [1.2.11:0/10::gentoo] USE="dht python ssl -debug -gnutls% -test (-doc%) (-examples%) (-libressl%) (-static-libs%)" PYTHON_TARGETS="(-python3_7%) (-python3_8%*) (-python3_9%)" 0 KiB

even though make.conf definef (and all packages follow):
PYTHON_TARGETS="python3_8"
PYTHON_SINGLE_TARGET="python3_8"
Comment 13 Gerald 2021-08-06 17:35:16 UTC
Does not work for me as well: emerge -pv net-libs/libtorrent-rasterbar --nodeps

These are the packages that would be merged, in order:
[ebuild     U ~] net-libs/libtorrent-rasterbar-2.0.3-r1:0/2.0::gentoo [1.2.12-r1:0/10::gentoo] USE="dht python ssl -debug -gnutls% -test (-doc%) (-examples%) (-static-libs%)" PYTHON_TARGETS="(-python3_8%*) (-python3_9%*)" 4,194 KiB

I have set
*/* PYTHON_TARGETS: python3_8 python3_9
*/* PYTHON_SINGLE_TARGET: -* python3_8

in the package.use directory. I think it should not not be "(-python3_8%*)" therefore, and it isn't for other packages I emerge. Something is broken here 
I think but I don't understand what or why?!?
Comment 14 Guy 2021-08-12 02:48:40 UTC
I have this problem on all 4 of my systems.

libtorrent-rasterbar versions 2.0.3 and 2.0.4 both fail on all four systems.

I have not tried making a local copy of dev-libs/boost-1.76.0-r1 ( see commment #9 and comment #10 ) yet.

On my latest, most clean build where I haven't installed qbittorrent, I tried various things involving python3_9/3_8 including an non-overridden profile.

In my testing, I noticed 'eix' reported only a single version of dev-libs/boost is now available in the gentoo portage tree. This makes me reluctant to make a modified local copy of same since I'm not an actual programmer.

Could someone post a 'patch' for dev-libs/boost I can try?
Comment 15 Guy 2021-08-12 02:52:58 UTC
Regarding my comment #14 - I forgot to note that <net-libs/libtorrent-rasterbar-2.0 compiles on all my systems.
Comment 16 Klemen Mihevc 2021-08-12 05:00:16 UTC
(In reply to Guy from comment #14)
> I have this problem on all 4 of my systems.
> 
> libtorrent-rasterbar versions 2.0.3 and 2.0.4 both fail on all four systems.
> 
> I have not tried making a local copy of dev-libs/boost-1.76.0-r1 ( see
> commment #9 and comment #10 ) yet.
> 
> On my latest, most clean build where I haven't installed qbittorrent, I
> tried various things involving python3_9/3_8 including an non-overridden
> profile.
> 
> In my testing, I noticed 'eix' reported only a single version of
> dev-libs/boost is now available in the gentoo portage tree. This makes me
> reluctant to make a modified local copy of same since I'm not an actual
> programmer.
> 
> Could someone post a 'patch' for dev-libs/boost I can try?

At worst that modification can do is break boost for other applications that are using it. Also if something goes wrong you can always reemerge boost.
Comment 17 Larry the Git Cow gentoo-dev 2021-08-27 01:10:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a7fe6fe1c4f9593013363647c187266ff50a993

commit 3a7fe6fe1c4f9593013363647c187266ff50a993
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-27 01:08:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-27 01:10:27 +0000

    net-libs/libtorrent-rasterbar: fix 2.0.x build with Boost (and fix Python eclass)
    
    - Fix Boost by using a different Python version name (drop the ., just
      like we did in previous versions)
    - Don't use python-any-r1, but python-single-r1 instead. python-any-r1
      is for where we have a build-time *only* dependency, but we build
      libraries linked against libpython, so we need it at runtime too.
    - Fix other dependencies (everything is an RDEPEND too)
    
    Closes: https://bugs.gentoo.org/793038
    Signed-off-by: Sam James <sam@gentoo.org>

 ...-r1.ebuild => libtorrent-rasterbar-2.0.4-r2.ebuild} | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=675412af4c3016387bbc9410b306aa2451c3536e

commit 675412af4c3016387bbc9410b306aa2451c3536e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-27 01:09:49 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-27 01:10:28 +0000

    net-libs/libtorrent-rasterbar: drop 2.0.3-r2
    
    Bug: https://bugs.gentoo.org/793038
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/libtorrent-rasterbar/Manifest             |  1 -
 .../libtorrent-rasterbar-2.0.3-r2.ebuild           | 54 ----------------------
 2 files changed, 55 deletions(-)
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-27 01:17:03 UTC
You should all be able to revert your BoostConfig.cmake changes now (or just emerge -v1 boost) as I've changed the Python version format we pass to the build system.

I've also fixed the eclass we use (see the commit message above) so PYTHON_TARGETS and such should be respected now.