Closed cadenkriese closed 2 years ago
The KHR headers should be under /usr/include/KHR, if not you can find them in the externals directory.
Xcode may require the command line utilities to run lldb, and you will need to change the signing on the build from Xcode to your own developer id
I had already changed the developer id / team for all the targets in xcode and installed commandline tools.
I grabbed the KHR headers from https://www.khronos.org/registry/EGL/, and now I get
also worth noting that I needed to replace the bundled glfw with the 3.3-stable branch from their repo in order to build it.
I use the shell scripts in external, clone/build/install on my local machine that seems to work fine for me.
Normally I wipe the entire MGL directory after a check-in and rebuild from scratch to make sure it builds correctly.
I will delete the /usr/include/GL and other directories and do a clean wipe and clone MGL again tonight to make sure it still builds correctly.
Hi, I'm not able to run the mgl test on my machine, M1 Max macOS 12.2
I get this error from Xcode which I don't really know how to debug,
Xcode Error
``` Details Could not launch “test_mgl_glfw” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: LLDB provided no error string. User Info: { DVTErrorCreationDateKey = "2022-02-06 07:55:44 +0000"; DVTRadarComponentKey = 855031; IDERunOperationFailingWorker = DBGLLDBLauncher; RawUnderlyingErrorMessage = "LLDB provided no error string."; } -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "MacBookPro18,2"; "device_osBuild" = "12.2 (21D49)"; "device_platform" = "com.apple.platform.macosx"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 16; "operation_errorCode" = 3; "operation_errorDomain" = IDEDebugSessionErrorDomain; "operation_errorWorker" = DBGLLDBLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.macosx"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.tool"; "param_runnable_swiftVersion" = "5.5.2"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "macosx12.1"; "sdk_osVersion" = "12.1"; "sdk_variant" = macos; } -- System Information macOS Version 12.2 (Build 21D49) Xcode 13.2.1 (19586) (Build 13C100) Timestamp: 2022-02-06T00:55:44-07:00 ```Actually, I saw this has been brought up in #9
When trying to build through the makefile I get a missing KHR header presumably from some dependency misconfiguration on my end but I've been fiddling with this for a while and can't quite figure it out.
Makefile Error
``` ❯ make -j test c++ -std=c++14 -MMD -gfull -Og -arch arm64 -I/usr/local/include/spirv/1.2 -Iexternal/SPIRV-Cross -I/opt/homebrew/opt/glslang/include/glslang/Include -I/opt/homebrew/include -I/opt/homebrew/Cellar/spirv-tools/2022.1/include -I/opt/homebrew/Cellar/glm/0.9.9.8/include -IMGL/include -IMGL/SPIRV/SPIRV-Cross -DENABLE_OPT=0 -DSPIRV_CROSS_C_API_MSL=1 -DSPIRV_CROSS_C_API_GLSL=1 -DSPIRV_CROSS_C_API_CPP=1 -DSPIRV_CROSS_C_API_REFLECT=1 -I/opt/homebrew/Cellar/glfw/3.3.6/include -c test_mgl_glfw/main.cpp -o build/test_mgl_glfw/main.o cc -std=gnu17 -MMD -gfull -Og -arch arm64 -I/usr/local/include/spirv/1.2 -Iexternal/SPIRV-Cross -I/opt/homebrew/opt/glslang/include/glslang/Include -I/opt/homebrew/include -I/opt/homebrew/Cellar/spirv-tools/2022.1/include -I/opt/homebrew/Cellar/glm/0.9.9.8/include -IMGL/include -IMGL/SPIRV/SPIRV-Cross -DENABLE_OPT=0 -DSPIRV_CROSS_C_API_MSL=1 -DSPIRV_CROSS_C_API_GLSL=1 -DSPIRV_CROSS_C_API_CPP=1 -DSPIRV_CROSS_C_API_REFLECT=1 -c MGL/src/buffers.c -o build/MGL/src/buffers.o cc -std=gnu17 -MMD -gfull -Og -arch arm64 -I/usr/local/include/spirv/1.2 -Iexternal/SPIRV-Cross -I/opt/homebrew/opt/glslang/include/glslang/Include -I/opt/homebrew/include -I/opt/homebrew/Cellar/spirv-tools/2022.1/include -I/opt/homebrew/Cellar/glm/0.9.9.8/include -IMGL/include -IMGL/SPIRV/SPIRV-Cross -DENABLE_OPT=0 -DSPIRV_CROSS_C_API_MSL=1 -DSPIRV_CROSS_C_API_GLSL=1 -DSPIRV_CROSS_C_API_CPP=1 -DSPIRV_CROSS_C_API_REFLECT=1 -c MGL/src/compute.c -o build/MGL/src/compute.o cc -std=gnu17 -MMD -gfull -Og -arch arm64 -I/usr/local/include/spirv/1.2 -Iexternal/SPIRV-Cross -I/opt/homebrew/opt/glslang/include/glslang/Include -I/opt/homebrew/include -I/opt/homebrew/Cellar/spirv-tools/2022.1/include -I/opt/homebrew/Cellar/glm/0.9.9.8/include -IMGL/include -IMGL/SPIRV/SPIRV-Cross -DENABLE_OPT=0 -DSPIRV_CROSS_C_API_MSL=1 -DSPIRV_CROSS_C_API_GLSL=1 -DSPIRV_CROSS_C_API_CPP=1 -DSPIRV_CROSS_C_API_REFLECT=1 -c MGL/src/draw_buffers.c -o build/MGL/src/draw_buffers.o cc -std=gnu17 -MMD -gfull -Og -arch arm64 -I/usr/local/include/spirv/1.2 -Iexternal/SPIRV-Cross -I/opt/homebrew/opt/glslang/include/glslang/Include -I/opt/homebrew/include -I/opt/homebrew/Cellar/spirv-tools/2022.1/include -I/opt/homebrew/Cellar/glm/0.9.9.8/include -IMGL/include -IMGL/SPIRV/SPIRV-Cross -DENABLE_OPT=0 -DSPIRV_CROSS_C_API_MSL=1 -DSPIRV_CROSS_C_API_GLSL=1 -DSPIRV_CROSS_C_API_CPP=1 -DSPIRV_CROSS_C_API_REFLECT=1 -c MGL/src/error.c -o build/MGL/src/error.o cc -std=gnu17 -MMD -gfull -Og -arch arm64 -I/usr/local/include/spirv/1.2 -Iexternal/SPIRV-Cross -I/opt/homebrew/opt/glslang/include/glslang/Include -I/opt/homebrew/include -I/opt/homebrew/Cellar/spirv-tools/2022.1/include -I/opt/homebrew/Cellar/glm/0.9.9.8/include -IMGL/include -IMGL/SPIRV/SPIRV-Cross -DENABLE_OPT=0 -DSPIRV_CROSS_C_API_MSL=1 -DSPIRV_CROSS_C_API_GLSL=1 -DSPIRV_CROSS_C_API_CPP=1 -DSPIRV_CROSS_C_API_REFLECT=1 -c MGL/src/fence.c -o build/MGL/src/fence.o In file included from MGL/src/compute.c:21: In file included from MGL/include/glm_context.h:28: In file included from MGL/include/glm_dispatch.h:13: MGL/include/glcorearb.h:65:10: fatal error: 'KHR/khrplatform.h' file not found #include