Open gabriellanzer opened 9 months ago
Have you install the vulkan sdk on your system? vulkansdk
requires a manual installation with environment variable VULKAN_SDK
set. check find_vulkansdk.lua
Yes! I have it installed and tried adding the SDK to the path. It doesn't look like find_vulkansdk.lua
is doing proper checks for Apple... I will study it a little more during the week and might propose some adjustments.
I built xmake from source and I am trying to add a breakpoint following the debugging instructions but emmylua_debugger package is trying to hookup the x86_64 dsym...
xrepo env -b emmylua_debugger xrepo install vulkansdk
checking for platform ... macosx
checking for architecture ... arm64
checking for Xcode directory ... /Applications/Xcode.app
checking for Codesign Identity of Xcode ... no
checking for SDK version of Xcode for macosx (arm64) ... 13.3
checking for Minimal target version of Xcode for macosx (arm64) ... 13.3
error: dlopen(/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib, 0x0006): tried: '/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib' (no such file), '/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
error: execv(xrepo install) failed(255)
Any idea on how to get it working so I can get more debug info? Or perhaps other commands? I tried copying the x86_64 symbol from the vscode extension to the package folder but the error was another one then (I can't recall which one).
I reckon that there is a specific folder inside the Vulkan SDK called macOS. In that folder I can find the folders bin
, include
, lib
, source
, etc. I tried pointing the SDK path to that folder but it still didn't work.
To be honest, I don't see why imgui
would need vulkansdk
, the vulkan-headers
should suffice... I will try to work around this issue by creating a local repo and overriding imgui behavior to depend on the headers instead. If this works I imagine I can open a PR to submit the changes. Regardless of that, the vulkansdk is still complicated to get working.
To be honest, I don't see why
imgui
would needvulkansdk
, thevulkan-headers
should suffice... I will try to work around this issue by creating a local repo and overriding imgui behavior to depend on the headers instead. If this works I imagine I can open a PR to submit the changes. Regardless of that, the vulkansdk is still complicated to get working.
you enabled vulkan config, {configs = {glfw_vulkan = true}}
Either running xrepo install vulkansdk or using add_requires("imgui v1.89.9-docking", {configs = {glfw_vulkan = true}}) in my xmake.lua cannot find the vulkansdk package:
I built xmake from source and I am trying to add a breakpoint following the debugging instructions but emmylua_debugger package is trying to hookup the x86_64 dsym...
xrepo env -b emmylua_debugger xrepo install vulkansdk checking for platform ... macosx checking for architecture ... arm64 checking for Xcode directory ... /Applications/Xcode.app checking for Codesign Identity of Xcode ... no checking for SDK version of Xcode for macosx (arm64) ... 13.3 checking for Minimal target version of Xcode for macosx (arm64) ... 13.3 error: dlopen(/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib, 0x0006): tried: '/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib' (no such file), '/Users/gkann/.xmake/packages/e/emmylua_debugger/1.6.3/99ef8b20e2c04f679c155dae63e8429e/bin/emmy_core.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) error: execv(xrepo install) failed(255)
Any idea on how to get it working so I can get more debug info? Or perhaps other commands? I tried copying the x86_64 symbol from the vscode extension to the package folder but the error was another one then (I can't recall which one).
I reckon that there is a specific folder inside the Vulkan SDK called macOS. In that folder I can find the folders
bin
,include
,lib
,source
, etc. I tried pointing the SDK path to that folder but it still didn't work.
you can add print logs to debug here.
https://github.com/xmake-io/xmake/blob/master/xmake/modules/detect/sdks/find_vulkansdk.lua
To be honest, I don't see why
imgui
would needvulkansdk
, thevulkan-headers
should suffice... I will try to work around this issue by creating a local repo and overriding imgui behavior to depend on the headers instead. If this works I imagine I can open a PR to submit the changes. Regardless of that, the vulkansdk is still complicated to get working.you enabled vulkan config,
{configs = {glfw_vulkan = true}}
Either running xrepo install vulkansdk or using add_requires("imgui v1.89.9-docking", {configs = {glfw_vulkan = true}}) in my xmake.lua cannot find the vulkansdk package:
Should we make imgui
and cimgui
depend on vulkan-headers
instead of vulkansdk
?
Thanks! What I mean by "I don't see why imgui
would need vulkansdk
" is that internally it doesn't seem to depend on anything that is not provided by vulkan-headers
. So if the xmake.lua file for the imgui package would be changed to add_requires("vulkan-headers")
instead of add_requires("vulkansdk")
the dependencies would be less bloated.
Thanks! What I mean by "I don't see why
imgui
would needvulkansdk
" is that internally it doesn't seem to depend on anything that is not provided byvulkan-headers
. So if the xmake.lua file for the imgui package would be changed toadd_requires("vulkan-headers")
instead ofadd_requires("vulkansdk")
the dependencies would be less bloated.
You can try.
And idea? @AidanSun05 @Qudix
I tried installing a version of imgui
that depended on vulkan-headers
instead of vulkansdk
. I could get it to install successfully, but when I tried to compile the example code with GLFW+Vulkan, I ran into "unresolved external symbol" linker errors because vulkan-headers
only provides the Vulkan functions but not the SDK and the definitions (which vulkansdk
does). While you can certainly remove the dependency on vulkansdk
for imgui
, you can't get rid of it completely in your project as it still provides libraries which you should link into.
Ah yes. I guess that makes sense... If you have your existing Vulkan application and you want to integrate ImGUI you wouldn't use their implementation. But that sort of defeated the purpose of having a fully functional package. Sorry for the misleading suggestion. I didn't have the time to debug MacOS further yet... I ended up copy-pasting the ImGui files instead.
Maybe you can try adding this line of code before all add_requires:
add_requires("vulkansdk")
Then try recompiling it.
If that doesn't work, change the name of the current project (e.g. Project to Project1), then create a new project called Project, then copy the original code and the modified xmake.lua and recompile it.
I couldn't find vulkansdk on Windows and ubuntu 20.04 before. it's because I added this line in xmake.lua:
add_requires("vulkansdk", {configs = {shared = true}})
When I saw add_require("vulkansdk")
don't take any parameter in other issues, I changed xmake.lua and still couldn't find vulkansdk.
but I created a new project and suddenly I found that the new project could find vulkansdk. That's what solved the problem.
I hope my previous manager and method can help you.
Xmake Version
2.8.5
Operating System Version and Architecture
macOS Sonoma 14.0
Describe Bug
Either running
xrepo install vulkansdk
or usingadd_requires("imgui v1.89.9-docking", {configs = {glfw_vulkan = true}})
in myxmake.lua
cannot find thevulkansdk
package:I tried running
xrepo update-repo
and updating xmake withxmake update
to no avail. Is this package legacy? I can see it exists in the GitHub repo.Expected Behavior
To be able to download and install vulkansdk package as it's in the Github repo.
Project Configuration
Additional Information and Error Logs
No more information needed.