Melbourne MRI Build Flags May Cause Build Conflict on OS X #91

Closed
rue opened this Issue Nov 26, 2009 · 6 comments

Comments

Projects
None yet
2 participants
Member

rue commented Nov 26, 2009

It seems that building the Melbourne extension for MRI (as part of regular build) will use flags from the MRI installation, which can cause an issue if trying to build Rubinius on a different version of GCC. For example, a MRI built on GCC 4.0.1 may (will?) have -arch in its flagset, and this will cause an error on GCC 4.3+.

The workaround is to either use the same or non-conflicting GCC to build Rubinius (set $CC and $CXX), or then to first build Melbourne and then rbx:

$ CC=whatever rake extensions:melbourne_mri
$ rake build

Original:

GCC 4.0 (at least) works fine. Workaround is to set the compiler with CC and CXX.

Investigate whether it is really necessary to add the arch flag at all and either remove it or improve detection to only use it when appropriate.

Member

rue commented Nov 28, 2009

Looks like the flag is being inserted in the Melbourne Makefile...trying to figure out where to disable feeding it.

Owner

evanphx commented Nov 29, 2009

Are you using a custom gcc build on mac? If so, thats probably the cause. Is this error occurring trying to compile melbourne for MRI? Seems like that might be the case. MRI inserts those arch flags when mkmf is used (because it pulls flags from how it was itself compiled).

Member

rue commented Nov 30, 2009

This seems to be it, yes...revised title to reflect issue (while reflecting on how/if to fix it.)

Owner

evanphx commented Nov 30, 2009

I believe you've got this confused slightly. Melbourne is built twice, once for MRI, and once for Rubinius. When it's built for MRI, it automatically picks up whatever flags MRI was built with (the arch flags). When it is built for Rubinius, it does not use the MRI flags, since they make no sense in that context.

I think you're issue is compiling melbourne for MRI, really unrelated to Rubinius.

Member

rue commented Nov 30, 2009

Updated for clarity.

Owner

evanphx commented Mar 26, 2010

Stale, closing.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment