From: "Міхаіл Т." Date: 2009-10-22T00:31:23+09:00 Subject: gcc-4.4.x -O2 miscompiles Ruby (was: `make check' hangs) Міхаіл Т. wrote: > The C-compiler (gcc44) is gcc version 4.4.0 20090514 (Red Hat 4.4.0-6) > (GCC). Simply recompiling from scratch using gcc-4.1.2 solved the hanging problem for me. The check is now running (outputting a dot as progress-report). Alternatively, using gcc-4.4.0, but with less aggressive optimization (-O1 instead of -O2) avoids the problem as well. Increasing the compiler warnings level (-Wall), one can see a lot of negative comments, including a bunch of strict-aliasing violations... Indeed, this was is already discussed in: https://bugzilla.redhat.com/show_bug.cgi?id=489990 The bug is in Ruby... The work-around is to disable strict-aliasing, when compiling. For gcc users, this is done with -fno-strict-aliasing after the -O2 optimization flag (see attached patch). After rebuilding this way, I can get `make check' to start and proceed (the errors it reports now are the same as with other compilers and platforms). Other (non-gcc) compilers are on their own... -mi Attachments: http://www.ruby-forum.com/attachment/4167/patch-Makefile.in -- Posted via http://www.ruby-forum.com/.