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

Bump prism/rbi dev dependency #1403

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Conversation

Earlopain
Copy link
Contributor

I get compilation errors on arch for this version of prism:

Compile Error

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/ext/prism
/home/user/.rbenv/versions/3.3.3/bin/ruby extconf.rb
checking for prism.h in /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/include... yes
checking for prism/extension.h in /home/user/.rbenv/versions/3.3.3/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/prism.o
src/prism.c: In function ‘parser_lex_magic_comment’:
src/prism.c:6776:67: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 6776 |         if ((magic_comment = (pm_magic_comment_t *) calloc(sizeof(pm_magic_comment_t), 1)) != NULL) {
      |                                                                   ^~~~~~~~~~~~~~~~~~
src/prism.c:6776:67: note: earlier argument should specify number of elements, later size of each element
src/prism.c: In function ‘parser_comment’:
src/prism.c:8208:60: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 8208 |     pm_comment_t *comment = (pm_comment_t *) calloc(sizeof(pm_comment_t), 1);
      |                                                            ^~~~~~~~~~~~
src/prism.c:8208:60: 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/prism.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=/home/user/.rbenv/versions/3.3.3/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>

I get compilation errors on arch for this version of prism:

```
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/ext/prism
/home/user/.rbenv/versions/3.3.3/bin/ruby extconf.rb
checking for prism.h in /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/include... yes
checking for prism/extension.h in /home/user/.rbenv/versions/3.3.3/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/prism.o
src/prism.c: In function ‘parser_lex_magic_comment’:
src/prism.c:6776:67: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 6776 |         if ((magic_comment = (pm_magic_comment_t *) calloc(sizeof(pm_magic_comment_t), 1)) != NULL) {
      |                                                                   ^~~~~~~~~~~~~~~~~~
src/prism.c:6776:67: note: earlier argument should specify number of elements, later size of each element
src/prism.c: In function ‘parser_comment’:
src/prism.c:8208:60: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 8208 |     pm_comment_t *comment = (pm_comment_t *) calloc(sizeof(pm_comment_t), 1);
      |                                                            ^~~~~~~~~~~~
src/prism.c:8208:60: 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/prism.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=/home/user/.rbenv/versions/3.3.3/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>
```
@bensheldon bensheldon added the dependencies Pull requests that update a dependency file label Jul 8, 2024
@bensheldon bensheldon merged commit d6cf3de into bensheldon:main Jul 8, 2024
14 checks passed
@Earlopain Earlopain deleted the bump-prism branch July 8, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants