<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Maarten,<br>
<br>
Thanks for suggesting how to fix these warnings/errors but at the
current stage I am trying to figure out how to get a complete
report on all warnings/errors in the code. Yurii forwarded an
email from CRAN with 'warning/error' report on
convert_snp_illumina.cpp file only. But, there are more warnings I
guess. To fix them, we need first to find a way how CRAN people
gets these warnings/errors. The version which I submited to CRAN
was 'free' of warnings/errors' according to gcc-4.6 (there was
only one warning on export_plink.cpp as I reported as a bug on
r-forge). CRAN is unhappy with this version. This is beacuse the
CRAN's pipline which is used for checking R packages is more
complicated then just compiling by 'gcc' and I would like to find
a way how they do it.<br>
<br>
I think we need to follow your suggestion and add support of
'clan' in Jenkins, at least. More: following an email from prof.
Ripley (<span style="font-family:'Helvetica'; color:rgba(0, 0, 0,
1.0);"></span><span style="font-family:'Helvetica';">from
November 16, 2013</span>), I think, we need to add support of<br>
clang and g++ 4.8.1 in C++98 and C++11 modes. Also: probably add
support of Undefined Behaviour Sanitizer because they use it. We
need to read carefully 'Writing R Extensions' manual and change
GenABEL code according to CRAN policy.<br>
<br>
Yury: Do you have more comments on GenABEL from Ripley? They might
help to understand what to do.<br>
<br>
best,<br>
Maksim<br>
<br>
<br>
On 10/12/2013 20:49, Maarten Kooyman wrote:<br>
</div>
<blockquote cite="mid:52A71BFF.8000207@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi Maksim,<br>
<br>
It seems that libcxx has stricter rules the lib we "normally"
use.<br>
<br>
<br>
replace<br>
<h1><small><small><small><small>if (illfile == NULL) {</small></small></small></small></h1>
with<br>
<br>
if (!illfile.is_open()) {<br>
<br>
and it should compile again. I did not do functional testing!
In my opion the is_open() variant looks cleaner then the ==NULL
construction.<br>
<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>
Most computers do have the GCC pipeline as default (except
MacOS), so building it with GCC pipeline by default would be
good enough. LLVM and GCC do both have there strengths and
weaknesses. So the best way is to test both pipeline in Jenkins.
CRAN does use a trunk version of R to test the packages so it
would be wise to compile a fresh R on the jenkins server once in
a while. It is in general a good idea to use the latest
version(maybe even bleeding edge) to find error in our software
before people have running this software on there production
machine.<br>
<br>
@maksim: were you able to fix all comment of CRAN?<br>
<br>
Kind regards,<br>
<br>
Maarten<br>
<br>
<br>
On 12/10/2013 12:00 PM, Maksim Struchalin wrote:<br>
</div>
<blockquote cite="mid:52A6F452.7050907@mail.ru" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
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>
<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
moz-do-not-send="true" 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>
<br>
best,<br>
Maksim<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
genabel-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:genabel-devel@lists.r-forge.r-project.org">genabel-devel@lists.r-forge.r-project.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel</a></pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
genabel-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:genabel-devel@lists.r-forge.r-project.org">genabel-devel@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel</a></pre>
</blockquote>
<br>
</body>
</html>