NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.46k stars 13.65k forks source link

Build failure: rubyfmt #320722

Closed GaetanLepage closed 2 months ago

GaetanLepage commented 3 months ago

Steps To Reproduce

Happens on all platforms.

Steps to reproduce the behavior:

  1. build rubyfmt

Build log

...
  linking ruby
  make[2]: Leaving directory '/private/tmp/nix-build-rubyfmt-0.10.0.drv-0/source/librubyfmt/ruby_checkout'
  make[1]: Leaving directory '/private/tmp/nix-build-rubyfmt-0.10.0.drv-0/source/librubyfmt/ruby_checkout'
  make[1]: Entering directory '/private/tmp/nix-build-rubyfmt-0.10.0.drv-0/source/librubyfmt/ruby_checkout'
  *** Following extensions are not compiled:
  fiddle:
        Could not be configured. It will not be installed.
        /private/tmp/nix-build-rubyfmt-0.10.0.drv-0/source/librubyfmt/ruby_checkout/ext/fiddle/extconf.rb:73: missing libffi. Please install libffi or use --with-libffi-source-dir w>
        Check ext/fiddle/mkmf.log for more details.
  openssl:
        Could not be configured. It will not be installed.
        /private/tmp/nix-build-rubyfmt-0.10.0.drv-0/source/librubyfmt/ruby_checkout/ext/openssl/extconf.rb:101: OpenSSL library could not be found. You might want to use --with-open>
        Check ext/openssl/mkmf.log for more details.
  *** Fix the problems, then remove these directories and try again if you want.
  make[1]: Leaving directory '/private/tmp/nix-build-rubyfmt-0.10.0.drv-0/source/librubyfmt/ruby_checkout'

  --- stderr
  + cp enc/jis/props.h.blt enc/jis/props.h
  parse.c:9130:9: warning: variable 'yynerrs' set but not used [-Wunused-but-set-variable]
      int yynerrs = 0;
          ^
  1 warning generated.
  bigdecimal.c:7161:18: warning: variable 'prec' set but not used [-Wunused-but-set-variable]
      SIGNED_VALUE prec;
                   ^
  ripper.c:10310:9: warning: variable 'yynerrs' set but not used [-Wunused-but-set-variable]
      int yynerrs = 0;
          ^
  1 warning generated.
  1 warning generated.
  thread 'main' panicked at librubyfmt/build.rs:90:5:
  could not extract arch from rbconfig.rb
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional context

Add any other context about the problem here.

Notify maintainers

cc @bobvanderlinden

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.31, NixOS, 24.11 (Vicuña), 24.11.20240612.57d6973`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source`

Add a :+1: reaction to issues you find important.

bobvanderlinden commented 2 months ago

Hi @GaetanLepage, could you give https://github.com/NixOS/nixpkgs/pull/322233 a try? I've made the package work for me by allowing build warnings (unused variable was what was causing errors).