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

fails to build on Ubuntu 16.10 #2

Closed
nergdron opened this issue Nov 28, 2016 · 6 comments
Closed

fails to build on Ubuntu 16.10 #2

nergdron opened this issue Nov 28, 2016 · 6 comments

Comments

@nergdron
Copy link

Just trying to install this library with "go get", and it's having problems finding all the function definitions for the C Vulkan library:

$ go get -v github.com/vulkan-go/vulkan
github.com/vulkan-go/vulkan
# github.com/vulkan-go/vulkan
/tmp/go-build113185610/github.com/vulkan-go/vulkan/_obj/init.cgo2.o: In function `_cgo_2f542f46001b_Cfunc_vkInit':
../../../go/src/github.com/vulkan-go/vulkan/init.go:50: undefined reference to `vkInit'
/tmp/go-build113185610/github.com/vulkan-go/vulkan/_obj/init.cgo2.o: In function `_cgo_2f542f46001b_Cfunc_vkInitInstance':
../../../go/src/github.com/vulkan-go/vulkan/init.go:68: undefined reference to `vkInitInstance'
/tmp/go-build113185610/github.com/vulkan-go/vulkan/_obj/vk_bridge.o: In function `callVkCreateInstance':
../../../go/src/github.com/vulkan-go/vulkan/vk_bridge.c:8: undefined reference to `vgo_vkCreateInstance'
/tmp/go-build113185610/github.com/vulkan-go/vulkan/_obj/vk_bridge.o: In function `callVkDestroyInstance':
../../../go/src/github.com/vulkan-go/vulkan/vk_bridge.c:14: undefined reference to `vgo_vkDestroyInstance'
/tmp/go-build113185610/github.com/vulkan-go/vulkan/_obj/vk_bridge.o: In function `callVkEnumeratePhysicalDevices':
../../../go/src/github.com/vulkan-go/vulkan/vk_bridge.c:21: undefined reference to `vgo_vkEnumeratePhysicalDevices'
[...]

It doesn't seem to be resolving the headers properly, either the system ones (via libvulkan-dev package) or via the header files you've included in the repo under /vulkan. Any ideas?

@xlab
Copy link
Member

xlab commented Nov 28, 2016

Hi!

Sorry, the desktop linux is the last platform I hadn't added yet.

The only linux target available for now is the compute one, where surface isn't created. For proper desktop linux support I'll add GLFW as well to create the surface, probably will go back to that in a few weeks.

You can add this by yourself, see Darwin / Windows examples, they are simple.

@xlab
Copy link
Member

xlab commented Nov 28, 2016

P. S. the problem is that it doesn't link to the bridge code, because bridges have build constraints.

@xlab
Copy link
Member

xlab commented Nov 28, 2016

Nevermind, adding support is not so simple on a second thought, I guess you'll need to wait a bit :P

You can run it on your iOS/ Android smartphone meanwhile :3

@jfreymuth
Copy link

Actually it is quite simple:
add a linux build constraint to vk_wrapper_desktop.c
add https://gist.github.com/jfreymuth/da6eb6516a9d01df123e7afb74138aff

@xlab
Copy link
Member

xlab commented Nov 29, 2016

@jfreymuth Thanks, this is good for initial support!

The full cover though includes some code generation for XCB/Wayland/Mir headers (all that extra code in wrappers, as in windows for example) and testing. I'll do that later.

@nergdron Can you check if it works for you? GLFW needs to be installed, at least 3.2.

@nergdron
Copy link
Author

Yeah, this solves my build problems anyway. Looks good to start with, thanks!

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

3 participants