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

zig: 0.1.1 -> 0.2.0 #37352

Merged
merged 1 commit into from Mar 20, 2018
Merged

zig: 0.1.1 -> 0.2.0 #37352

merged 1 commit into from Mar 20, 2018

Conversation

andrewrk
Copy link
Member

@andrewrk andrewrk commented Mar 19, 2018

no testing done. sha256 computed with nix-prefetch-url.

@srhb
Copy link
Contributor

srhb commented Mar 19, 2018

Are you sure you don't want the llvm version overrides in all-packages.nix instead?

@srhb
Copy link
Contributor

srhb commented Mar 19, 2018

That is, zig = callPackage ../development/compilers/zig { llvm = llvm_6; llvmPackages = llvmPackages_6; };

@srhb
Copy link
Contributor

srhb commented Mar 19, 2018

@GrahamcOfBorg build zig

@andrewrk
Copy link
Member Author

andrewrk commented Mar 19, 2018

What's the difference?

The information I can provide is that zig 0.2.0 works with exactly llvm 6 and no other version.

I trust your judgement on how to communicate this information to nix.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: zig

Partial log (click to expand)

cannot build derivation '/nix/store/3gb80cmzsdqf570zdny3dwgw61k087vx-apple-framework-CoreText.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/ik6iapz43kzn6phfjmk0m7mkgks95816-apple-framework-ImageIO.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/q9hx85z61f6jazqab2d68wn243dl002m-apple-framework-ApplicationServices.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/0s82jc87ram76pcmpwmsphr984vi7ipj-libuv-1.19.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/57mplk5zh3ljzmcmnx2wd6z8jil0vcjh-cmake-3.10.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/8p37sgyv0kdys52rz4sdc17fhf3nqsw5-libc++abi-6.0.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/kwpssdvp1xfpm6b6w3m982vribj1gfz2-llvm-6.0.0.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/6clgfc6n1ppip71g93djddasjq8lmidc-clang-6.0.0.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/fs995yfwbfpsfjphcwfi3qp13d63py5b-zig-0.2.0.drv': 3 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/fs995yfwbfpsfjphcwfi3qp13d63py5b-zig-0.2.0.drv' failed

@dtzWill
Copy link
Member

dtzWill commented Mar 19, 2018

Putting it at top-level is tradition, for reasons I'm not sure I can claim to fully understand. Although it does make it easier to see this needs a special version and handle accordingly when doing things like updating default llvmPackages version :). Also makes overriding version used more natural, instead of "zig.override { llvmPackages_6 = llvmPackages_5; }" or something :).

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: zig

Partial log (click to expand)

[ 99%] Building CXX object CMakeFiles/zig.dir/src/errmsg.cpp.o
[ 99%] Building CXX object CMakeFiles/zig.dir/src/translate_c.cpp.o
[100%] Linking CXX executable zig
/nix/store/ijmisi52n5wbwybg5ldysa6af01zy5dl-binutils-2.28.1/bin/ld: cannot find -lxml2
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/zig.dir/build.make:887: zig] Error 1
make[1]: *** [CMakeFiles/Makefile2:74: CMakeFiles/zig.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
builder for '/nix/store/kf48bxi18gazjs42iavs8lf2nb509smc-zig-0.2.0.drv' failed with exit code 2
�[31;1merror:�[0m build of '/nix/store/kf48bxi18gazjs42iavs8lf2nb509smc-zig-0.2.0.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: zig

Partial log (click to expand)

cannot build derivation '/nix/store/dw2y8ynfpq49jp52m50gcdanz3ds8pw2-linux-pam-1.3.0.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/5dabvdg707lsk0hchrpgb1c2zq5kcizy-shadow-4.5.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/bakhpk7q027n5974q5h1yq9cwr6h410q-util-linux-2.31.1.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/3mi4n3g81apmwmxlzngp2qi3kzlps8pq-e2fsprogs-1.44.0.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/a0fyvvp6gqcsjb54ys84ynb5q4p7dn93-libarchive-3.3.2.drv': 12 dependencies couldn't be built
cannot build derivation '/nix/store/jssmy6248qghb0sk3r8b4xgwjhayrknr-cmake-3.10.2.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/7adynjdq95md0xph03r8iclpbfwbbnrr-llvm-6.0.0.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/k1sgnmpybv9xir0g59a2g7jgpxnjic6k-clang-6.0.0.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/04lpv9kgbbb7s0kaw0a5j37rml87p06q-zig-0.2.0.drv': 6 dependencies couldn't be built
error: build of '/nix/store/04lpv9kgbbb7s0kaw0a5j37rml87p06q-zig-0.2.0.drv' failed

@andrewrk
Copy link
Member Author

I updated this pull request to the recommended way of version locking.

The build failure above seems to have timed out building GCC. I do not understand why that would be a unique requirement to building this package.

@dtzWill
Copy link
Member

dtzWill commented Mar 20, 2018

Thanks for the update!

Building this locally failed due to missing dep on libxml2, consider fixing along the lines of commit here:

https://github.com/dtzWill/nixpkgs/commits/andrewrk-zig-0.2.0

Which at least fixes the build for me.

Unfortunately staging is, well, a staging area and often doesn't have everything prebuilt. You're right that's unrelated to zig entirely :).


Tried this with the tetris OpenGL example, and once I entered an appropriate nix-shell (nix-shell -p epoxy -p glfw -p libpng) it compiled and runs! 👍

@andrewrk
Copy link
Member Author

Thanks @dtzWill. I updated the PR with your suggestions. What does the nativeBuildInputs change do?

@dtzWill
Copy link
Member

dtzWill commented Mar 20, 2018

It means it's a compile-time dependency, mostly important (and easiest to see why it matters) in the context of cross-compiling: here we want a cmake the builder can execute, not some cmake zig will link against.

LGTM, thanks!

@dtzWill dtzWill merged commit d579747 into NixOS:staging Mar 20, 2018
@andrewrk andrewrk deleted the zig-0.2.0 branch March 20, 2018 17:52
@dtzWill
Copy link
Member

dtzWill commented Mar 20, 2018

Backported to 18.03 in 77c052d \o/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants