[cfe-dev] cmake TableGen

Manuel Klimek klimek at google.com
Thu May 10 07:09:33 PDT 2012


Ran,

I have no idea whether / how you can compile clang with gcc 4.1. I
cc'ed the list back in, so somebody else might be able to help.

Cheers,
/Manuel

On Thu, May 10, 2012 at 4:05 PM, Ran Regev <regev.ran at gmail.com> wrote:
>
> Manuel,
> If we are already talking...
> I'm trynig to 'make' llvm (+clang).
> I followed the instruction here http://clang.llvm.org/get_started.html
> and I get this error:
>
>   COMPILE:   clang_linux/asan-x86_64/x86_64:
> /auto/tnd_cesr/users/rregev/c++11/llvm/projects/compiler-rt/lib/asan/asan_posix.cc
> In file included from
> /auto/tnd_cesr/users/rregev/c++11/llvm/projects/compiler-rt/lib/asan/asan_posix.cc:35:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/algorithm:64:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_algobase.h:69:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:45:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/c++io.h:38:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr.h:132:
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:100:1:
> error: weakref declaration must have internal linkage
> __gthrw(pthread_once)
> ^
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
> note: expanded from macro '__gthrw'
> #define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
>                       ^
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
> note: expanded from macro '__gthrw2'
>   extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
>                                              ^
>
> The computer I'm installing and compiling on is not mine, and it has an old
> gcc version 4.1.2.
> I tried to add the include files as instructed in the get_started page
> for /libcxx/include/
> no help.
>
> What to do?
>
> Ran.
>
>
>
>
> On 10 May 2012 15:55, Ran Regev <regev.ran at gmail.com> wrote:
>>
>> Cheers!
>>
>> I'll try it and let you know.
>>
>> Ran.
>>
>>
>> On 10 May 2012 15:33, Manuel Klimek <klimek at google.com> wrote:
>>>
>>> On Thu, May 10, 2012 at 2:28 PM, Ran Regev <regev.ran at gmail.com> wrote:
>>> > Thanks for the quick reply, but I'm not quite follow -
>>> >
>>> > How to build only TableGen?
>>> >
>>> > I thought I can 'cmake' tablegen and then 'make' TableGen.
>>>
>>> You can 'cmake' all of llvm, and then
>>> $ make llvm-tblgen
>>>
>>> Cheers,
>>> /Manuel
>>>
>>> >
>>> > Where am I wrong?
>>> >
>>> > Ran.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On 10 May 2012 15:08, Manuel Klimek <klimek at google.com> wrote:
>>> >>
>>> >> On Thu, May 10, 2012 at 10:09 AM, Ran Regev <regev.ran at gmail.com>
>>> >> wrote:
>>> >> >
>>> >> > When trying to cmake TableGen, I got these error and warning:
>>> >> >
>>> >> >  CMake Error at CMakeLists.txt:5 (add_tablegen):
>>> >> >   Unknown CMake command "add_tablegen".
>>> >> >
>>> >> >
>>> >> > CMake Warning (dev) in CMakeLists.txt:
>>> >> >   No cmake_minimum_required command is present.  A line of code such
>>> >> > as
>>> >> >
>>> >> >     cmake_minimum_required(VERSION 2.8)
>>> >> >
>>> >> >   should be added at the top of the file.  The version specified may
>>> >> > be
>>> >> > lower
>>> >> >   if you wish to support older CMake versions for this project.  For
>>> >> > more
>>> >> >   information run "cmake --help-policy CMP0000".
>>> >> > This warning is for project developers.  Use -Wno-dev to suppress
>>> >> > it.
>>> >> >
>>> >> > -- Configuring incomplete, errors occurred!
>>> >> >
>>> >> >
>>> >> > Any idea?
>>> >>
>>> >> Are you calling cmake from the TableGen subdir? If yes, that's not
>>> >> going to fly - you need to call cmake with the toplevel directory, and
>>> >> it will recurse automatically.
>>> >>
>>> >> Cheers,
>>> >> /Manuel
>>> >
>>> >
>>
>>
>




More information about the cfe-dev mailing list