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

being able to compile - almost out of the box.. feedback about my troubles with Xcode #54

Open
designerfuzzi opened this issue Aug 28, 2022 · 2 comments

Comments

@designerfuzzi
Copy link

it might be of use for someone also doing a first compile attempt following the steps in Build.md

When doing so with Xcode.. step by step as written

in Build.md is something written to compile glm first. That left me confused, i was searching for a folder according to the text to compile before i start. Turns out glm seems to be MGL which is the project target.. so i assumed glm==MGL and hmm i was right, i hope. But first the other 3 issues found..

#include "spirv.h" was missing. so i dropped that file into the workspace MGL>SPIRV>SPIRV-Cross> folder making a reference for Xcode. Same for ...
#include "spirv_cross_c.h"

and short before the compilation would succeed it failed with missing symbols .. following the error message the symbol for
spvtools::val::RayTracingPass(... was missing.. which can only happen when the cpp file is not compiled at that stage.
turns out the function spv_result_t RayTracingPass(...) resides in validate_ray_tracing.cpp that had to be dropped manually to workspace MGL>SPIRV>SPIRV-Tools> and of course checkmarked for being part of the MGL target.

from there it compiled like a charm. Now sipping coffee and testing.. cheers

@designerfuzzi
Copy link
Author

testing. tiny trouble shoot..
after fixing all developer ID issues via setting all libraries (MGL & GLFW) to Sign to run locally in Build Settings (in other words erasing/replacing the ID of the repository creator) they properly compile.

doing all this on a Xcode with 10.14.6 i had to switch all related library projects to compile for 10.14 first (both MGL & GLFW) to be able to run test_mgl_glfw (same for this test application) which then runs obviously as intended pretty well. Searching for some OpenGL framework linked - kidding! Of course i did not find such link.. exciting..

i thought i will be showerd with error messages, but nooo - amazing work. Really good!

@r58Playz
Copy link
Contributor

r58Playz commented Sep 7, 2022

it might be of use for someone also doing a first compile attempt following the steps in Build.md

When doing so with Xcode.. step by step as written

in Build.md is something written to compile glm first. That left me confused, i was searching for a folder according to the text to compile before i start. Turns out glm seems to be MGL which is the project target.. so i assumed glm==MGL and hmm i was right, i hope. But first the other 3 issues found..

#include "spirv.h" was missing. so i dropped that file into the workspace MGL>SPIRV>SPIRV-Cross> folder making a reference for Xcode. Same for ... #include "spirv_cross_c.h"

and short before the compilation would succeed it failed with missing symbols .. following the error message the symbol for spvtools::val::RayTracingPass(... was missing.. which can only happen when the cpp file is not compiled at that stage. turns out the function spv_result_t RayTracingPass(...) resides in validate_ray_tracing.cpp that had to be dropped manually to workspace MGL>SPIRV>SPIRV-Tools> and of course checkmarked for being part of the MGL target.

from there it compiled like a charm. Now sipping coffee and testing.. cheers

Ah the build instructions in the README are outdated. BUILD.md does not mention glm.

Updated instructions from BUILD.md:

Open the xcodeproj and build any of:

  • MGL: produces libMGL.dylib
  • GLFW: produces libMGL.dylib and a patched GLFW that uses MGL.
  • test_mgl_glfw: runs the tests

If you get errors such as No account for team "..." open the affected target and in the Signing and Capabilities tab select the correct team.
If there is no Signing and Capabilities tab open Build Settings, search for "signing", and select the correct team in Development Team.

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

No branches or pull requests

2 participants