From cstrato at aon.at  Tue Sep 14 23:58:51 2010
From: cstrato at aon.at (cstrato)
Date: Tue, 14 Sep 2010 23:58:51 +0200
Subject: [Rd] Problem with WARNING...headers with CRLF line endings
In-Reply-To: <4C8FE9EE.60604@fhcrc.org>
References: <4C8E9297.5050806@aon.at>	<77EB52C6DD32BA4D87471DCD70C8D700036E87E6@NA-PA-VBE03.na.tibco.com>	<4C8FBE96.6080604@aon.at>	<69C89B57-A641-44D3-A95D-D95A5AD6B2A6@r-project.org>
	<4C8FE527.6060308@aon.at> <4C8FE9EE.60604@fhcrc.org>
Message-ID: <4C8FF01B.6060208@aon.at>

Dear Herve,

Thank you for your reply, however maybe I was not quite clear.

The files xpsDict.h and xpsDict.cxx are automatically created by the 
ROOT framework during compilation on every architecture. This means they 
are created on Linux and Mac with LF line endings, but on Windows with 
CRLF line endings. However, they are created only if they do not already 
exist, and thus are not in the source tarball.

For testing purposes I have just added both files with LF line endings 
to the source tarball and compiled it on Windows w/o problems. 
Furthermore, the  size of "xps_1.9.6.tar.gz" increases only from 4MB to 
4.3MB. Thus in principle I could upload both files to SVN for BioC 2.7, 
and this should eliminate the warning message. What is your opinion?

Best regards
Christian


On 9/14/10 11:32 PM, Herv? Pag?s wrote:
> Hi Christian,
>
> On 09/14/2010 02:12 PM, cstrato wrote:
>> Dear Simon,
>>
>> Thank you for this clarification/suggestion, however I am confused. What
>> do you mean with "If the file is created automatically then it has no
>> business being in the package."?
>
> He means it shouldn't be in the source tarball. We run 'R CMD check'
> on source trees or source tarballs. Source tarballs are platform
> independent. If I understand correctly when you run 'R CMD build'
> on your source tree, you use some trick to generate this src/xpsDict.h
> file on Windows and this file ends up in the source tarball.
> But the source tarball created on Linux won't have this file.
> That doesn't sound like a good thing to me to have the content
> of the source tarball depending on the machine you've run
> 'R CMD build'. In other words, you should try to generate this
> src/xpsDict.h file at installation time but it shouldn't end up
> in the source tarball.
> My 2 cents...
>
> Cheers,
> H.
>
>>
>> If you download the source code of my package from:
>> http://bioconductor.org/packages/2.7/bioc/html/xps.html
>> you will see that this file is not in the package.
>>
>> However, I could indeed add the corrected files xpsDict.h and
>> xpsDict.cxx to the source code of my package. There is only one problem.
>> Currently the source code "xps_1.9.6.tar.gz" has a total size of 4MB.
>> Adding the corrected files will add another 4MB to the source code.
>>
>> Best regards
>> Christian
>>
>>
>> On 9/14/10 9:59 PM, Simon Urbanek wrote:
>>>
>>> On Sep 14, 2010, at 2:27 PM, cstrato wrote:
>>>
>>>> Dear Bill,
>>>>
>>>> It would be great if this warning message could at least be
>>>> suppressed on Windows.
>>>>
>>>
>>> I think you're missing the point - you should be fixing that file
>>> instead - it doesn't matter whether you're on Windows or not. If the
>>> file is created automatically then it has no business being in the
>>> package. Otherwise you should simply post-process it (e.g., as Dirk
>>> suggested) after it has been generated but before you create the
>>> package - that is the common practice with generated files that need
>>> to be part of the distribution.
>>>
>>> Cheers,
>>> Simon
>>>
>>>
>>>>
>>>> On 9/14/10 2:06 AM, William Dunlap wrote:
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: r-devel-bounces at r-project.org
>>>>>> [mailto:r-devel-bounces at r-project.org] On Behalf Of cstrato
>>>>>> Sent: Monday, September 13, 2010 2:08 PM
>>>>>> To: r-devel at r-project.org
>>>>>> Subject: [Rd] Problem with WARNING...headers with CRLF line endings
>>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> When running R CMD check on Windows XP to test my package I get the
>>>>>> following warning message:
>>>>>>
>>>>>> "* checking line endings in C/C++/Fortran sources/headers ... WARNING
>>>>>> Found the following sources/headers with CR or CRLF line endings:
>>>>>> src/xpsDict.h"
>>>>>>
>>>>>> The problem is that this file is created by the compiler
>>>>>> AUTOMATICALLY
>>>>>> during the compilation process, and since the file is created
>>>>>> by VC++ on
>>>>>> WinXP, it will always have CRLF line endings.
>>>>>>
>>>>>> Thus my question is:
>>>>>> - Is it really necessary to issues this warning message?
>>>>>> - If yes, could it be suppressed on Windows XP, since there it should
>>>>>> obviously be no problem.
>>>>>
>>>>> Older versions of Sun C compilers would refuse to
>>>>> compile code with Windows-style line endings. I don't
>>>>> know if that is still the case. One reason to run check
>>>>> is to see if there are any platform-dependencies in
>>>>> code on CRAN so the warning should not be suppressed.
>>>>>
>>>>> (The S+ package system tries to avoid the problem by changing
>>>>> line endings on text files when it compiles the package.
>>>>> It is not trivial to reliably figure out which files are
>>>>> meant to be text files.)
>>>>>
>>>>> Bill Dunlap
>>>>> Spotfire, TIBCO Software
>>>>> wdunlap tibco.com
>>>>>
>>>>>>
>>>>>> One more issue:
>>>>>> While I have always received this warning on my WinXP
>>>>>> installation, for
>>>>>> some lucky reason the warning did until now not appear on the
>>>>>> Bioconductor Windows server, see BioC 2.6 with R-2.11.1:
>>>>>> http://bioconductor.org/checkResults/2.6/bioc-LATEST/xps/liver
>>>>> pool-checksrc.html
>>>>>>
>>>>>> However, for some reason on BioC 2.7 running R-2.12.0 this
>>>>>> warning does
>>>>>> appear, see:
>>>>>> http://bioconductor.org/checkResults/2.7/bioc-LATEST/xps/liver
>>>>> pool-checksrc.html
>>>>>> For this reason I would appreciate if there would be a
>>>>>> possibility to
>>>>>> suppress this warning message.
>>>>>>
>>>>>> Thank you in advance.
>>>>>> Best regards
>>>>>> Christian
>>>>>> _._._._._._._._._._._._._._._._._._
>>>>>> C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a
>>>>>> V.i.e.n.n.a A.u.s.t.r.i.a
>>>>>> e.m.a.i.l: cstrato at aon.at
>>>>>> _._._._._._._._._._._._._._._._._._
>>>>>>
>>>>>> ______________________________________________
>>>>>> R-devel at r-project.org mailing list
>>>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>>>>
>>>>>
>>>>
>>>> ______________________________________________
>>>> R-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>>
>>>>
>>>
>>>
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] Problem with WARNING...headers with CRLF line endings
cstrato