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

Not able to use dep to isolate vulkan dependency #14

Closed
delaneyj opened this issue Mar 14, 2018 · 5 comments
Closed

Not able to use dep to isolate vulkan dependency #14

delaneyj opened this issue Mar 14, 2018 · 5 comments

Comments

@delaneyj
Copy link

Have a working example using go get, go run main.go works fine.

Use dep init to pull the same dependencies to the vendor folder.

  Using master as constraint for direct dep github.com/vulkan-go/vulkan
  Locking in master (f7f4611) for direct dep github.com/vulkan-go/vulkan
  Using ^0.8.0 as constraint for direct dep github.com/pkg/errors
  Locking in v0.8.0 (645ef00) for direct dep github.com/pkg/errors
  Using v3.3 as constraint for direct dep github.com/vulkan-go/glfw
  Locking in v3.3 (72ceac6) for direct dep github.com/vulkan-go/glfw

It appears there is bad path resolution happening.

# learn/vendor/github.com/vulkan-go/glfw/v3.3/glfw
vendor\github.com\vulkan-go\glfw\v3.3\glfw\c_glfw.go:4:30: fatal error: glfw/src/context.c: No such file or directory
compilation terminated.
# learn/vendor/github.com/vulkan-go/vulkan
vendor\github.com\vulkan-go\vulkan\cgo_helpers.go:10:27: fatal error: vulkan/vulkan.h: No such file or directory
compilation terminated.
@xlab
Copy link
Member

xlab commented Mar 15, 2018

Hi, it seems that dep omits some sources from the vendored dir, judging by the log lines.

Could you please verify that in this case:

vendor\github.com\vulkan-go\vulkan\cgo_helpers.go:10:27: fatal error: vulkan/vulkan.h: No such file or directory
compilation terminated.

You actually have vendor\github.com\vulkan-go\vulkan\vulkan\vulkan.h in place?

Also, could be a path issue. At this point I'm not sure on which stage of the pipeline the problem is. But in both cases packages have an internal directory with C-only sources, so dep could omit them. I don't have the env to test it by myself.

@xlab
Copy link
Member

xlab commented Mar 15, 2018

It looks like an issue
golang/dep#1223

that is surpassed by
golang/dep#944

screen shot 2018-03-15 at 12 20 17

@delaneyj
Copy link
Author

Sorry, log weekend.

You actually have vendor\github.com\vulkan-go\vulkan\vulkan\vulkan.h in place?

No, but it is in C:\tools\mingw64\x86_64-w64-mingw32\include\GLFW and gets picked up when building with a copy at $GOPATH/src/github.com/vulkan-go/vulkan instead of in vendor

@xlab
Copy link
Member

xlab commented Mar 20, 2018

@delaneyj see the prune case. Godep removes C sources, it removed vulkan headers from your vendor/

@delaneyj
Copy link
Author

Sorry forgot to close here, yeah not your fault just good for others to know. Curious how vgo would handle this.

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