Bug #8588

bigdecimal 1.2.0 gem update fails on Cygwin

Added by Robert Klemme 10 months ago. Updated 10 months ago.

[ruby-core:55730]
Status:Closed
Priority:Normal
Assignee:Kenta Murata
Category:ext
Target version:-
ruby -v:ruby 1.9.3p392 (2013-02-22) [i386-cygwin] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

Compilation fails - I suspect a build configuration / Makefile issue. Here's the initial messages from gem_make.out:

/usr/bin/ruby.exe extconf.rb
checking for labs() in stdlib.h... yes
checking for llabs() in stdlib.h... yes
creating Makefile

make
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVELABS -DHAVELLABS -ggdb -O2 -pipe -fno-strict-aliasing -o bigdecimal.o -c bigdecimal.c
bigdecimal.c: In function ‘BigDecimalprec’:
bigdecimal.c:313:5: error: expected ‘)’ before ‘[’ token
bigdecimal.c:317:5: error: ‘vStack’ undeclared (first use in this function)
bigdecimal.c:317:5: note: each undeclared identifier is reported only once for each function it appears in
bigdecimal.c: In function ‘BigDecimal
hash’:
bigdecimal.c:334:5: error: expected ‘)’ before ‘[’ token
bigdecimal.c:338:5: error: ‘vStack’ undeclared (first use in this function)
...

I am suspecting there is something wrong with RBUNUSEDVAR() CPP macro - apparently it's not properly expanded.

In file bigdecimal.c.pre line 313 of bigdecimal.c is at line 4380.

All packages are most current. Here's gcc version if that matters:

$ gcc -v
Using built-in specs.
COLLECTGCC=gcc
COLLECT
LTOWRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.5.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /gnu/gcc/releases/respins/4.5.3-3/gcc4-4.5.3-3/src/gcc-4.5.3/configure --srcdir=/gnu/gcc/releases/respins/4.5.3-3/gcc4-4.5.3-3/src/gcc-4.5.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc4 -C --datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr --with-mpfr=/usr --enable-bootstrap --enable-version-specific-runtime-libs --libexecdir=/usr/lib --enable-static --enable-shared --enable-shared-libgcc --disable-
cxaatexit --with-gnu-ld --with-gnu-as --with-dwarf2 --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-lto --enable-java-awt=gtk --disable-symvers --enable-libjava --program-suffix=-4 --enable-libgomp --enable-libssp --enable-libada --enable-threads=posix --with-arch=i686 --with-tune=generic --enable-libgcj-sublibs CC=gcc-4 CXX=g++-4 CCFORTARGET=gcc-4 CXXFORTARGET=g++-4 GNATMAKEFORTARGET=gnatmake GNATBINDFORTARGET=gnatbind --with-ecj-jar=/usr/share/java/ecj.jar
Thread model: posix
gcc version 4.5.3 (GCC)

bigdecimal-1.2.0.tbz - Folder after attempt to build; includes output of gcc -E to see preprocessor output (75.6 KB) Robert Klemme, 07/01/2013 05:24 PM

Associated revisions

Revision 41725
Added by Kenta Murata 10 months ago

  • ext/bigdecimal/bigdecimal.h (RBUNUSEDVAR, UNREACHABLE):
    import macros from ruby.h for 1.9.3.
    [Bug #8588]

  • ext/bigdecimal/bigdecimal.gemspec: Bump version to 1.2.1.

History

#1 Updated by Kenta Murata 10 months ago

  • Category set to ext
  • Assignee set to Kenta Murata

#2 Updated by Kenta Murata 10 months ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r41725.
Robert, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/bigdecimal/bigdecimal.h (RBUNUSEDVAR, UNREACHABLE):
    import macros from ruby.h for 1.9.3.
    [Bug #8588]

  • ext/bigdecimal/bigdecimal.gemspec: Bump version to 1.2.1.

#3 Updated by Kenta Murata 10 months ago

I've released bigdecimal version 1.2.1.
Please use this new version.

#4 Updated by Robert Klemme 10 months ago

$ gem update
Updating installed gems
Updating bigdecimal
Fetching: bigdecimal-1.2.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed bigdecimal-1.2.1
Gems updated: bigdecimal
Installing ri documentation for bigdecimal-1.2.1...
Installing RDoc documentation for bigdecimal-1.2.1...

Works like a charm. Thank you for the quick fix!

Also available in: Atom PDF