[MacRuby-devel] MacRuby build issues with LLVM

Scott Guelich scottg at eluddite.org
Wed Mar 9 10:34:31 PST 2011


Nick and group,

I'm seeing similar errors with the newest MacBook Pro -- after simply downloading the 1.9 binary and running macgem, macirb, or macrake. In other words, I'm not compiling from source, just trying to use the latest binary distribution on a core i7 laptop.

$ sudo macgem install rack
LLVM ERROR: Cannot yet select: 0x10509ba10: f64 = bit_convert 0x10508ef10 [ORD=2615] [ID=7]
0x10508ef10: i64 = and 0x105062a10, 0x10509b010 [ORD=2614] [ID=6]
0x105062a10: i64,ch = CopyFromReg 0x1039108a8, 0x105099510 [ORD=2614] [ID=5]
0x1039108a8: ch = EntryToken [ORD=2614] [ID=0]
0x105099510: i64 = Register %reg16384 [ORD=2614] [ID=1]
0x10509b010: i64 = Constant<-4> [ORD=2614] [ID=2]


$ macirb
LLVM ERROR: Cannot yet select: 0x104852410: f64 = bit_convert 0x104858c10 [ORD=186] [ID=7]
0x104858c10: i64 = and 0x104853c10, 0x104851910 [ORD=185] [ID=6]
0x104853c10: i64,ch = CopyFromReg 0x103b0d028, 0x104856010 [ORD=185] [ID=5]
0x103b0d028: ch = EntryToken [ORD=185] [ID=0]
0x104856010: i64 = Register %reg16384 [ORD=185] [ID=1]
0x104851910: i64 = Constant<-4> [ORD=185] [ID=2]


$ macrake
LLVM ERROR: Cannot yet select: 0x10506d810: f64 = bit_convert 0x105047310 [ORD=800] [ID=7]
0x105047310: i64 = and 0x105067d10, 0x105063010 [ORD=799] [ID=6]
0x105067d10: i64,ch = CopyFromReg 0x103b0cf68, 0x105043110 [ORD=799] [ID=5]
0x103b0cf68: ch = EntryToken [ORD=799] [ID=0]
0x105043110: i64 = Register %reg16384 [ORD=799] [ID=1]
0x105063010: i64 = Constant<-4> [ORD=799] [ID=2]



Interestingly, the macruby interpreter runs without error. "macgem --help" and "macgem --version" also run fine (but these options produce errors with macirb or macrake).

FWIW, I only have Xcode 4 DP2 installed on this machine... although I assume the MacRuby framework doesn't have any runtime dev tool dependencies? (My understanding was it could be bundled with apps and distributed to end users who don't have dev tools installed.)

Scott

On Wednesday, March 9, 2011 at 10:40 AM, Joshua Ballanco wrote: 
> Nick,
> 
> I'm currently using Homebrew's llvm with MacRuby. Try passing the "--universal" switch when you install llvm (i.e. "brew install llvm --universal"). You also might try building and installing clang at the same time (i.e. "brew install llvm --universal --clang") and see if clang can compile a simple C hello world to rule out llvm bugs. 
> 
> Cheers,
> 
> Josh
> 
> On Wed, Mar 9, 2011 at 5:41 AM, Nick Ludlam <nick at recoil.org> wrote:
> > Yes, I've double checked that I'm running 2.8 RELEASE, and it's still bailing out with that cryptic message. The only other thing I can think of is to remove XCode 4 and reinstall the current XCode3 release.
> > 
> >  On 9 Mar 2011, at 03:37, Matt Aimonetti wrote:
> > 
> > > I didn't read your email in details sorry, but did you follow the README instructions with the specific LLVM revision etc..
> > >
> > > - Matt
> > >
> > > Sent from my iPhone
> > >
> > > On Mar 8, 2011, at 16:05, Nick Ludlam <nick at recoil.org> wrote:
> > >
> > >> Just following up on my own issue, would an install of XCode 4 along side my existing XCode 3 cause this sort of problem? I've got XCode 4 in a separate directory, but I don't know how much cross linking into common paths there is.
> > >>
> > >> On 6 Mar 2011, at 12:12, Nick Ludlam wrote:
> > >>
> > >>> Hi all,
> > >>> I've just got myself set up on one of the Sandy Bridge laptops, and I've broken my compile environment for MacRuby, and cannot seem to get it back.
> > >>>
> > >>> I've done the following to get llvm-2.8:
> > >>>
> > >>> $ svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28 llvm-2.8
> > >>> $ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimized --with-llvmgccdir=/tmp --prefix=/opt/llvm-macruby
> > >>> $ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make -j4
> > >>> $ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make install
> > >>>
> > >>> This has given me a complete but separate llvm tree in /opt/llvm-macruby/. Within the MacRuby git clone (HEAD), I'm doing:
> > >>>
> > >>> rake llvm_path=/opt/llvm-macruby/
> > >>>
> > >>> to allow it to see the llvm install. I've also added /opt/llvm-macruby/bin to my shell path. But the build fails with a deep llvm voodoo issue that I'm not even sure how to start addressing. It's in the part of the build where miniruby is used to compile rbconfig.rb, and I've separated the output here:
> > >>>
> > >>> $ ./miniruby -I. -I./lib bin/rubyc --internal --arch x86_64 -C "rbconfig.rb" -o "./rbconfig.rbo"
> > >>> LLVM ERROR: Cannot yet select: 0x103097410: f64 = bit_convert 0x1030b6c10 [ORD=391] [ID=7]
> > >>> 0x1030b6c10: i64 = and 0x1030b6f10, 0x103087e10 [ORD=390] [ID=6]
> > >>> 0x1030b6f10: i64,ch = CopyFromReg 0x1039104a8, 0x1030b9010 [ORD=390] [ID=5]
> > >>> 0x1039104a8: ch = EntryToken [ORD=390] [ID=0]
> > >>> 0x1030b9010: i64 = Register %reg16384 [ORD=390] [ID=1]
> > >>> 0x103087e10: i64 = Constant<-4> [ORD=390] [ID=2]
> > >>>
> > >>> I get exactly the same issue when I was trying to use the llvm from the Homebrew port system, and also when I install llvm into /usr/local (which I'd like to avoid, as I'm trying to use Homebrew for anything in that path).
> > >>>
> > >>> Anybody got a suggestion as to what I can try next?
> > >>>
> > >>> Thanks,
> > >>> Nick
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>> MacRuby-devel mailing list
> > >>> MacRuby-devel at lists.macosforge.org
> > >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> > >>
> > >> _______________________________________________
> > >> MacRuby-devel mailing list
> > >> MacRuby-devel at lists.macosforge.org
> > >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> > > _______________________________________________
> > > MacRuby-devel mailing list
> > > MacRuby-devel at lists.macosforge.org
> > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> > 
> >  _______________________________________________
> >  MacRuby-devel mailing list
> > MacRuby-devel at lists.macosforge.org
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> > 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110309/733be176/attachment-0001.html>


More information about the MacRuby-devel mailing list