Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775938 - net-irc/znc-clientbuffer-1.0.48 fails to compile
Summary: net-irc/znc-clientbuffer-1.0.48 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Adrian Schollmeyer
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-03-14 09:10 UTC by Agostino Sarubbo
Modified: 2023-10-17 15:50 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,7.00 KB, text/plain)
2021-03-14 09:10 UTC, Agostino Sarubbo
Details
CMakeLists for this package autogenerated by ZNC's znc-buildmod (znc-cmakelists-autogenerated.txt,366 bytes, text/plain)
2022-06-05 12:30 UTC, Adrian Schollmeyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-03-14 09:10:48 UTC
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)
Comment 1 Agostino Sarubbo gentoo-dev 2021-03-14 09:10:50 UTC
Created attachment 691308 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-03-14 09:10:51 UTC
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
Comment 3 Adrian Schollmeyer 2022-06-05 11:56:02 UTC
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.
Comment 4 Adrian Schollmeyer 2022-06-05 12:28:36 UTC
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.
Comment 5 Adrian Schollmeyer 2022-06-05 12:30:09 UTC
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.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-17 15:50:41 UTC
Done in 73ecc6c24d708bbc8c0c72e5fb4e77e10b72fe47.