Compilation issue dtoa.c - missing binary operator before token

Aperta
#569 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, ruby
Ambito
build-system

Direzione di ricerca

Start by reproducing the failure with the Docker command in the issue, then inspect the preprocessor condition around line 214 of missing/dtoa.c, included from missing.c. Check how the condition behaves with the reported compiler and Ruby 3.0.6. Done means the gem builds and loads successfully in that environment.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi there; We're just trying to compile the latest release of this gem and hitting an issue:

missing/dtoa.c:214:20: error: missing binary operator before token "("

Replication command:

docker run --rm --user jenkins --env HOME=/home/jenkins rapid7/msf-ubuntu1204-x86-omnibus:2024_04 linux32 bash -lc 'mkdir -p "$HOME/.local/share/gem/ruby/3.0.0/cache" && source /home/jenkins/.rvm/scripts/rvm && rvm use 3.0.6 && gem install bigdecimal -v 4.1.3 --platform ruby --no-document && ruby -rbigdecimal -e '\''abort unless BigDecimal::VERSION == %q(4.1.3) && BigDecimal(%q(1.25)) + BigDecimal(%q(2.75)) == 4; puts %Q(bigdecimal #{BigDecimal::VERSION}: compiled and loaded)'\'''

Error:

Using /home/jenkins/.rvm/gems/ruby-3.0.6
Building native extensions. This could take a while...
ERROR:  Error installing bigdecimal:
	ERROR: Failed to build gem native extension.

    current directory: /home/jenkins/.rvm/gems/ruby-3.0.6/gems/bigdecimal-4.1.3/ext/bigdecimal
/home/jenkins/.rvm/rubies/ruby-3.0.6/bin/ruby -I /home/jenkins/.rvm/rubies/ruby-3.0.6/lib/ruby/3.0.0 -r ./siteconf20261103-186-cilydo.rb extconf.rb
checking for __builtin_clz()... yes
checking for __builtin_clzl()... yes
checking for __builtin_clzll()... yes
checking for float.h... yes
checking for math.h... yes
checking for stdbool.h... yes
checking for stdlib.h... yes
checking for x86intrin.h... yes
checking for _lzcnt_u32() in x86intrin.h... no
checking for _lzcnt_u64() in x86intrin.h... no
checking for intrin.h... no
checking for ruby/atomic.h... yes
checking for ruby/internal/has/builtin.h... yes
checking for ruby/internal/static_assert.h... yes
checking for rb_complex_real() in ruby.h... yes
checking for rb_complex_imag() in ruby.h... yes
checking for rb_opts_exception_p() in ruby.h... yes
checking for rb_category_warn() in ruby.h... yes
checking for RB_WARN_CATEGORY_DEPRECATED in ruby.h... yes
checking for RUBY_TYPED_EMBEDDABLE in ruby.h... no
creating Makefile

current directory: /home/jenkins/.rvm/gems/ruby-3.0.6/gems/bigdecimal-4.1.3/ext/bigdecimal
make DESTDIR\= clean

current directory: /home/jenkins/.rvm/gems/ruby-3.0.6/gems/bigdecimal-4.1.3/ext/bigdecimal
make DESTDIR\=
compiling bigdecimal.c
compiling missing.c
In file included from missing.c:28:0:
missing/dtoa.c:214:20: error: missing binary operator before token "("
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-cast-function-type" [enabled by default]
make: *** [missing.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/jenkins/.rvm/gems/ruby-3.0.6/gems/bigdecimal-4.1.3 for inspection.
Results logged to /home/jenkins/.rvm/gems/ruby-3.0.6/extensions/x86-linux/3.0.0/bigdecimal-4.1.3/gem_make.out
Lingua principale
C
Stelle
152
Fork
99
Merge medio
6h 44m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ruby/bigdecimal

Tutte le issue di ruby/bigdecimal

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.