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] Offline build #680

Open
X1mper opened this issue Aug 6, 2024 · 6 comments
Open

[Question] Offline build #680

X1mper opened this issue Aug 6, 2024 · 6 comments
Labels
bug This issue or pull request discusses a bug

Comments

@X1mper
Copy link

X1mper commented Aug 6, 2024

Ly version

1.0.2

Observed behavior

I am maintaining the ly package in the sisyphus ALT Linux repository.
My attempts to Build ly without the internet were unsuccessful
Everything stopped at the error below

Maybe it will be fixed in the new version and I do not know about it?

Expected behavior

Successful Build

Steps to reproduce

%zig_build --global-cache-dir vendor

Relevant logs

/usr/src/RPM/BUILD/ly-1.0.2/build.zig:28:33: error: no field named 'path' in union 'Build.LazyPath'
@X1mper X1mper added the bug This issue or pull request discusses a bug label Aug 6, 2024
@X1mper
Copy link
Author

X1mper commented Aug 6, 2024

And also, can I ask you to make tarballs for Building without the Internet? For future releases

@AnErrupTion
Copy link
Collaborator

@X1mper It looks like your Zig version may be too recent. Ly v1.0.2 only supports building with Zig 0.12.0 but not beyond. You can try cherry-picking (or cloning from) fadbbf6 which backports Zig 0.13.0 support from master.

And also, can I ask you to make tarballs for Building without the Internet? For future releases

It doesn't seem like a very "clean" solution to me. For each release, we'd have to download the dependencies manually and modify the build.zig.zon file to use local paths instead, like what you're trying to do I presume.

@X1mper
Copy link
Author

X1mper commented Aug 8, 2024

@X1mper It looks like your Zig version may be too recent. Ly v1.0.2 only supports building with Zig 0.12.0 but not beyond. You can try cherry-picking (or cloning from) fadbbf6 which backports Zig 0.13.0 support from master.

Only releases build in our repository. I hope the version will be released soon! :)

It doesn't seem like a very "clean" solution to me. For each release, we'd have to download the dependencies manually and modify the build.zig.zon file to use local paths instead, like what you're trying to do I presume.

You can try packaging vendor like this:

zig build --global-cache-dir vendor

pushd vendor
rm -rfv z  # deletes built files. this is needed so that you only have the dependencies and not the entire build cache
popd

Source: https://en.opensuse.org/Zig#Workaround_for_confusing_package_manager

I suppose it works.

@X1mper
Copy link
Author

X1mper commented Aug 8, 2024

It seems like this method allows not to change the build.zig.zon file

@AnErrupTion
Copy link
Collaborator

Honestly, this could probably be done for v1.1.0 and even v1.0.3, if I end up releasing that, if it can at least be partially automated. I'll take a better look at it once at least one of those versions near their release.

@pm-McFly
Copy link

I had the same problem last night.
I tried to build master and v1.0.x and always ended up with an issue regarding zig enum or type cast

I was using zig 0.12.1 and 0.13.0 as the readme indicates zig >= 0.12.0.

Now, the build of master using zig 0.12.0 is working perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request discusses a bug
Projects
None yet
Development

No branches or pull requests

3 participants