oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.

Home Page:https://www.graalvm.org/ruby/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

truffleruby 23.1.1 fails to build/install rdiscount 2.2.7.2

dentarg opened this issue · comments

2.2.7.2 was recently released: https://rubygems.org/gems/rdiscount/versions

See log at https://github.com/sinatra/sinatra/actions/runs/7299356415/job/19892021042?pr=1968#step:4:212

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

current directory:
/home/runner/work/sinatra/sinatra/vendor/bundle/truffleruby/3.2.2.23.1.0/gems/rdiscount-2.2.7.2/ext
/home/runner/.rubies/truffleruby-23.1.1/bin/ruby extconf.rb
checking for random()... yes
checking for srandom()... yes
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... 8
checking size of unsigned int... 4
checking size of unsigned int... 4
checking size of unsigned short... 2
creating Makefile

current directory:
/home/runner/work/sinatra/sinatra/vendor/bundle/truffleruby/3.2.2.23.1.0/gems/rdiscount-2.2.7.2/ext
make DESTDIR\= sitearchdir\=./.gem.20231222-2828-2uifbb
sitelibdir\=./.gem.20231222-2828-2uifbb clean

current directory:
/home/runner/work/sinatra/sinatra/vendor/bundle/truffleruby/3.2.2.23.1.0/gems/rdiscount-2.2.7.2/ext
make DESTDIR\= sitearchdir\=./.gem.20231222-2828-2uifbb
sitelibdir\=./.gem.20231222-2828-2uifbb
compiling Csio.c
compiling amalloc.c
amalloc.c:40:14: warning: using the result of an assignment as a condition
without parentheses [-Wparentheses]
    if ( ret = calloc(count + sizeof(struct alist) + sizeof(int), size) ) {
         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
amalloc.c:40:14: note: place parentheses around the assignment to silence this
warning
    if ( ret = calloc(count + sizeof(struct alist) + sizeof(int), size) ) {
             ^
         (                                                             )
amalloc.c:40:14: note: use '==' to turn this assignment into an equality
comparison
    if ( ret = calloc(count + sizeof(struct alist) + sizeof(int), size) ) {
             ^
gethopt(ctx, opts, nropts)
^
gethopt.c:79:18: warning: implicit truncation from 'int' to a one-bit wide
bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
            ctx->optend = 1;
                        ^ ~
gethopt.c:87:18: warning: implicit truncation from 'int' to a one-bit wide
bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
            ctx->optend = 1;
                        ^ ~
8 warnings and 1 error generated.
make: *** [Makefile:566: gethopt.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/home/runner/work/sinatra/sinatra/vendor/bundle/truffleruby/3.2.2.23.1.0/gems/rdiscount-2.2.7.2
for inspection.
Results logged to
/home/runner/work/sinatra/sinatra/vendor/bundle/truffleruby/3.2.2.23.1.0/extensions/x86_64-linux/3.2.2.23.1.0/rdiscount-2.2.7.2/gem_make.out

/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:119:in
`run'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:51:in
`block in make'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:43:in
`each'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:43:in
`make'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/ext_conf_builder.rb:41:in
`build'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:187:in
`build_extension'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:221:in
`block in build_extensions'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:[218](https://github.com/sinatra/sinatra/actions/runs/7299356415/job/19892021042?pr=1968#step:4:224):in
`each'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/ext/builder.rb:218:in
`build_extensions'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/rubygems/installer.rb:844:in
`build_extensions'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/rubygems_gem_installer.rb:28:in
`install'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/source/rubygems.rb:200:in
`install'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/installer/gem_installer.rb:54:in
`install'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/installer/parallel_installer.rb:156:in
`do_install'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/installer/parallel_installer.rb:147:in
`block in worker_pool'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/worker.rb:62:in
`apply_func'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/worker.rb:57:in `block
in process_queue'
  <internal:core> core/kernel.rb:414:in `loop'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/worker.rb:54:in
`process_queue'
/home/runner/.rubies/truffleruby-23.1.1/lib/mri/bundler/worker.rb:90:in `block
(2 levels) in create_threads'

An error occurred while installing rdiscount (2.2.7.2), and Bundler cannot
continue.

There was no problem with rdiscount 2.2.7.1 (https://github.com/sinatra/sinatra/actions/runs/7157298277/job/19487985868#step:4:97)

Looks like you have been battling this in the past 😄 https://github.com/oracle/truffleruby/issues?q=is%3Aissue+rdiscount+is%3Aclosed

The exact error message:

gethopt.c:48:13: error: parameter 'val' was not declared, defaults to 'int'; ISO
C99 and later do not support implicit int [-Wimplicit-int]
hopterr(ctx,val)
            ^