Compilation issue dtoa.c - missing binary operator before token

Abierto
#569 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c, ruby
Área
build-system

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
C
Estrellas
152
Forks
99
Merge medio
6 h 44 min
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ruby/bigdecimal

Todos los issues de ruby/bigdecimal

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.