Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sdl2_mixer cmake. Fix sdl2 sattelites not using Release build type #284

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

isage
Copy link
Contributor

@isage isage commented Jul 18, 2023

No description provided.

@sharkwouter
Copy link
Contributor

This will cause a conflict with #283

@isage
Copy link
Contributor Author

isage commented Jul 18, 2023

Well, either that, or have completely broken sdl2_mixer

sha256sums=(
"7a6ba86a478648ce617e3a5e9277181bc67f7ce9876605eea6affd4a0d6eea8f"
"9de77978b881b0ab61aa60673ec7de92e920f8affd42ab129d8fe153e2698de5"
"SKIP"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to either include a checksum here or use git+https://github.com/libsdl-org/SDL_mixer.git#commit=${gitrev} as source to use git.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github archives aren't guaranteed to have same checksum

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, will add a suggestion then.

@sharkwouter
Copy link
Contributor

In what way is it broken? Makepkg strips debug symbols regardless of build type.

@isage
Copy link
Contributor Author

isage commented Jul 18, 2023

In what way is it broken? Makepkg strips debug symbols regardless of build type.

  1. it fails to link, because it doesn't properly list ogg as dependency for vorbis/flac
/usr/local/vitasdk/bin/../lib/gcc/arm-vita-eabi/10.3.0/../../../../arm-vita-eabi/bin/ld: /usr/local/vitasdk/bin/../lib/gcc/arm-vita-eabi/10.3.0/../../../../arm-vita-eabi/lib/libFLAC.a(ogg_decoder_aspect.o): in function `FLAC__ogg_decoder_aspect_init':
(.text+0x8): undefined reference to `ogg_stream_init'

this is fixed upstream (but they broke libxmp and other stuff doing that)
2. build type isn't just debug symbols.
Default build

/usr/local/vitasdk/bin/arm-vita-eabi-g++ -D__VITA__ -I/home/isage/dev/nxengine/ironhead/deps -I/home/isage/dev/nxengine/ironhead -isystem /usr/local/vitasdk/arm-vita-eabi/include/SDL2 -Wl,-q   -Wall -std=gnu++17 -MD -MT CMakeFiles/ironhead.dir/src/ResourceManager.cpp.obj -MF CMakeFiles/ironhead.dir/src/ResourceManager.cpp.obj.d -o CMakeFiles/ironhead.dir/src/ResourceManager.cpp.obj -c /home/isage/dev/nxengine/ironhead/src/ResourceManager.cpp

Release build

/usr/local/vitasdk/bin/arm-vita-eabi-g++ -D__VITA__ -I/home/isage/dev/nxengine/ironhead/deps -I/home/isage/dev/nxengine/ironhead -isystem /usr/local/vitasdk/arm-vita-eabi/include/SDL2 -Wl,-q -O3 -DNDEBUG   -Wall -std=gnu++17 -MD -MT CMakeFiles/ironhead.dir/src/ResourceManager.cpp.obj -MF CMakeFiles/ironhead.dir/src/ResourceManager.cpp.obj.d -o CMakeFiles/ironhead.dir/src/ResourceManager.cpp.obj -c /home/isage/dev/nxengine/ironhead/src/ResourceManager.cpp

Or,

//c flags (default)
CMAKE_C_FLAGS:STRING=

//c Debug flags
CMAKE_C_FLAGS_DEBUG:STRING=-O0 -g -DDEBUG -D_DEBUG

//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//c Release flags
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
  1. rn it's built with dynamic support for ogg/opus:
DEBUG: Failed loading libvorbisfile.a: SDL_LoadObject() not implemented
DEBUG: OGG support not available
DEBUG: Failed loading libopusfile.a: SDL_LoadObject() not implemented
DEBUG: OPUS support not available
DEBUG: Failed loading libvorbisfile.a: SDL_LoadObject() not implemented

sdl2_mixer/VITABUILD Outdated Show resolved Hide resolved
@sharkwouter
Copy link
Contributor

Oh damn, I knew a lot of the cmake scripts for SDL2_mixer were pretty broken, but this is worse than I thought.

sdl2_mixer/VITABUILD Outdated Show resolved Hide resolved
@isage isage force-pushed the fix_sdl2_satellites branch 2 times, most recently from 665e9c0 to ca8de76 Compare July 28, 2023 13:33
@d3m3vilurr
Copy link
Contributor

all done & LGTM
i'll merge it after CI process.

@d3m3vilurr d3m3vilurr merged commit 8cf6539 into vitasdk:master Jul 28, 2023
122 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants