libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.71k stars 1.8k forks source link

Example build failing #10369

Closed slouken closed 2 months ago

slouken commented 2 months ago

The build is currently failing to build the examples, but I don't see any explanation of why. Does anybody have any insight here?

ninja: job failed: : && /usr/local/ps2dev/ee/bin/mips64r5900el-ps2-elf-gcc -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/ps2dev/ps2sdk/common/include -I/usr/local/ps2dev/ps2sdk/ports/include -D_EE -DPS2 -D__PS2__ -O2 -G0 -O3 -DNDEBUG -L/usr/local/ps2dev/ps2sdk/ee/lib -L/usr/local/ps2dev/gsKit/lib -L/usr/local/ps2dev/ps2sdk/ports/lib -Wl,-zmax-page-size=128 -T/usr/local/ps2dev/ps2sdk/ee/startup/linkfile examples/CMakeFiles/audio-load-wav.dir/audio/03-load-wav/load-wav.c.obj -o examples/audio-load-wav  libSDL3.a  -lm  -lpatches  -lgskit  -ldmakit  -lps2_drivers && cd /__w/SDL/SDL/build/examples && /usr/bin/cmake -E make_directory /__w/SDL/SDL/build/examples/sdl-audio-load-wav && /usr/bin/cmake -E copy_if_different ../test/sample.wav /__w/SDL/SDL/build/examples/sdl-audio-load-wav
Error copying file (if different) from "../test/sample.wav" to "/__w/SDL/SDL/build/examples/sdl-audio-load-wav".
ninja: subcommand failed

@madebr, is there a build order dependency issue or something?

icculus commented 2 months ago

This was me, I broke this. I'll take a look.

madebr commented 2 months ago

I think I just fixed it. By default add_custom_command runs command from the current binary directory, whereas the examples assumed the current source directory.

madebr commented 2 months ago

Yup, ci is :green_circle: again.

slouken commented 2 months ago

Thanks!