cd /var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465-abi_x86_64.amd64/mpcenc && /usr/bin/x86_64-gentoo-linux-musl-gcc -DCVD_FASTLOG -DFAST_MATH -I/var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465/include -I/var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465/libmpcpsy -I/var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465/libmpcenc -DNDEBUG -O2 -pipe -march=native -o CMakeFiles/mpcenc.dir/keyboard.o -c /var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465/mpcenc/keyboard.c In file included from /var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465/mpcenc/keyboard.c:19: /var/tmp/portage/media-sound/musepack-tools-465-r1/work/musepack-tools-465/mpcenc/mpcenc.h:54:12: fatal error: fpu_control.h: No such file or directory 54 | # include <fpu_control.h> | ^~~~~~~~~~~~~~~ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_musl-20200316-165821 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-gentoo-linux-musl-9.3.0 * Available Python interpreters, in order of preference: [1] python3.8 [2] python3.7 [3] python3.6 [4] python2.7 (fallback) repository: ==> /var/db/repos/gentoo/metadata/timestamp.chk <== Mon, 16 Mar 2020 22:38:28 +0000 emerge -qpvO media-sound/musepack-tools [ebuild N ] media-sound/musepack-tools-465-r1
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