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

truffleruby 23.1.1 fails to build/install rdiscount 2.2.7.2 #3362

Closed
dentarg opened this issue Dec 22, 2023 · 3 comments
Closed

truffleruby 23.1.1 fails to build/install rdiscount 2.2.7.2 #3362

dentarg opened this issue Dec 22, 2023 · 3 comments
Labels
third-party-issue An issue which should be fixed upstream

Comments

@dentarg
Copy link

dentarg commented Dec 22, 2023

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

dentarg added a commit to dentarg/sinatra that referenced this issue Dec 22, 2023
dentarg added a commit to sinatra/sinatra that referenced this issue Dec 22, 2023
@andrykonchin
Copy link
Member

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)
            ^

@andrykonchin
Copy link
Member

Looks like the regression was caused by the last import of Discount

davidfstr/rdiscount@07c05a6#diff-b4293f1097aee68e63a2b07bd9bb87e8aa7a71817de07ff1b935ee5c72b450aa

@eregon
Copy link
Member

eregon commented Jan 3, 2024

Fixed upstream: davidfstr/rdiscount#159

@eregon eregon closed this as completed Jan 3, 2024
@eregon eregon added the third-party-issue An issue which should be fixed upstream label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
third-party-issue An issue which should be fixed upstream
Projects
None yet
Development

No branches or pull requests

3 participants