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

crystal: 0.23.1 -> 0.24.1 #33029

Merged
merged 2 commits into from Dec 25, 2017
Merged

Conversation

sifmelcara
Copy link
Member

@sifmelcara sifmelcara commented Dec 24, 2017

Motivation for this change

New stable release.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

  • upstream renamed doc target to docs
  • upstream now provides statically linked version of prebuilt compiler, so there is no need to fix binary anymore
  • I use my own unpackPhase because upstream provided archives (source and the compiler binary) have the same top directory name

@sifmelcara
Copy link
Member Author

I found that we need to update shards to support crystal 0.24.1, so the package is updated.

@grahamc
Copy link
Member

grahamc commented Dec 24, 2017

@GrahamcOfBorg eval
@GrahamcOfBorg build shards crystal

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: aarch64-linux

Package ‘shards-0.7.2’ in /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/development/tools/build-managers/shards/default.nix:24 is not supported on ‘aarch64-linux’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: x86_64-darwin

clang -fPIC    -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
./bin/crystal build --release  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Assertion failed: (cast<DISubprogram>(Scope)->describes(MF->getFunction())), function getOrCreateRegularScope, file /var/cache/omnibus/src/llvm/llvm-3.9.1.src/lib/CodeGen/LexicalScopes.cpp, line 159.
/private/tmp/nix-build-crystal-0.24.1.drv-0/crystal-0.24.1/../crystal-0.24.1-2/bin/crystal: line 102: 66095 Abort trap: 6           "$INSTALL_DIR/embedded/bin/crystal" "$@"
make: *** [Makefile:118: .build/crystal] Error 134
builder for ‘/nix/store/k95kd0pbsqx2vkwk8jym9ffx9jnn07i3-crystal-0.24.1.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/r7cfh4506cmmyknnm7a7n15c3mpqhkw8-shards-0.7.2.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/k95kd0pbsqx2vkwk8jym9ffx9jnn07i3-crystal-0.24.1.drv’, ‘/nix/store/r7cfh4506cmmyknnm7a7n15c3mpqhkw8-shards-0.7.2.drv’ failed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

gzip -c bin/shards > shards-0.7.2_linux_x86_64.gz
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pn20wvfvbmc191csk5k1zjpxzzwm8il0-shards-0.7.2
shrinking /nix/store/pn20wvfvbmc191csk5k1zjpxzzwm8il0-shards-0.7.2/bin/shards
stripping (with flags -S) in /nix/store/pn20wvfvbmc191csk5k1zjpxzzwm8il0-shards-0.7.2/bin 
patching script interpreter paths in /nix/store/pn20wvfvbmc191csk5k1zjpxzzwm8il0-shards-0.7.2
checking for references to /tmp/nix-build-shards-0.7.2.drv-0 in /nix/store/pn20wvfvbmc191csk5k1zjpxzzwm8il0-shards-0.7.2...
/nix/store/pn20wvfvbmc191csk5k1zjpxzzwm8il0-shards-0.7.2
/nix/store/v64vmgayc0j13i9rgrwbak14cp2hkly8-crystal-0.24.1

@grahamc
Copy link
Member

grahamc commented Dec 24, 2017

@sifmelcara the package says it supports darwin, but the build suggests it doesn't. Since you're a maintainer: should the build get fixed for darwin? should the package say it doesn't support darwin? should we ignore the error for now?

@sifmelcara
Copy link
Member Author

Yes it should build on darwin.
It seems like a llvm issue which causes darwin_x86_64's prebuilt binary not working correctly.
upstream discussion is here: crystal-lang/crystal#4719

I just took crystal maintainer's latest suggestion in https://github.com/Homebrew/homebrew-core/pull/22091 (suggests to add --no-debug to crystal flags) and force updated this pr.

@grahamc could you please tell @GrahamcOfBorg to try again? thank you very much

@orivej
Copy link
Contributor

orivej commented Dec 24, 2017

@GrahamcOfBorg build shards crystal

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: aarch64-linux

Package ‘shards-0.7.2’ in /var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/development/tools/build-managers/shards/default.nix:24 is not supported on ‘aarch64-linux’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-darwin

cp: cannot stat '/usr/local/lib/libyaml.a': No such file or directory
chmod: cannot access 'libyaml.a': No such file or directory
/nix/store/1zk2mkvfhk6p1dgf4ac1vkmb05fmhbbw-crystal-0.24.1/bin/crystal build --release -o bin/shards src/shards.cr 
gzip -c bin/shards > shards-0.7.2_darwin_x86_64.gz
installing
post-installation fixup
stripping (with flags -S) in /nix/store/fvmbzvbbr9zg1i3i773r0w3sjnasd3mc-shards-0.7.2/bin 
patching script interpreter paths in /nix/store/fvmbzvbbr9zg1i3i773r0w3sjnasd3mc-shards-0.7.2
/nix/store/fvmbzvbbr9zg1i3i773r0w3sjnasd3mc-shards-0.7.2
/nix/store/1zk2mkvfhk6p1dgf4ac1vkmb05fmhbbw-crystal-0.24.1

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

gzip -c bin/shards > shards-0.7.2_linux_x86_64.gz
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/v9bds6znlwvzab4sjc917r0fqkcd7hhw-shards-0.7.2
shrinking /nix/store/v9bds6znlwvzab4sjc917r0fqkcd7hhw-shards-0.7.2/bin/shards
stripping (with flags -S) in /nix/store/v9bds6znlwvzab4sjc917r0fqkcd7hhw-shards-0.7.2/bin 
patching script interpreter paths in /nix/store/v9bds6znlwvzab4sjc917r0fqkcd7hhw-shards-0.7.2
checking for references to /tmp/nix-build-shards-0.7.2.drv-0 in /nix/store/v9bds6znlwvzab4sjc917r0fqkcd7hhw-shards-0.7.2...
/nix/store/v9bds6znlwvzab4sjc917r0fqkcd7hhw-shards-0.7.2
/nix/store/62vnfz1rs5a1xkicvn2zjn0nym3yygwy-crystal-0.24.1

@grahamc grahamc merged commit 7635a70 into NixOS:master Dec 25, 2017
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