[LLVMdev] problem building llvm + 4.2 frontend from svn

Prakash Prabhu prakash.prabhu at gmail.com
Wed Apr 23 18:46:38 PDT 2008


Hi John,

I think --enable-llvm  (for the front-end compilation) expects the object
directory used during the LLVM compilation.
I followed the following sequence and got both LLVM and front end installed
on Ubuntu 7.10. Hope this helps.

Let's say you start out at BASE_DIR

[BASE_DIR]$ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm

[BASE_DIR]$ mkdir llvm-objects
[BASE_DIR]$ cd llvm-objects

[BASE_DIR/llvm-objects]$ sudo ../llvm/configure --prefix=/usr/local/
--program-prefix=llvm- --enable-llvm=$BASE_DIR/llvm/ --disable-shared
--disable-multilib --disable-bootstrap --enable-languages=c,c++

[BASE_DIR/llvm-objects]$ sudo make ENABLE_OPTIMIZED=0
[BASE_DIR/llvm-objects]$ sudo make install

[BASE_DIR/llvm-objects]$ cd ..
[BASE_DIR]$ svn co
http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunkllvm-gcc-4.2

[BASE_DIR]$ mkdir llvm-gcc-4.2-objects
[BASE_DIR]$ cd llvm-gcc-4.2-objects

[BASE_DIR/llvm-gcc-4.2-objects]$ ../llvm-gcc-4.2/configure
--prefix=/usr/local --program-prefix=llvm-
--enable-llvm=$BASE_DIR/llvm-objects/ --enable-languages=c,c++
--enable-checking

[BASE_DIR/llvm-gcc-llvm-4.2-objects]$ sudo make
[BASE_DIR/llvm-gcc-llvm-4.2-objects]$ sudo make install

[BASE_DIR/llvm-gcc-llvm-4.2-objects]$ sudo chmod ugo+rx /usr/local/bin/llvm*

[BASE_DIR/llvm-gcc-llvm-4.2-objects]$ ls /usr/local/bin/llvm*
/usr/local/bin/llvm-ar*          /usr/local/bin/llvmc2*
/usr/local/bin/llvm-dis*      /usr/local/bin/llvm-gccbug*
/usr/local/bin/llvm-nm*
/usr/local/bin/llvm-as*          /usr/local/bin/llvm-config*
/usr/local/bin/llvm-extract*  /usr/local/bin/llvm-gcov*
/usr/local/bin/llvm-prof*
/usr/local/bin/llvm-bcanalyzer*  /usr/local/bin/llvm-cpp*
/usr/local/bin/llvm-g++*      /usr/local/bin/llvm-ld*
/usr/local/bin/llvm-ranlib*
/usr/local/bin/llvm-c++*         /usr/local/bin/llvm-db*
/usr/local/bin/llvm-gcc*      /usr/local/bin/llvm-link*
/usr/local/bin/llvm-stub*

regards,
Prakash
On Wed, Apr 23, 2008 at 5:15 PM, John Regehr <regehr at cs.utah.edu> wrote:

> I checked out LLVM and configured like this:
>
> ./configure --prefix=/home/regehr --enable-optimized
>
> then built and installed it.  Then, checked out the frontend, configured
> like this:
>
> ../configure --prefix=/home/regehr --enable-languages=c,c++  \
> --enable-llvm=/home/regehr/z/llvm
>
> but when I try to build I get
>
> configure: error: You must specify valid path to your LLVM tree with
> --enable-llvm=DIR
>
> The dir I specified is correct, and it is being passed properly to
> gcc/configure.  The problem seems to be that my llvm stuff is going into
> a "Release" directory, whereas the stuff in gcc/configure starting
> around line 7384 is checking a list of dirs including "Release-Asserts",
> "Debug-Asserts", etc. -- but not including "Release" so I'm falling into
> the else clause.
>
> Am I doing something silly or is this a bug?  Thanks,
>
> John Regehr
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080423/0b84c285/attachment.html>


More information about the llvm-dev mailing list