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

Build failure: rubyPackages.prism #369508

Closed
GaetanLepage opened this issue Dec 30, 2024 · 2 comments
Closed

Build failure: rubyPackages.prism #369508

GaetanLepage opened this issue Dec 30, 2024 · 2 comments
Labels
0.kind: build failure A package fails to build

Comments

@GaetanLepage
Copy link
Contributor

Steps To Reproduce

Steps to reproduce the behavior:

  1. build rubyPackages.prism

Build log

Build Log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: installPhase
@nix { "action": "setPhase", "phase": "installPhase" }
buildFlags:
WARNING:  You build with buildroot.
  Build root: /
  Bin dir: /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/bin
  Gem home: /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0
  Plugins dir: /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/plugins
Building native extensions. This could take a while...
ERROR:  Error installing /nix/store/pdz3az8x133jr5dbjhpvb4666ap4j0m0-prism-0.24.0.gem:
        ERROR: Failed to build gem native extension.

    current directory: /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/gems/prism-0.24.0/ext/prism
/nix/store/68vbbsy3rdnz2yxaczl4rfj24v566z3v-ruby-3.3.6/bin/ruby extconf.rb
checking for prism.h in /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/gems/prism-0.24.0/include... yes
checking for prism/extension.h in /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/gems/prism-0.24.0/ext... yes
checking for whether -fvisibility=hidden is accepted as CFLAGS... yes
compiling build/static/pack.o
compiling build/static/diagnostic.o
src/diagnostic.c: In function 'pm_diagnostic_list_append':
src/diagnostic.c:328:69: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  328 |     pm_diagnostic_t *diagnostic = (pm_diagnostic_t *) calloc(sizeof(pm_diagnostic_t), 1);
      |                                                                     ^~~~~~~~~~~~~~~
src/diagnostic.c:328:69: note: earlier argument should specify number of elements, later size of each element
src/diagnostic.c: In function 'pm_diagnostic_list_append_format':
src/diagnostic.c:359:69: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
  359 |     pm_diagnostic_t *diagnostic = (pm_diagnostic_t *) calloc(sizeof(pm_diagnostic_t), 1);
      |                                                                     ^~~~~~~~~~~~~~~
src/diagnostic.c:359:69: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make: *** [Makefile:54: build/static/diagnostic.o] Error 1
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include=${opt-dir}/include
        --without-opt-include
        --with-opt-lib=${opt-dir}/lib
        --without-opt-lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/nix/store/68vbbsy3rdnz2yxaczl4rfj24v566z3v-ruby-3.3.6/bin/$(RUBY_BASE_NAME)
        --enable-debug-mode-build
        --disable-debug-mode-build
extconf.rb:41:in `system': Command failed with exit 2: make (RuntimeError)
        from extconf.rb:41:in `block in make'
        from extconf.rb:40:in `chdir'
        from extconf.rb:40:in `make'
        from extconf.rb:92:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/extensions/x86_64-linux/3.3.0/prism-0.24.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/gems/prism-0.24.0 for inspection.
Results logged to /nix/store/dd2ggl07f6pr41z6hsq4v02qa44252fs-ruby3.3-prism-0.24.0/lib/ruby/gems/3.3.0/extensions/x86_64-linux/3.3.0/prism-0.24.0/gem_make.out

Additional context

Metadata

Notify maintainers


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@GaetanLepage GaetanLepage added the 0.kind: build failure A package fails to build label Dec 30, 2024
@pcboy
Copy link
Contributor

pcboy commented Jan 2, 2025

It seems the latest version of prism is v1.3.0 on rubygems. And this one seems to compile fine.
Any reason why we are using 0.24.0 in ruby-packages.nix? 🤔

@GaetanLepage
Copy link
Contributor Author

Fixed by #370214

pull bot pushed a commit to geodic/nixpkgs that referenced this issue Jan 2, 2025
pull bot pushed a commit to geodic/nixpkgs that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

No branches or pull requests

2 participants