[SafeCode] Unable to build the LLVM from trunk

Hi All ,

Was trying to build the LLVM src from http://llvm.org/svn/llvm-project/llvm/branches/release_30 ,But unable to build the same and clang poped up with below error .

llvm[1]: Compiling IntervalMap.cpp for Debug build
In file included from /root/projects/safecode/llvm/lib/Support/IntervalMap.cpp:14:
/root/projects/safecode/llvm/include/llvm/ADT/IntervalMap.h:1980:32: error: use ‘template’ keyword to treat ‘newNode’ as a dependent template name
Node[NewNode] = this->map->newNode();
^
template
1 error generated.
make[1]: *** [/root/projects/safecode/build/lib/Support/Debug/IntervalMap.o] Error 1

Any lights will be appreciated on the above issue .

Thanks
Umesh

Was trying to build the LLVM src from http://llvm.org/svn/llvm-project/llvm/
branches/release_30 ,But unable to build the same and clang poped up with below
error .

  Are you bulidling LLVM trunk or branch 3.0? Or you can try LLVM 3.1 release,
which will be released soon.

Regards,
chenwj

I’m sorry ,Was trying to build from 3.0 ,Where safecode port is available as mentioned in their website http://safecode.cs.illinois.edu/docs/Install.html

I doubt i can get the safecode changes on 3.1 or u have any idea on the same ???

Thanks
~Umesh

Hi All ,

Was trying to build the LLVM src from http://llvm.org/svn/llvm-project/llvm/branches/release_30 ,But unable to build the same and clang poped up with below error .

First, it sounds like you’re building LLVM 3.0, Poolalloc, and SAFECode with an unmodified version of clang. Is this correct? If so, which version of Clang are you using?

Second, what platform are you on?

– John T.

This an issue in the header itself, indeed the template keyword is necessary to disambiguate between a template method (the case here) and an attribute compared to some NodeT thing.

It has been fixed on trunk already (now at line 1991).

– Matthieu

Thank you all for the responses,
John,
My Bad here you go

clang version 3.2 (trunk)
Target: i386-pc-linux-gnu
Thread model: posix

[root@localhost opensrc]# cat /etc/centos-release
CentOS release 6.2 (Final)
Matthieu,
Thanks for the fix and let me try again with latest trunk.

~Umesh

Thank you all for the responses,
John,
My Bad here you go

clang version 3.2 (trunk)
Target: i386-pc-linux-gnu
Thread model: posix

[root@localhost opensrc]# cat /etc/centos-release
CentOS release 6.2 (Final)
Matthieu,
Thanks for the fix and let me try again with latest trunk.

Again, SAFECode will not compile against LLVM mainline because we haven’t been tracking changes in LLVM. If you want to compile SAFECode, you need to compile it with LLVM 3.0.

The problem is that there is a C++ coding mistake in LLVM 3.0 that prevents newer, more pedantic versions of Clang from compiling it. Newer versions of LLVM correct the mistake, but SAFECode does not work with these newer versions yet.

Unfortunately, your only option at this point is to compile LLVM 3.0, poolalloc, and SAFECode with GCC (or maybe an older version of clang; I can use clang version 3.0 on Mac OS X).

– John T.