views:

12

answers:

1

I'm setting up a continuous integration server for an application that uses cucumber. I'm trying to install cucumber gem on ubuntu linux 10.04 but it doesn't work on ruby 1.8.6. It works on ruby 1.8.7 but it doesn't solve my problem because cruisecontrolrb demands 1.8.6. I have found this link http://www.ruby-forum.com/topic/198581, and I have installed the gcc 4.3 and exported the CC environment variable but I got the same problem.

$ gem install cucumber
ERROR:  While executing gem ... (ArgumentError)
    invalid date

How can I install cucumber?

A: 

I found the solution in this "comment":

As far as I checked, ruby_strtod() in util.c is broken by gcc 4.4's optimization.

  1. disable optimization.

    ./configure
    make
    vi Makefile # replace -O2 to -O0.
    touch util.c # update the timestamp to recompile util.c.
    make
    sudo make install

  2. use gcc-4.3.

    sudo apt-get install gcc-4.3
    ./configure CC=gcc-4.3
    make
    sudo make install

  3. configure with -fno-strict-aliasing and --enable-pthread. (I don't know why it dismisses the problem...)

    ./configure CFLAGS='-g -O2 -fno-strict-aliasing' --enable-pthread
    make
    sudo make install

Source: http://www.ruby-forum.com/topic/210647#915611

Bruno