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

Question about embedding deps #195

Open
Waldeedle opened this issue Oct 18, 2024 · 4 comments
Open

Question about embedding deps #195

Waldeedle opened this issue Oct 18, 2024 · 4 comments

Comments

@Waldeedle
Copy link
Contributor

Does discord have other go projects that rely on lilliput internally and if so how are the deps being handled? The reason I ask is because I find myself having build scripts outside of the usual go process I am familiar with to download the linux or osx static libraries. I have recently been thinking of making a dummy embed file so that go always pulls the folder down as can be seen here: master...Waldeedle:lilliput:feature/embed-deps

Appreciate any insights 🙏

@Waldeedle
Copy link
Contributor Author

@skidder if you have time, I'd be curious to see what you think of this one

@skidder
Copy link
Contributor

skidder commented Nov 25, 2024

@skidder if you have time, I'd be curious to see what you think of this one

Interesting, I've not seen this issue before. Which version of Go and which OS are you using? Would love to try repro'ing.

@Waldeedle
Copy link
Contributor Author

Waldeedle commented Nov 25, 2024

Uhm I think any go version (currently using the 1.22.9 for the dockerfile when running it in a local kubernetes environment for the container and 1.23 when working with lilliput locally). I am using an M1 mac device. I also developed a simple program to import lilliput on linux (using windows WSL) and the result was the same. When you import lilliput using go get all you actually get is the files in the root directory and none of the static binaries or the icc profiles.

@Waldeedle
Copy link
Contributor Author

Waldeedle commented Nov 26, 2024

image
running the example app provided in the lilliput repo, is a quick way to reproduce this issue.

@Waldeedle ➜ /workspaces/lilliput/examples (fix/single-frame-from-animated-images) $ go mod vendor
@Waldeedle ➜ /workspaces/lilliput/examples (fix/single-frame-from-animated-images) $ go run main.go
# github.com/discord/lilliput
In file included from ./avcodec.hpp:4,
                 from vendor/github.com/discord/lilliput/avcodec.go:3:
./opencv.hpp:7:10: fatal error: opencv2/core/fast_math.hpp: No such file or directory
    7 | #include <opencv2/core/fast_math.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

If you add the fake embed file I made, it recognizes those folders and their respective files as part of the code to be distributed.
image

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