From: Jarmo Pertman Date: 2010-05-30T22:11:54+09:00 Subject: Re: Date.today problem on linux with Ruby 1.8.6 Thank you for this (insight|help)ful reply! I tried your first suggestion which worked as you said! Then i decided to downgrade gcc completely and tried your second suggestion which also worked! Also make test succeeded (although i tried with latest patchlevel, so i'm not sure if it was even related with my problem). But why does 1.8.7 work with gcc 4.4? Is util.c there somehow changed? So in the end it is a incompatibility problem with Ruby 1.8.6 and gcc 4.4 (which comes by default with latest Ubuntu)? Anyway, thank You again! Jarmo Takehiro Kubo wrote: > 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 -- Posted via http://www.ruby-forum.com/.