I'm running into the same error. Correct me if I'm wrong. To build llvm, you'd need llvm-gcc front-end. You're saying we'd need llvm in order to build llvm-gcc. So how should we kick start the process? Thanks. Duncan Sands wrote:> > Hi Eliseu, > >> 2. I've unpacked llvm-gcc-4.2-2.6.source.tar.gz under the llvm-gcc >> directory. I've also created two subdirectories >> called "install" and "obj" under the same llvm-gcc. >> >> 3. Then I did the following, based on README.LLVM : >> >> %setenv LLVMOBJDIR /home/eliseuf/llvm/llvm-gcc/obj > > first you need to build llvm itself. LLVMOBJDIR points to where you > built llvm, not where you are planning to build llvm-gcc. > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- View this message in context: http://old.nabble.com/Help-with-building-LLVM-2.6-GCC-tp27928136p28107498.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
You don't need llvm-gcc to build llvm. See release notes. Garrison On Apr 1, 2010, at 7:45, naohk wrote:> > I'm running into the same error. > > Correct me if I'm wrong. To build llvm, you'd need llvm-gcc front-end. > You're saying we'd need llvm in order to build llvm-gcc. > > So how should we kick start the process? > > Thanks. > > > Duncan Sands wrote: >> >> Hi Eliseu, >> >>> 2. I've unpacked llvm-gcc-4.2-2.6.source.tar.gz under the llvm-gcc >>> directory. I've also created two subdirectories >>> called "install" and "obj" under the same llvm-gcc. >>> >>> 3. Then I did the following, based on README.LLVM : >>> >>> %setenv LLVMOBJDIR /home/eliseuf/llvm/llvm-gcc/obj >> >> first you need to build llvm itself. LLVMOBJDIR points to where you >> built llvm, not where you are planning to build llvm-gcc. >> >> Ciao, >> >> Duncan. >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> > > -- > View this message in context: http://old.nabble.com/Help-with-building-LLVM-2.6-GCC-tp27928136p28107498.html > Sent from the LLVM - Dev mailing list archive at Nabble.com. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Apr 1, 2010, at 4:45 AM, naohk wrote:> Correct me if I'm wrong. To build llvm, you'd need llvm-gcc front-end.The Getting Started Guide is a bit misleading on this point because the "Install the llvm-gcc-4.2 front end" step comes before the "Build the LLVM Suite" step, implying that LLVM GCC is a dependency, but it's not. FWIW, here's how I build LLVM: - mkdir llvm - cd llvm - Unpack LLVM source (or checkout via Subversion) to "llvm-src" - cd llvm-src - ./configure --prefix=$PWD/../install --disable-optimized for debug builds; --enable-optimized for release builds - make - make install This works for me on OS X 10.5 and Ubuntu 9.10. I've never been able to get the binary distribution of LLVM GCC to work on OS X -- I always get "dyld: Library not loaded: /opt/local/lib/ libiconv.2.dylib" -- so I've gotten in the habit of building LLVM GCC from source (on Linux too). These are the steps that work for me every time: - mkdir llvm-gcc - cd llvm-gcc - Unpack LLVM GCC source (or checkout via Subversion) to "llvm-gcc-src" - mkdir obj - mkdir install - cd obj - export TRIPLE=i686-apple-darwin9 (Use i386-pc-linux-gnu for Linux) - export BUILDOPTIONS=LLVM_VERSION_INFO=2.7 (Replace "2.7" with the current version number) - export TARGETOPTIONS='--with-arch=nocona --with-tune=generic' - ../llvm-gcc-src/configure --prefix=$PWD/../install --program-prefix=llvm- --build=$TRIPLE --host=$TRIPLE --target=$TRIPLE --enable-llvm=(full path of the LLVM source directory) --enable-languages=c,c++ $TARGETOPTIONS (If you built a Debug instead of a Release of LLVM, add --enable-checking.) (On OS X, add "--with-gxx-include-dir=/usr/include/c++/4.0.0") - make $BUILDOPTIONS - make install - If on OS X: ln -sf /usr/lib/libstdc++.6.dylib `pwd`/../install/lib ln -sf /usr/lib/libstdc++.6.dylib `pwd`/../install/lib/libstdc+ +.dylib This works for me on OS X 10.5 and Ubuntu 9.10, although I had to install some dependencies on Ubuntu (bison, flex). Trevor
Sweet peas. I followed Trevor instruction and successfully built llvm. I left out --prefix=$PWD/../install option when configure; hence, /usr/local is now polluted with llvm goodness :) I kept getting error when building llvm-gcc, because I specify the wrong path to --enable-llvm option, which should be --enable-llvm=(full path of the LLVM source/object directory) I should have read FAQ more carefully! Thanks Trevor. naohk. Trevor Harmon-3 wrote:> > On Apr 1, 2010, at 4:45 AM, naohk wrote: > >> Correct me if I'm wrong. To build llvm, you'd need llvm-gcc front-end. > > The Getting Started Guide is a bit misleading on this point because > the "Install the llvm-gcc-4.2 front end" step comes before the "Build > the LLVM Suite" step, implying that LLVM GCC is a dependency, but it's > not. > > FWIW, here's how I build LLVM: > > - mkdir llvm > - cd llvm > - Unpack LLVM source (or checkout via Subversion) to "llvm-src" > - cd llvm-src > - ./configure --prefix=$PWD/../install > --disable-optimized for debug builds; --enable-optimized for > release builds > - make > - make install > > This works for me on OS X 10.5 and Ubuntu 9.10. > > I've never been able to get the binary distribution of LLVM GCC to > work on OS X -- I always get "dyld: Library not loaded: /opt/local/lib/ > libiconv.2.dylib" -- so I've gotten in the habit of building LLVM GCC > from source (on Linux too). These are the steps that work for me every > time: > > - mkdir llvm-gcc > - cd llvm-gcc > - Unpack LLVM GCC source (or checkout via Subversion) to "llvm-gcc-src" > - mkdir obj > - mkdir install > - cd obj > - export TRIPLE=i686-apple-darwin9 > (Use i386-pc-linux-gnu for Linux) > - export BUILDOPTIONS=LLVM_VERSION_INFO=2.7 > (Replace "2.7" with the current version number) > - export TARGETOPTIONS='--with-arch=nocona --with-tune=generic' > - ../llvm-gcc-src/configure --prefix=$PWD/../install > --program-prefix=llvm- --build=$TRIPLE --host=$TRIPLE > --target=$TRIPLE > --enable-llvm=(full path of the LLVM source directory) > --enable-languages=c,c++ $TARGETOPTIONS > (If you built a Debug instead of a Release of LLVM, add > --enable-checking.) > (On OS X, add "--with-gxx-include-dir=/usr/include/c++/4.0.0") > - make $BUILDOPTIONS > - make install > - If on OS X: > ln -sf /usr/lib/libstdc++.6.dylib `pwd`/../install/lib > ln -sf /usr/lib/libstdc++.6.dylib `pwd`/../install/lib/libstdc+ > +.dylib > > This works for me on OS X 10.5 and Ubuntu 9.10, although I had to > install some dependencies on Ubuntu (bison, flex). > > Trevor > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- View this message in context: http://old.nabble.com/Help-with-building-LLVM-2.6-GCC-tp27928136p28114890.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Apparently Analagous Threads
- [LLVMdev] Help with building LLVM 2.6 GCC
- [LLVMdev] Help with Mac OS X 10.6.2 build
- [LLVMdev] Error when attempting to build llvm-gcc-1.5 on Mac OS X 10.5.6
- [LLVMdev] Error when attempting to build llvm-gcc-4.2-2.4.source on Mac OS X 10.5.6
- [LLVMdev] Error when attempting to build llvm-gcc-1.5 on Mac OS X 10.5.6