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

Bug 764113

Summary: media-sound/sidplayfp-1.4.4 - src/IniConfig.cpp: In member function 'bool IniConfig::readSidplay2(iniHandler&)': src/IniConfig.cpp:292:21: error: 'PATH_MAX' was not declared in this scope (on musl)
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702, 713786    
Attachments: build.log
emerge --info
musl_include-limits.patch

Description ernsteiswuerfel archtester 2021-01-06 13:03:06 UTC
Created attachment 681538 [details]
build.log

[...]
make[1]: Entering directory '/var/tmp/portage/media-sound/sidplayfp-1.4.4/work/sidplayfp-1.4.4'
x86_64-gentoo-linux-musl-g++ -DHAVE_CONFIG_H -I.  -I . -DPKGDATADIR="\"/usr/share/sidplayfp/\""    -D_REENTRANT  -DNDEBUG   -Os -march=x86-64 -msse3 -mtune=athlon64-sse3 -pipe -c -o src/IniConfig.o src/IniConfig.cpp
src/IniConfig.cpp: In member function 'bool IniConfig::readSidplay2(iniHandler&)':
src/IniConfig.cpp:292:21: error: 'PATH_MAX' was not declared in this scope
  292 |         char buffer[PATH_MAX];
      |                     ^~~~~~~~
src/IniConfig.cpp:293:18: error: 'buffer' was not declared in this scope; did you mean 'setbuffer'?
  293 |         snprintf(buffer, PATH_MAX, "%sSonglengths.txt", PKGDATADIR);
      |                  ^~~~~~
      |                  setbuffer
make[1]: *** [Makefile:696: src/IniConfig.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-sound/sidplayfp-1.4.4/work/sidplayfp-1.4.4'
make: *** [Makefile:455: all] Error 2
 * ERROR: media-sound/sidplayfp-1.4.4::gentoo failed (compile phase):
Comment 1 ernsteiswuerfel archtester 2021-01-06 13:03:28 UTC
Created attachment 681541 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2021-01-06 13:12:14 UTC
Created attachment 681544 [details, diff]
musl_include-limits.patch

This small patch adds headers from /usr/include/linux/limits.h and makes sidplayfp-1.4.4 build on musl.

Does not break glibc build.
Comment 3 Larry the Git Cow gentoo-dev 2021-12-02 04:43:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e73573692da466a260372f147612c7602bd8bf4b

commit e73573692da466a260372f147612c7602bd8bf4b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-02 04:42:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-02 04:43:14 +0000

    media-sound/sidplayfp: add musl patch
    
    Closes: https://bugs.gentoo.org/764113
    Thanks-to: ernsteiswuerfel <erhard_f@mailbox.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-sound/sidplayfp/files/sidplayfp-1.4.4-musl-limits.patch | 11 +++++++++++
 media-sound/sidplayfp/sidplayfp-1.4.4.ebuild                  |  9 ++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)