$ fetch https://people.xiph.org/~xiphmont/demo/surround/6.ogg $ cat >a.c #include <SDL_mixer.h> int main() { if (!Mix_LoadMUS("6.ogg")) return 1; return 0; } $ cc a.c $(pkg-config SDL2_mixer --cflags --libs) $ ./a.out; echo $? 1 One of my ports actually checks something like this during configure: http://package19.nyi.freebsd.org/data/112amd64-default-build-as-user/492276/logs/errors/ponscripter-sekai-0.0.6_6.log
https://hg.libsdl.org/SDL_mixer/rev/92882ef2ab81 is the first bad.
Mix_GetError() returns "Unrecognized audio format". After poking other consumers it seems Mix_OpenAudio() is required.
Alas, Mix_OpenAudio() doesn't work in a poudriere jail as /dev/dsp is hidden.
- SDL2_Mixer documentation clearly says: > int Mix_OpenAudio > ... > Initialize the mixer API. > This must be called before using other functions in this library. - It seems pretty legit to me that the mixer initialization would require a device present - It's also obvious that the device is not obliged to be present at build time Summarizing, it looks like it's problem of ponscripter-sekai, which should not check for SDL_mixer support this way. This may be fixed by removing whole `Checking for system SDL_mixer...` if block in configure. And it should be reported upstream.
Upstream issue: https://github.com/sekaiproject/ponscripter-fork/issues/92 Fixed by forcing the broken configure check to always pass.
A commit references this bug: Author: amdmi3 Date: Fri Feb 8 20:21:44 UTC 2019 New revision: 492445 URL: https://svnweb.freebsd.org/changeset/ports/492445 Log: - Fix build after SDL2_Mixer update Don't try to check for SDL2_Mixer at configure phase by trying to run program which tries Mix_LoadMUS. First, the program is incorrect as per SDL2_Mixer documentation, one is not allowed to call any SDL2_Mixer functions without first calling Mix_Init() (which is not called). Next, calling any mixer functions may involve opening audio device, which may not be present on the machine where the package is built. Fix by forcing the broken check to pass. PR: 235557 Reported by: jbeich@FreeBSD.org Approved by: portmgr blanket (build fix) Upstream issue: https://github.com/sekaiproject/ponscripter-fork/issues/92 Changes: head/games/ponscripter-sekai/files/patch-configure