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: 1.2.2 → 1.3.2 #156882

Closed
wants to merge 1 commit into from
Closed

crystal: 1.2.2 → 1.3.2 #156882

wants to merge 1 commit into from

Conversation

dinkopehar
Copy link

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@dinkopehar
Copy link
Author

dinkopehar commented Jan 26, 2022

This is my first time trying to contribute to nix packages. I just bumped crystal version to 1.3.2 . I tried to build it using nix-build -A crystal_1_3 or nix-build -A crystal, but I get a traceback:

...
source root is source
patching sources
configuring
no configure script, doing nothing
building
build flags: -j8 -l8 SHELL=/nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash CRYSTAL_CONFIG_VERSION=1.0.0 all docs
/nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash: src/llvm/ext/find-llvm-config: /bin/sh: bad interpreter: No such file or directory
Makefile:58: *** Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG. Compatible versions: 11.1 11.0 10.0 9.0 8.0 7.1 6.0 5.0 4.0 3.9 3.8.  Stop.
...

but I don't see it when I build as nix-build -A crystal_1_2 . If someone can help me test locally correctly, what command is used, I can check (maybe @fabianhjr) . Thank you and I would like to use latest version of Crystal, I hope.

@fabianhjr
Copy link
Member

fabianhjr commented Jan 26, 2022

Hi @dinko-pehar, I normally use something like:

env NIX_PATH="nixpkgs=$PWD" nix-shell -p crystal_1_3

for testing, hope it helps. (On the root of the repo with the changes checked out)

Thanks for the merge request. :3

@dinkopehar
Copy link
Author

Hi @dinko-pehar, I normally use something like:

env NIX_PATH="nixpkgs=$PWD" nix-shell -p crystal_1_3

for testing, hope it helps. (On the root of the repo with the changes checked out)

Thanks for the merge request. :3

Yeah, I use that also, here is the whole output:

this derivation will be built:
  /nix/store/ygic0pprgx7rnqg1qs7zs3psm74h3jwq-crystal-1.3.2.drv
building '/nix/store/ygic0pprgx7rnqg1qs7zs3psm74h3jwq-crystal-1.3.2.drv'...
unpacking sources
unpacking source archive /nix/store/wm1djxwf48pnfjg5l6w94fk83skjfj3w-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
build flags: -j8 -l8 SHELL=/nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash CRYSTAL_CONFIG_VERSION=1.3.2 all docs
/nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash: src/llvm/ext/find-llvm-config: /bin/sh: bad interpreter: No such file or directory
Makefile:196: *** "Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG. Compatible versions: 13.0 12.0 11.1 11.0 10.0 9.0 8.0 7.1 6.0 5.0 4.0 3.9 3.8.  Stop.
error: builder for '/nix/store/ygic0pprgx7rnqg1qs7zs3psm74h3jwq-crystal-1.3.2.drv' failed with exit code 2;
       last 10 log lines:
       > unpacking sources
       > unpacking source archive /nix/store/wm1djxwf48pnfjg5l6w94fk83skjfj3w-source
       > source root is source
       > patching sources
       > configuring
       > no configure script, doing nothing
       > building
       > build flags: -j8 -l8 SHELL=/nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash CRYSTAL_CONFIG_VERSION=1.3.2 all docs
       > /nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash: src/llvm/ext/find-llvm-config: /bin/sh: bad interpreter: No such file or directory
       > Makefile:196: *** "Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG. Compatible versions: 13.0 12.0 11.1 11.0 10.0 9.0 8.0 7.1 6.0 5.0 4.0 3.9 3.8.  Stop.
       For full logs, run 'nix log /nix/store/ygic0pprgx7rnqg1qs7zs3psm74h3jwq-crystal-1.3.2.drv'.

I don't see it when I do nix-build -A crystal_1_2 . I've added crystal_1_3 to all_packages ?

@fabianhjr
Copy link
Member

I've added crystal_1_3 to all_packages ?

I apologize, I opened the wrong checkout and thought it was missing but it was an error on my part.

@dinkopehar
Copy link
Author

I've added crystal_1_3 to all_packages ?

I apologize, I opened the wrong checkout and thought it was missing but it was an error on my part.

No hurry, just help when you can and take a look. It's nothing urgent, I just don't understand why the build fails for me. Maybe it has something to do with bash or some script inside Crystal source.

@fabianhjr
Copy link
Member

fabianhjr commented Jan 26, 2022

Could not locate compatible llvm-config

This seems like a missing extra dependency that wasn't needed on previous versions.

I was searching for that on nixpkgs and seems to require some env and llvm.dev:

rg llvm-config pkgs/development/ -C 2                                          Wed 26 Jan 2022 12:05:39 PM CST
pkgs/development/python-modules/llvmlite/default.nix
33-  '';
34-
35:  # Set directory containing llvm-config binary
36-  preConfigure = ''
37:    export LLVM_CONFIG=${llvm.dev}/bin/llvm-config
38-  '';
39-

pkgs/development/ocaml-modules/bap/curses_is_ncurses.patch
9-libcurses compatibility shim.
10-
11:Overall, we should get -l flags from llvm-config, not attempt to
12-shoehorn them in later, as this is fragile.
13----

pkgs/development/ocaml-modules/bap/default.nix
69-  '';
70-
71:  configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm.dev}/bin/llvm-config" ];
72-
73-  meta = with lib; {

@dinkopehar
Copy link
Author

crystal-lang/crystal#11519 It's related to this. I must understand first what happens to be able to build it.

@peterhoeg
Copy link
Member

There's a flake here with the latest crystal for inspiration: https://github.com/manveru/crystal-flake

@siraben
Copy link
Member

siraben commented Feb 6, 2022

Please resolve the merge conflict.

@dinkopehar
Copy link
Author

Closing this. I thought it would be a simple version bump, but due to my unfamiliarity with building Crystal from source, I didn't managed to build it. I'll try to contribute to some smaller packages at first in NixOS. My bad it took so long to respond 😞

@dinkopehar dinkopehar closed this Mar 5, 2022
@dinkopehar dinkopehar deleted the update-crystal branch March 24, 2022 17:40
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants