Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 582824

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 packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, perl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: build.log
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 1 tt_1 2016-05-12 12:54:33 UTC
Created attachment 434068 [details]
output of emerge --info
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 [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
Comment 3 tt_1 2016-05-15 09:50:22 UTC
musl-obstack from [2] 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 archtester gentoo-dev 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.
Comment 11 moonbuggy 2021-08-05 10:03:48 UTC
Created attachment 730269 [details, diff]
A patch that seems to make things go.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-22 12:15:33 UTC
(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.
Comment 13 Larry the Git Cow gentoo-dev 2021-11-22 12:18:44 UTC
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(+)