|Summary:||dev-perl/Proc-ProcessTable-0.480.0 with musl: OS.c:14:53: fatal error: obstack.h: No such file or directory|
|Product:||Gentoo Linux||Reporter:||tt_1 <herrtimson>|
|Component:||Current packages||Assignee:||Gentoo musl team <musl>|
|Package list:||Runtime testing required:||---|
|Bug Depends on:|
output of emerge --info
build.log on musl system with obstack-standalone installed
Proposed patch from @Johnnynator in #voidlinux for dev-perl/Proc-ProcessTable-0.59 (pending)
build.log on musl system for Proc-ProcessTable-0.59 (pending)
A patch that seems to make things go.
Description tt_1 2016-05-12 12:52:05 UTC
Created attachment 434066 [details] build.log musl does not have obstack.h, so the build crashes. version 0.530.0 is affected as well.
Comment 2 Felix Janda 2016-05-12 16:12:50 UTC
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  (actually there is already a sys-libs/musl-obstack in ) 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 . (Also this bug should block the tracker bug 430702.) : https://github.com/pullmoll/musl-obstack : https://github.com/lluixhi/musl-extras : https://rt.cpan.org/Public/Dist/Display.html?Name=Proc-ProcessTable
Comment 3 tt_1 2016-05-15 09:50:22 UTC
musl-obstack from  fixes the compile error, as far as I can tell. I will try to report the bug upstream later on.
Comment 4 Felix Janda 2016-05-16 11:18:34 UTC
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.
Comment 5 Andreas K. Hüttel 2019-10-23 13:16:31 UTC
@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?
Comment 6 Michael 'veremitz' Everitt 2019-10-23 14:04:58 UTC
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.
Comment 7 Michael 'veremitz' Everitt 2019-10-24 12:02:08 UTC
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.
Comment 8 Michael 'veremitz' Everitt 2019-10-24 12:03:40 UTC
Created attachment 593762 [details] build.log on musl system for Proc-ProcessTable-0.59 (pending)
Comment 9 Michael 'veremitz' Everitt 2019-10-24 12:23:05 UTC
(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).
Comment 10 moonbuggy 2021-08-05 09:59:21 UTC
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.