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

ci: build universal dylib #86

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Jan 11, 2025

vkd3d configuration fails:

checking for -lvulkan... not found
checking for -lvulkan-1... not found
checking for -lMoltenVK... not found
configure: error: libvulkan and libMoltenVK not found.

Perhaps you know what to do about this?
https://github.com/madebr/SDL_gpu_shadercross/actions/runs/12725804009/job/35473453928#step:12:1869

@madebr madebr marked this pull request as draft January 11, 2025 16:48
@thatcosmonaut
Copy link
Collaborator

I'm confused... were we not installing the Vulkan SDK as a MacOS prerequisite before?

@madebr madebr force-pushed the ci-universal-dylib branch 2 times, most recently from 824074a to f370749 Compare January 11, 2025 18:46
@madebr madebr marked this pull request as ready for review January 11, 2025 19:10
@madebr
Copy link
Contributor Author

madebr commented Jan 11, 2025

I'm confused... were we not installing the Vulkan SDK as a MacOS prerequisite before?

Thanks for asking the question. It made me dive deeper.
Yes indeed, we're building Vulkan-Loader as a dependency of vkd3d.

The issue was the ;-semicolon was splitting the -DCMAKE_OSX_ARCHITECTURES=x86_64;arm64 in two arguments.
Escaping the string fixes it.

Can you test the macos artifact before merging?

@thatcosmonaut
Copy link
Collaborator

You're the best. Will test today.

@thatcosmonaut
Copy link
Collaborator

Just tested on my MBP 2012 and it recognizes the architecture just fine, but it's complaining about an unrecognized symbol because my OSX version is too old (10.15). That's fine, SDL GPU is technically unsupported on my hardware anyway, but we might want to add -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 so that the binary doesn't target OSX 14 unnecessarily.

@madebr
Copy link
Contributor Author

madebr commented Jan 11, 2025

but we might want to add -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 so that the binary doesn't target OSX 14 unnecessarily.

That's easy for the CMake projects, but what CFLAGS should be passed to vkd3d?
Does that mean -mmacosx-version-min=11.0?
And when targeting iphoneOS, is the option also -mmacosx-version-min=X.Y?

@madebr
Copy link
Contributor Author

madebr commented Jan 11, 2025

Looks like every apple platform has its option name:
https://gitlab.kitware.com/cmake/cmake/-/commit/4017bf40de512e977d59c12f4e3f6c91f5dd953d#3a2e71d34f1a06c74cc5a2b640507d5997c26ace_20_20

I'll have to manually pass -mmacosx-version-min=11.0 to CFLAGS.

@madebr madebr force-pushed the ci-universal-dylib branch from f370749 to f453a15 Compare January 11, 2025 21:56
@thatcosmonaut
Copy link
Collaborator

Just tested again and the artifacts seem to only have arm64.

@madebr
Copy link
Contributor Author

madebr commented Jan 11, 2025

Just tested again and the artifacts seem to only have arm64.

That's weird. All of them? Or some of them?

@thatcosmonaut
Copy link
Collaborator

Oh sorry I meant the MacOS artifact.

@madebr
Copy link
Contributor Author

madebr commented Jan 11, 2025

Oh sorry I meant the MacOS artifact.

I meant to say, all libraries/executables in the macOS archive?
When I look at the logs, I see the compiler gets -arch x86_64 -arch arm64.
So it'd surprise me if all of them are missing x86_64.

@thatcosmonaut
Copy link
Collaborator

False alarm, I was checking an executable from the wrong folder 😅

@thatcosmonaut thatcosmonaut merged commit 7fac813 into libsdl-org:main Jan 12, 2025
5 checks passed
@thatcosmonaut
Copy link
Collaborator

Merged, thanks!

@madebr madebr deleted the ci-universal-dylib branch January 12, 2025 01:16
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.

2 participants