https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-irc/znc-clientbuffer-1.0.48 fails to compile. Discovered on: amd64 (internal ref: tinderbox)
Created attachment 691308 [details] build.log build log and emerge --info
Possible context of error(s): /usr/bin/install: cannot stat 'clientbuffer.so': No such file or directory install-xattr: failed to stat /var/tmp/portage/net-irc/znc-clientbuffer-1.0.48/image/usr/lib64/znc/clientbuffer.so: No such file or directory
This is the problem: >>> Compiling source in /var/tmp/portage/net-irc/znc-clientbuffer-1.0.48/work/znc-clientbuffer-1.0.48 ... make -j16 -j1 PREFIX=/usr LIBDIR=/lib64 /usr/bin/znc-buildmod clientbuffer.cpp Error: znc-buildmod requires python Either install python, or use cmake directly Long story short, python needs to be available during the compile stage.
Also, looking at the source of znc-buildmod, this tool invokes CMake, so the ebuild probably has to BDEPEND on that, too. znc-buildmod itself uses python to generate a CMakeLists.txt file which is only 7 lines big and build the project using this CMakeLists.txt. From what I can see, there is no special magic which znc-buildmod might do. It's probably easier to just provide one auto-generated CMakeLists.txt (e.g. in FILESDIR) and do a regular CMake build for the whole package. This removes the need for Python altogether and also solves the problem that znc-buildmod probably doesn't even respect ${T} as directory for temp files. Instead, the Python module tempfile is being used to generate a temporary directory, which seems to store its files somewhere under /tmp (tested on my amd64 machine using `znc-buildmod -v`). It's probably best to just use an auto-generated CMakeLists.txt (I'll attach one as a reference) and do a plain CMake build instead of relying on znc-buildmod doing the same thing, but with us having less control over the build, requiring another dependency and not respecting our build directories.
Created attachment 782915 [details] CMakeLists for this package autogenerated by ZNC's znc-buildmod Note that this CMakeLists.txt uses hard-coded absolute paths, so my temporary build directory is referenced in this file. This needs to be adjusted when using this file locally.
Done in 73ecc6c24d708bbc8c0c72e5fb4e77e10b72fe47.