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

internal/abi/abi_arm64.h Not included when vendoring dependencies #31

Closed
mechanical-lich opened this issue Sep 5, 2022 · 5 comments
Closed

Comments

@mechanical-lich
Copy link

I noticed this issue when upgrading Ebiten from 2.3.8 to 2.4.0, however this was the dependency throwing the error. So I hope this is the right place to report this.
Error: # github.com/ebitengine/purego vendor/github.com/ebitengine/purego/sys_darwin_arm64.s:8: #include: open /Users/<redacted>/sdk/go1.19/pkg/include/internal/abi/abi_arm64.h: no such file or directory

Digging further I found that the folder /internal/abi/ didn't exist in my vendored copy but strings and fakecgo did. Which led me to this comment that mentions that there needs to be at least one .go file present in a directory in order for all the files to be included during vendoring. I made sure it wasn't a fluke by deleting the vendor folder and starting over but the results were consistent.

There is a work around, I cloned the repo and manually copied it to the vendor folder and the issue resolved (until I vendor again)

@hajimehoshi
Copy link
Member

I'm not familiar with vendoring, but would putting a dummy Go file in internal/abi solve this vendoring issue?

/CC @TotallyGamerJet

@hajimehoshi
Copy link
Member

hajimehoshi commented Sep 5, 2022

https://github.com/goccy/go-graphviz/pull/37/files

Hm, I see. Do we need the required build tag for this?

hajimehoshi added a commit that referenced this issue Sep 5, 2022
Before this change, the package `internal/abi` was ignored by `go mod vendor`
as there was no Go file there. Then building purego failed as `internal/abi`
didn't exist under the `vendor` directory.

This change fixes this issue by adding a dummy Go file to `internal/abi`
and adding an explicit import to it, but with a `dummy` build tag.

I referred a change goccy/go-graphviz#37 for this
hack.

Updates #31
hajimehoshi added a commit that referenced this issue Sep 5, 2022
Before this change, the package `internal/abi` was ignored by `go mod vendor`
as there was no Go file there. Then building purego failed as `internal/abi`
didn't exist under the `vendor` directory.

This change fixes this issue by adding a dummy Go file to `internal/abi`
and adding an explicit import to it, but with a `dummy` build tag.

I referred a change goccy/go-graphviz#37 for this
hack.

Updates #31
@hajimehoshi
Copy link
Member

hajimehoshi commented Sep 5, 2022

I've upated purego.

I'll update Ebitengine and then close this issue.

hajimehoshi added a commit to hajimehoshi/ebiten that referenced this issue Sep 5, 2022
hajimehoshi added a commit to hajimehoshi/ebiten that referenced this issue Sep 5, 2022
@hajimehoshi
Copy link
Member

Until v2.4.2 is released, please try:

go get github.com/hajimehoshi/ebiten/v2@557bef998d148e4e19da0a70c1106c206aff0cef

Thanks,

@mechanical-lich
Copy link
Author

Sorry for the late response! I really appreciate you looking into this and thanks for your help!

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