<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Maarten & Lennart,<br>
<br>
Following Maarten suggestion to add support of clang in Jenkins, I
tried to intsall clang on my UBUNTU and here I want to share what I
got.<br>
We duscused something separatly already but I thik it is better to
move in the list so we can trace the dialog back in the future.<br>
<br>
<br>
I installed 'clang' and 'llvm' (both precompiled). And I run in a
command line:<br>
<br>
clang++ -std=c++11 -stdlib=libc++ -fsanitize=undefined
-fno-omit-frame-pointer -I/usr/share/R/include/ -DNDEBUG
-I/home/maksim/distrib/libcxx/include -DCOMPILE_WITH_R -fpic -g
-O2 -Wall -pedantic -mtune=native -c convert_snp_illumina.cpp -o
convert_snp_illumina.o<br>
<br>
it spit out:<br>
<small><small><small><small><br>
</small></small></small></small>
<h1><small><small><small><small>convert_snp_illumina.cpp:70:14:
warning: comparison between NULL and non-pointer
('ifstream' (aka 'basic_ifstream<char>') and NULL)
[-Wnull-arithmetic]<br>
if (illfile == NULL) {<br>
~~~~~~~ ^ ~~~~<br>
convert_snp_illumina.cpp:70:14: error: invalid operands to
binary expression ('ifstream' (aka
'basic_ifstream<char>') and 'long')<br>
if (illfile == NULL) {<br>
~~~~~~~ ^ ~~~~<br>
convert_snp_illumina.cpp:270:14: warning: comparison
between NULL and non-pointer ('ofstream' (aka
'basic_ofstream<char>') and NULL)
[-Wnull-arithmetic]<br>
if (outfile == NULL) {<br>
~~~~~~~ ^ ~~~~<br>
convert_snp_illumina.cpp:270:14: error: invalid operands
to binary expression ('ofstream' (aka
'basic_ofstream<char>') and 'long')<br>
if (outfile == NULL) {<br>
~~~~~~~ ^ ~~~~</small></small></small></small></h1>
Here -I/home/maksim/distrib/libcxx/include is a standard library for
clang ('libcxx' was downloaded from <a class="moz-txt-link-freetext" href="http://libcxx.llvm.org/">http://libcxx.llvm.org/</a>).<br>
<br>
<br>
This is exactly the warinings/errors which CRAN people sent us. To
run it as R CMD INSTALL, we need to change /etc/R/Makeconf (as
Maarten mentioned already) appropraitelly and compile the library
'libcxx' (now, I just downloaded it and used headers files only). I
tried 'sudo apt-get install libc++-dev' as Maarten suggested but got
many conflicts with other packages and could not install it.<br>
<br>
That's what I got by now. <br>
<br>
p.s. It seems we always should use 'clang' for compiling R packages
because as I understand it makes more extensive diagnostic of C++
code before compiling. What do you think?<br>
<br>
best,<br>
Maksim<br>
<br>
<br>
<br>
</body>
</html>