Summary: | media-sound/musepack-tools-465-r1 : /.../mpcenc.h: fatal error: fpu_control.h: No such file or directory | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo musl team <musl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, sound, stefan |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/30085 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 530442 | ||
Bug Blocks: | |||
Attachments: |
emerge-info.txt
emerge-history.txt environment etc.portage.tbz2 logs.tbz2 media-sound:musepack-tools-465-r1:20200316-233647.log temp.tbz2 Patch fixing compilation errors with musl Ebuild utilizing the proposed musl patch A cleaner patch (IMHO) to fix musl compatibility my musl fix patch + ebuild update |
Description
Toralf Förster
2020-03-17 14:02:58 UTC
Created attachment 620816 [details]
emerge-info.txt
Created attachment 620818 [details]
emerge-history.txt
Created attachment 620820 [details]
environment
Created attachment 620822 [details]
etc.portage.tbz2
Created attachment 620824 [details]
logs.tbz2
Created attachment 620826 [details]
media-sound:musepack-tools-465-r1:20200316-233647.log
Created attachment 620828 [details]
temp.tbz2
Created attachment 673975 [details, diff]
Patch fixing compilation errors with musl
Here's a quick and dirty patch to make the package compile with musl, or at least with x86_64-gentoo-linux-musl.
There were two compilation errors:
1) mpcenc/mpcenc.c and mpcenc/mpcenc.h: Missing header fpu_control.h - fixed by replacing the missing defines with code copied from the glibc header file, and removing the fpu_control include statement (the patch should therefore only be applied on systems where the header actually is missing)
2) mpcenc/keyboard.c: struct timeval error "variable 'tv' has initializer but incomplete type" - fixed by adding an include for sys/time.h.
Created attachment 673978 [details]
Ebuild utilizing the proposed musl patch
... and here's an accompanying ebuild for the patch.
Created attachment 799177 [details, diff]
A cleaner patch (IMHO) to fix musl compatibility
This patch makes the following changes.
* __linux__ isn't the same as __GLIBC__
Thus, avoids <fpu_control.h> macros. As commented in musepack-tools source code, at function Init_FPU(), where those macros are used:
// FIXME : not sure if it's a good idea
* Includes <sys/select.h> for select(3). That header includes <sys/time.h> and also fixes the struct timeval error.
Created attachment 799179 [details, diff]
my musl fix patch + ebuild update
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0c3f271f5d35a31cfb5225885aaa5258d471590 commit c0c3f271f5d35a31cfb5225885aaa5258d471590 Author: Cristian Othón Martínez Vera <cfuga@cfuga.mx> AuthorDate: 2023-03-12 23:24:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-20 05:32:45 +0000 media-sound/musepack-tools: fix build on musl Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx> Bug: https://bugs.gentoo.org/712978 This patch makes the following changes. * __linux__ isn't the same as __GLIBC__ Thus, it avoids calling <fpu_control.h> macros in musl, doesn't require conditional patching and still works nicely with glibc-based systems. * Includes <sys/select.h> for select(3). That header includes <sys/time.h> and also fixes the struct timeval error. Signed-off-by: Sam James <sam@gentoo.org> .../files/musepack-tools-465-musl.patch | 24 ++++++++++++++++++++++ .../musepack-tools/musepack-tools-465-r2.ebuild | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) Real fix is to update to the version from 2016 instead of the version from even earlier. :P |