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. 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/liverpool-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/liverpool-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 _._._._._._._._._._._._._._._._._._
Dirk Eddelbuettel
2010-Sep-13 21:31 UTC
[Rd] Problem with WARNING...headers with CRLF line endings
On 13 September 2010 at 23:07, cstrato wrote: | 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. | | 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/liverpool-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/liverpool-checksrc.html | For this reason I would appreciate if there would be a possibility to | suppress this warning message. I once had the warning to in project and just added another filtering step using this ## simple 0d 0a -> 0a converter to suppress a warning on Windows filename <- commandArgs(trailingOnly=TRUE)[1] if (!file.exists(filename)) q() con <- file(filename, "rb") bin <- readBin(con, raw(), 100000) bin <- bin[ which(bin != "0d") ] close(con) Sys.sleep(1) con <- file(filename, "wb") writeBin(bin, con) close(con) Maybe you can use something like this and have the generated file transformed. Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
William Dunlap
2010-Sep-14 00:06 UTC
[Rd] Problem with WARNING...headers with CRLF line endings
> -----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/liverpool-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/liverpool-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 >
Dear Dirk, Thank you for this suggestion, however I have no idea where this code could be used. As I have said, this file is created automatically during the compilation by the compiler, and I have no idea at which point "R CMD check" does check for CRLF line endings, and how to interfere with this step. Do you have any ideas? Best regards Christian On 9/13/10 11:31 PM, Dirk Eddelbuettel wrote:> > On 13 September 2010 at 23:07, cstrato wrote: > | 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. > | > | 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/liverpool-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/liverpool-checksrc.html > | For this reason I would appreciate if there would be a possibility to > | suppress this warning message. > > I once had the warning to in project and just added another filtering step > using this > > > ## simple 0d 0a -> 0a converter to suppress a warning on Windows > > filename<- commandArgs(trailingOnly=TRUE)[1] > if (!file.exists(filename)) q() > > con<- file(filename, "rb") > bin<- readBin(con, raw(), 100000) > bin<- bin[ which(bin != "0d") ] > close(con) > > Sys.sleep(1) > > con<- file(filename, "wb") > writeBin(bin, con) > close(con) > > > Maybe you can use something like this and have the generated file transformed. > > Dirk >
Dear Dirk, Thank you for this suggestion, however since I am not very good in creating Makefiles I would appreciate if you could explain how to filter at the compile stage. These are the lines which I think are essential: xps.dll: $(MYOBJ) $(LINK) /dll /def:xps.def /out:xps.dll fp10.obj $(SOFLAGS) $(LDFLAGS) $(GLIBS) *.obj xpsDict.cxx: $(MYHDR) xpsLinkDef.h @echo "Generating dictionary $@..." @rootcint -f $@ -c $(MYHDR) xpsLinkDef.h xpsDict.obj: xpsDict.cxx xpsDict.h $(CL) /I"${ROOTSYS}/include" /FIw32pragma.h /MT /EHsc /Ox /D "MSVC" /D "WIN32" /c xpsDict.cxx clean: rm -f $(MYOBJ) *.a *.d *.rc The line @rootcint creates the xpsLinkDef.h file. Do I have to add something after the compilation step of xpsDict.obj? Thank you in advance. Best regards Christian On 9/15/10 10:51 PM, Dirk Eddelbuettel wrote:> > On 15 September 2010 at 22:39, cstrato wrote: > | Dear Duncan, dear Herve, > | > | Thank you both for your help and suggestions. I think that you are both > | right: > | > | In principle I do not want to put these files in the source tarball (and > | I did not in the past), however because of the way R CMD check works > | this seems to be the only possibility to get rid of the warning message. > | > | I agree that it is weird to get this warning message although these > | files are not in the source tarball. > | > | Since I have a Makefile, as Herve mentions, I can try to remove these > > If you have a Makefile, then you have implicit rules as well as explicit > ones. That is how the file gets created. > > Now modify the rules and insert another layer which will do the filtering. As > the saying goes: "there is no problem that cannot be solved by adding > another layer of indirection". Instead of requiring the generated file, > require the generated and filtered file. > > | files in the clean step, which currently is: > | > | clean: > | rm -f $(MYOBJ) *.a *.d *.rc > | > | I will try to change this part but I am not sure if this will solve the > | problem. > > I fear that the clean step runs too late. You want the file filtered at the > compile stage. > > Dirk >
Reasonably Related Threads
- Error in R CMD INSTALL on Windows XP using Rtools28
- operation on ‘numsels’ may be undefined
- Windows download.file sometimes pauses / truncates large files
- bug in codetools/R CMD check?
- Guidelines when to use LF vs CRLF ("\n" vs. "\r\n") on Windows for new lines (line endings)?