From henrik.bengtsson at ucsf.edu  Tue Apr  7 18:53:58 2015
From: henrik.bengtsson at ucsf.edu (Henrik Bengtsson)
Date: Tue, 7 Apr 2015 09:53:58 -0700
Subject: [Rd] Package compilation woes on submission.
In-Reply-To: <CA+0rMgk_T_n4RPni5Ve37pZA3skYObPAq3rZ0o5J1Rvitweafg@mail.gmail.com>
References: <CA+0rMgk_T_n4RPni5Ve37pZA3skYObPAq3rZ0o5J1Rvitweafg@mail.gmail.com>
Message-ID: <CAFDcVCTVD5KF9rQWWgT=N3PBHy_2Km3ZAW5KD1hkn6mTQYPA5g@mail.gmail.com>

I've been there too.  The clang compiler does useful validation and
troubleshooting of your code in addition to what you get with gcc.  I
recommend installing/trying it as a complement to your default setup.

It has a -c option for "Only run preprocess, compile, and assemble
steps" allowing you do check you code as:

    clang -c -pedantic -Wall -I$(R_HOME)/include/ src/*.c

I wouldn't be surprised if this would be enough for you to identify
and fix the problematic code.

Hope this helps

Henrik



On Tue, Apr 7, 2015 at 4:28 AM, Aravind Jayaraman
<aravindjayaramanagri at gmail.com> wrote:
> Hello,
>
> I am trying to submit a new package to CRAN. I had checked the
> packages with R-devel and R-release in windows 7 local and ubuntu
> 12.04 local. The package has a C file in src folder which successfully
> compiled in all the cases (there were few trivial warnings).
>
> I had submitted the package last week and was asked to resubmit with
> few changes in the description file.
>
> However upon resubmission today, the C code failed to compile in the
> reviewer's system throwing several errors.
>
> I rechecked the package with windows 7 and ubuntu as before and there
> were no errors. I tried winbuilder with R-release as well as R 3.2.0
> beta again without any errors.
>
> The only difference that I could understand was that the compiler used
> by me as well as winbuilder is gcc while that in case of the reviewer
> is clang.
>
> In such a case, how should I proceed with the submission?
>
> --
> J.Aravind
> Germplasm Conservation Division
> ICAR-National Bureau of Plant Genetic Resources
> New Delhi - 110 012
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Package compilation woes on submission.
Henrik Bengtsson