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

error: building sdl2:x64-osx failed with: BUILD_FAILED #35839

Closed
Sn4k3R94 opened this issue Dec 22, 2023 · 10 comments
Closed

error: building sdl2:x64-osx failed with: BUILD_FAILED #35839

Sn4k3R94 opened this issue Dec 22, 2023 · 10 comments
Assignees
Labels

Comments

@Sn4k3R94
Copy link

Sn4k3R94 commented Dec 22, 2023

I'm trying to compile the code from this project: https://github.com/GPSnoopy/BelgianChocolateDuke3D
but I'm getting this error at the end of the process, I'm on macOS Sonoma:

error: building sdl2:x64-osx failed with: BUILD_FAILED
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+sdl2
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[sdl2]+Build+error
Include '[sdl2] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
vcpkg-scripts version: 14e7bb4 2022-05-10 (1 year, 7 months ago)

What could be?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 22, 2023

vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
vcpkg-scripts version: 14e7bb4 2022-05-10 (1 year, 7 months ago)

What could be?

I don't know. But I would suggest trying the last version, not last year's version.

@Sn4k3R94
Copy link
Author

How do I update vcpkg to the latest version on macOS?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 22, 2023

How did you get it?
Assuming you cloned the master branch from this git repo, you do

git pull
./bootstrap-vcpkg.sh

Otherwise start from scratch:
https://github.com/microsoft/vcpkg/#quick-start-unix

@Sn4k3R94
Copy link
Author

I did a clean reinstallation of vcpkg and I'm on the latest version, also download the packages that the project needs, however, I noticed that the code downloads the 2022 version when compiling and gives the aforementioned error...
I'm going crazy, I compiled this same code on Ubuntu and I had no problems.
Any other suggestions as to what might be?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 23, 2023

the code downloads the 2022 version when compiling

https://github.com/GPSnoopy/BelgianChocolateDuke3D/blob/6826682f43d94f27117a8570c4fc058ede9c236a/vcpkg_macosx.sh#L8

That is not vcpkg code. Remove that line. Or find another commit that works for you. Or convert that project to manifest mode.

@Sn4k3R94
Copy link
Author

Sn4k3R94 commented Dec 23, 2023

Thanks for the help, I removed the line and the first process showed no errors.
However, when compiling the game files it shows this error:

CMake Error at build/vcpkg.macosx/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
Could not find a package configuration file provided by "SDL2-mixer" with
any of the following names:

SDL2-mixerConfig.cmake
sdl2-mixer-config.cmake

Add the installation prefix of "SDL2-mixer" to CMAKE_PREFIX_PATH or set
"SDL2-mixer_DIR" to a directory containing one of the above files. If
"SDL2-mixer" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:65 (find_package)

I'm about to give up, I've already installed SDL2 and gives that error

@dg0yt
Copy link
Contributor

dg0yt commented Dec 23, 2023

In July, sdl-mixer's CMake config changed, so additional changes are required to the project.
You can try to change CMakeLists.txt line 65-66:

-	find_package(SDL2-mixer CONFIG REQUIRED)
-	set(SDL2_ALL_LIBRARIES SDL2::SDL2main SDL2::SDL2-static SDL2::SDL2_mixer)
+	find_package(SDL2-mixer NAMES SDL2_mixer CONFIG REQUIRED)
+	set(SDL2_ALL_LIBRARIES SDL2::SDL2main SDL2::SDL2-static $<IF:$<TARGET_EXISTS:SDL2_mixer::SDL2_mixer>,SDL2_mixer::SDL2_mixer,SDL2_mixer::SDL2_mixer-static>)

@Sn4k3R94
Copy link
Author

Thank you very much for all your help friend, I made the changes to the lines and apparently the code compiled, with a few warnings, however, the bin folder is empty and the compilation did not generate any executables.

Any ideas what it might be?

@FrankXie05
Copy link
Contributor

This not vcpkg issue. And please use the latest vcpkg. :)

@FrankXie05
Copy link
Contributor

We hope your question was answered to your satisfaction; if it wasn't, you can ping me with more info and I will reopen.

@FrankXie05 FrankXie05 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants