[MacRuby-devel] [MacRuby] #599: improve reliability of LLVM build instructions

MacRuby ruby-noreply at macosforge.org
Wed Feb 3 08:08:26 PST 2010


#599: improve reliability of LLVM build instructions
-------------------------------------+--------------------------------------
 Reporter:  jordan.breeding@…        |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  blocker                  |   Milestone:                       
Component:  MacRuby                  |    Keywords:                       
-------------------------------------+--------------------------------------
 Since MacRuby currently depends on specific LLVM revisions it is a good
 idea to make sure the build instructions work in as many conditions as
 possible.

 Prior to Jan 27th when Xcode 3.2.2 got put into beta this was fairly easy.
 You could just trim things like /usr/local and /Developer/usr/bin from
 your path long enough to build LLVM with these instructions:

 {{{
 ./configure --enable-bindings=none
 UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make
 sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make
 install
 }}}

 As of Xcode 3.2.2 it looks like the Xcode team is fixing up some things,
 rather than some compilers only being in /Developer (or /Developer-BETA,
 etc.) and gcc being in /usr/bin, all of them are put into /usr/bin.

 {{{
 -rwxrwxr-x  1 root  admin   819K Jan  9 23:04 /usr/bin/clang*
 lrwxr-xr-x  1 root  wheel     7B Jan 27 19:46 /usr/bin/g++@ -> g++-4.2
 -rwxr-xr-x  1 root  wheel    95K Nov 25 06:47 /usr/bin/g++-4.0*
 -rwxr-xr-x  1 root  wheel   162K Dec 22 22:12 /usr/bin/g++-4.2*
 lrwxr-xr-x  1 root  wheel     7B Jan 27 19:46 /usr/bin/gcc@ -> gcc-4.2
 -rwxr-xr-x  1 root  wheel    95K Nov 25 06:47 /usr/bin/gcc-4.0*
 -rwxr-xr-x  1 root  wheel   162K Dec 22 22:12 /usr/bin/gcc-4.2*
 lrwxr-xr-x  1 root  admin    32B Jan 27 19:46 /usr/bin/llvm-g++@ ->
 ../llvm-gcc-4.2/bin/llvm-g++-4.2
 lrwxr-xr-x  1 root  admin    32B Jan 27 19:46 /usr/bin/llvm-g++-4.2@ ->
 ../llvm-gcc-4.2/bin/llvm-g++-4.2
 lrwxr-xr-x  1 root  admin    32B Jan 27 19:46 /usr/bin/llvm-gcc@ ->
 ../llvm-gcc-4.2/bin/llvm-gcc-4.2
 lrwxr-xr-x  1 root  admin    32B Jan 27 19:46 /usr/bin/llvm-gcc-4.2@ ->
 ../llvm-gcc-4.2/bin/llvm-gcc-4.2
 }}}

 So, LLVM is now much more likely to fail to build with UNIVERSAL enabled
 because it is almost guaranteed to find llvm-gcc and llvm-g++ since it
 finds them by search PATH, and /usr/bin needs to be in PATH.

 This does work though (setting the compiler specifically as well as
 telling it to look in a place where llvm-gcc and llvm-g++ are unlikely to
 exist):

 {{{
 env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc
 CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimzed
 --with-llvmgccdir=/tmp
 env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc
 CXX=/usr/bin/g++ make -j2
 sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc
 CXX=/usr/bin/g++ make install
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/599>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list