Update on "undefined method for Fixnum"

Eric Hodel | Thu, 20 Apr 2006 18:37:44 GMT

Posted in

A week or so ago I managed to chase down the “undefined method for Fixnum” bug to the compiler flags -g -O1 -pipe -fno-common -DRUBY_EXPORT -fschedule-insns2. For now you can get rid of the bug by compiling -O1 instead of switching to gcc3. I haven’t had time to track it down further, mostly because I ran out of time and the man page doesn’t specify what -O1 really contains.

Hopefully some smarter eyeballs than mine can jump on this and figure out if GCC is wrong or if Ruby is missing a volatile somewhere.

5 comments

Comments RSS FEED

According to my (slightly outdated) GCC book, -O1 means it compiles with the following flags:
-fno_optimize_size
-fdefer_pop
-fthread_jumps
-jguess_branch_prob
-cprop-registers
-fdelayed_branch
-fomit_frame_pointer
The -fomit_frame_pointer flag is set only if the debugger is able to work without it on the current platform.

Hope that helps,

Dan

Daniel Berger said about 1 hour later

way over my head.

but thanks!

Caleb said about 2 hours later

From what I can gather from Google, this appears to be a bug in gcc 4.x on OS X. What version are you using? And what architecture is your machine?

Daniel Berger said about 2 hours later

Dan, yes to both gcc and architecture. We’ve been chasing this for a while now.

zenspider said about 13 hours later

zenspider, sorry, I meant the problem with -fschedule-insns2 in particular. I could have sworn this error has cropped up on other platforms in the past. Maybe those were compiler bugs as well. :/

Daniel Berger said about 19 hours later

Comments are disabled