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: UNCONFIRMED ---    
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.