[LLVMdev] Compiling llvm and Clang on Linux

Sitvanit Ruah RUAH at il.ibm.com
Sun Jul 15 05:42:13 PDT 2012


Do I have to recompile from scratch whenever I am changing the
configuration?

It looks like I need to give additional flags  to the configure command.
Anything else I need except CC, CXX and CXXFLAGS?

Do I need any of the following too?
--with-c-include-dirs   Colon separated list of directories clang will
                          search for headers

  --includedir=DIR       C header files [PREFIX/include]

What is the difference between the above two options?

--libdir=DIR           object code libraries [EPREFIX/lib]

Sitvanit Ruah
Formal Verification Group
IBM Haifa Research Laboratory
Tel:  972-4-828-1249




From:	NAKAMURA Takumi <geek4civic at gmail.com>
To:	Sitvanit Ruah/Haifa/IBM at IBMIL,
Cc:	Duncan Sands <baldrick at free.fr>, llvmdev at cs.uiuc.edu
Date:	15/07/2012 02:50 PM
Subject:	Re: [LLVMdev] Compiling llvm and Clang on Linux



Ok, I got. You should install libstdc++44-devel, too.

Please try to install gcc44-c++ and libstdc++44-devel.

Note: gcc44-c++ depends on gcc44, but gcc44-c++ and libstdc++44-devel
are independent each other, at least on my host, CentOS5.

...Takumi

2012/7/15 Sitvanit Ruah <RUAH at il.ibm.com>:
> In order to isolate the problem I am now running on a machine whose only
> installation of  gcc/g++ is gcc44, g++44
>
> For this installation I am getting the following error:
>
>
>   COMPILE:
>
clang_linux/asan-i386/i386: /gpfs/haifa-p4/00/pincette/sitvanit/LLVM/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc

> /.../sitvanit/LLVM/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:19:10:

>  fatal error:
>       'new' file not found
> #include <new>
>          ^
> 1 error generated.
> make[5]: ***
>
[/gpfs/haifa-p4/00/pincette/sitvanit/LLVM/build/tools/clang/runtime/compiler-rt/clang_linux/asan-i386/i386/SubDir.lib__asan/asan_new_delete.o]

>  Error 1
> make[5]: Leaving directory
> `/gpfs/haifa-p4/00/pincette/sitvanit/LLVM/llvm/projects/compiler-rt'
> make[4]: *** [BuildRuntimeLibraries] Error 2
> make[4]: Leaving directory
>
`/gpfs/haifa-p4/00/pincette/sitvanit/LLVM/build/tools/clang/runtime/compiler-rt'

> make[3]: *** [compiler-rt/.makeall] Error 2
> make[3]: Leaving directory
> `/gpfs/haifa-p4/00/pincette/sitvanit/LLVM/build/tools/clang/runtime'
> make[2]: *** [all] Error 1
> make[2]: Leaving directory
> `/gpfs/haifa-p4/00/pincette/sitvanit/LLVM/build/tools/clang'
> make[1]: *** [clang/.makeall] Error 2
> make[1]: Leaving directory
> `/gpfs/haifa-p4/00/pincette/sitvanit/LLVM/build/tools'
> make: *** [all] Error 1
> ========================================================
>
> The shell I am using is tcsh (it doesn't recognize the command "export")
>
> The outputs to the gcc44 -v, g++44 -c:
>
> build> gcc44 -v
> Using built-in specs.
> Target: i386-redhat-linux6E
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla
> --enable-bootstrap --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --disable-gnu-unique-object
> --with-as=/usr/libexec/binutils220/as --enable-languages=c,c++,fortran
> --disable-libgcj
>
--with-mpfr=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-i386-redhat-linux6E/mpfr-install/

>
>
--with-ppl=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-i386-redhat-linux6E/ppl-install

>
>
--with-cloog=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-i386-redhat-linux6E/cloog-install

>  --with-tune=generic --with-arch=i586 --build=i386-redhat-linux6E
> Thread model: posix
> gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
>
>
> build> g++44 -v
> Using built-in specs.
> Target: i386-redhat-linux6E
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla
> --enable-bootstrap --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --disable-gnu-unique-object
> --with-as=/usr/libexec/binutils220/as --enable-languages=c,c++,fortran
> --disable-libgcj
>
--with-mpfr=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-i386-redhat-linux6E/mpfr-install/

>
>
--with-ppl=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-i386-redhat-linux6E/ppl-install

>
>
--with-cloog=/builddir/build/BUILD/gcc-4.4.6-20110824/obj-i386-redhat-linux6E/cloog-install

>  --with-tune=generic --with-arch=i586 --build=i386-redhat-linux6E
> Thread model: posix
> gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
>
> Sitvanit Ruah
> Formal Verification Group
> IBM Haifa Research Laboratory
> Tel:  972-4-828-1249
>
>
>
>
> From:   Duncan Sands <baldrick at free.fr>
> To:     llvmdev at cs.uiuc.edu,
> Date:   15/07/2012 12:37 PM
> Subject:        Re: [LLVMdev] Compiling llvm and Clang on Linux
> Sent by:        llvmdev-bounces at cs.uiuc.edu
>
>
>
> PS: Do you actually have gcc-4.4 installed and in your path?  What do the
> commands
>    gcc44 -v
> and
>    g++44 -v
> output?
>
> On 15/07/12 10:59, Duncan Sands wrote:
>> Hi Sitvanit,
>>
>>> I tried
>>>
>>>    CC=gcc44 CXX=g++44 ../llvm/configure
>>>
>>> and got
>>>
>>> CC=gcc44: Command not found
>>>
>>> So the syntax is indeed as wriiten in the help.
>>
>> actually, no, this just means that you are using a shell that doesn't
> support
>> this syntax.  What shell are you using?  Try
>>     export CC=gcc44
>>     export CXX=g++44
>>     ../llvm/configure
>>
>> Ciao, Duncan.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev






More information about the llvm-dev mailing list