Created attachment 434066 [details] build.log musl does not have obstack.h, so the build crashes. version 0.530.0 is affected as well.
Created attachment 434068 [details] output of emerge --info
The linux specific code seems to use glibc's obstacks quite extensively and it thus seems a lot work to rewrite it not to use obstacks. Thus, we would need to package a standalone obstack implementation such as [1] (actually there is already a sys-libs/musl-obstack in [2]) and make dev-perl/Proc-ProcessTable depend on it. Unfortunately, this is not enough since obstack is not an include only library and thus the Makefile of dev-perl/Proc-ProcessTable would need to be modified to link against the standalone obstack library. It might be good to report this also upstream [3]. (Also this bug should block the tracker bug 430702.) [1]: https://github.com/pullmoll/musl-obstack [2]: https://github.com/lluixhi/musl-extras [3]: https://rt.cpan.org/Public/Dist/Display.html?Name=Proc-ProcessTable
musl-obstack from [2] fixes the compile error, as far as I can tell. I will try to report the bug upstream later on.
Good, so there does not seem to be any need to modify the source and we just need to add a DEPEND (not RDEPEND) on musl-obstack when elibc_musl. If you want, you can ask upstream, whether they want to include a copy of obstack.h.
@musl: could anyone please test that the package *works* with sys-libs/obstack-standalone installed? So far people here have only discussed fixing build errors. Tests?
Created attachment 593694 [details] build.log on musl system with obstack-standalone installed Simply adding the dependency doesn't seem enough. Will explore other options used in other distros, and report back.
Created attachment 593760 [details, diff] Proposed patch from @Johnnynator in #voidlinux for dev-perl/Proc-ProcessTable-0.59 (pending) Supplied patch fixes build and link problems, but doesn't solve tests. (NB. this is from bumped 0.59 version, test for 0.48 and 0.53 pending) Log from build follows.
Created attachment 593762 [details] build.log on musl system for Proc-ProcessTable-0.59 (pending)
(In reply to Michael 'veremitz' Everitt from comment #8) > Created attachment 593762 [details] > build.log on musl system for Proc-ProcessTable-0.59 (pending) Same problem on 0.53 (build.log omitted for brevity).
There was also a problem with the use of sscanf() in os/Linux.c -> get_proc_stat(). It builds for me against musl now. My PR: https://github.com/jwbargsten/perl-proc-processtable/pull/29 People talking about sscanf and musl: https://www.openwall.com/lists/musl/2013/11/15/5 People expressing diametrically opposed beliefs with equal conviction as to whether glibc does or does not work sscanf() as intended: https://sourceware.org/bugzilla/show_bug.cgi?id=12701 I expect I can stick a diff in the attachments.
Created attachment 730269 [details, diff] A patch that seems to make things go.
(In reply to moonbuggy from comment #11) > Created attachment 730269 [details, diff] [details, diff] > A patch that seems to make things go. Thank you for submitting it upstream too: https://github.com/jwbargsten/perl-proc-processtable/commit/7f92dcfa432123fde1aa053679a364c874b6f63d.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75c0508952b26b45fcd521145fcd67157a774909 commit 75c0508952b26b45fcd521145fcd67157a774909 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-11-22 12:17:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-11-22 12:17:03 +0000 dev-perl/Proc-ProcessTable: add 0.634.0 Closes: https://bugs.gentoo.org/582824 Signed-off-by: Sam James <sam@gentoo.org> dev-perl/Proc-ProcessTable/Manifest | 1 + .../Proc-ProcessTable-0.634.0.ebuild | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+)