libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
431 stars 147 forks source link

wavpack misses ftruncate #585

Closed madebr closed 10 months ago

madebr commented 10 months ago

Building SDL_mixer's playmus for ps2 and psp (on ci), linking fails with:

  /tmp/setupsdl/da8de0a910961c86f12e0e6d22427875f5c38084675d3be163533c2ff1367bcc/source/external/wavpack/src/open_filename.c:208:(.text+0x40): undefined reference to `ftruncate'
  collect2: error: ld returned 1 exit status

This probably means wavpack is missing a link to the math library. Or the toolchain does not provide this symbol.

slouken commented 10 months ago

ftruncate is a file truncation call. If there isn't an upstream workaround, let's go ahead and disable wavpack on PS2 by default.

sezero commented 10 months ago

We don't use that part of the library: Can we conditionally add something, even some stub, to the library for PS? builds?

madebr commented 10 months ago

See https://github.com/libsdl-org/WavPack/pull/2 and https://github.com/libsdl-org/SDL_mixer/pull/586

The wavpack patch should be applied first, so ci can run on the SDL_mixer patch.