Having gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) on Fedora 12 box. Where I attempt to build rubinius 1.0-rc3, I got following compile error:
gcc -Ivm/external_libs/libtommath -Ivm/external_libs/libgdtoa -Ivm/external_libs/onig -Ivm/external_libs/libffi/include -Ivm/external_libs/libltdl -Ivm/external_libs/libev -Ivm/test/cxxtest -Ivm -I. -I/usr/local/include -Ivm/external_libs/udis86 -pipe -Wall -Wno-deprecated -DENABLE_LLVM -DHAS_EXECINFO -ggdb3 -O2 -Werror -DRBX_PROFILER -I/usr/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fomit-frame-pointer -c -o vm/thread_state.o vm/thread_state.cpp 2>&1
cc1plus: warnings being treated as errors
In file included from vm/gc/root.hpp:11,
vm/util/thread.hpp: In member function 'int thread::Thread::priority()':
vm/util/thread.hpp:155: error: unused variable '_policy'
Perhaps, for regular builds, we shouldn't use -Werror g++ option?
gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC)
Anyway, rubinius from git have a same problem, but in another file:
vm/objectmemory.cpp: In member function ‘void rubinius::ObjectMemory::validate_handles(rubinius::capi::Handles*)’:
vm/objectmemory.cpp:215: error: unused variable ‘ih’
Command failed with status (1): [gcc -Ivm/external_libs/libtommath -Ivm/ext...]
This is not a -Werror issue (we always use -Werror) but rather you're not using a prebuilt LLVM and it has injected -DNDEBUG into your cflags, thus causing all assert() calls to disappear. I've been going through and fixing all assert calls to not contain critical code, but it's clear I've missed some. I'll fix this shortly.
Fix bad asserts, add build:nodebug to use NDEBUG. Closed by c7d6e65.