[R] creation of package failed

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Aug 14 16:43:18 CEST 2012



On 14.08.2012 10:16, Franckx Laurent wrote:
> Thanks for the quick response.
>
> Concerning your first point: the spaces in " Inno Setup 5" are not spaces between different directories, this was just the name of the directory as suggested during the installation procedure. Anyway, I have now added underscores between the individual words in the directory name and in the path definition.


No, you have to have

C:\R\R-2.15.0\bin\x64;c:\R\Rtools\bin;C.....

rather than
C:\R\R-2.15.0\bin\x64; c:\R\Rtools\bin; C

as you wrote in your original message.



> Second, let me try to be more specific.
>
> Basically, what I have done is modifying a few functions in an existing package, in order to test whether my modifications would be an improvement compared to the existing functionalities. I have therefore kept most of the package as it was, including the folder structure. I have never encountered any difficulties with the installation of the old package.
>
> However, in order to avoid confusion between the existing package (let's call it "oldpackage") and my trials (let's call them "newpackage"), I have modified the name of the file with R code that contains the modified functions. I have also given a separate name to my package, and I have modified the NAMESPACE accordingly.
>
> The original package also contained C++ code, which was duly put in the "src" folder. When I first tried to build my package, I had forgotten to first delete the  dll created when "oldpackage" was built and I got warnings that the "dll" files had not been declared. I have deleted them now. (I is not completely clear to me whether I should run "R CMD SHLIB firstccfile.cc secondccfile.cc -o newpackage.dll" or not

No, that happens automatically when your package is installed (i.e. when 
calling R CMD INSTALL).


- I have tried to do both with and without).
>
> Now, when I run "R CMD build Y:\Unit_TEM\3_TRAM\Projecten\N9393_ruimte_transport_model\newpackage", I get the following messages:
>
>          *checking for file ' Y:\Unit_TEM\3_TRAM\Projecten\N9393_ruimte_transport_model\newpackage/DESCRIPTION' .... OK
>          *preparing 'newpackage':
>          *checking DESCRIPTION meta-information ... OK
>          *cleaning src
>          *checking for LF line-endings in source and make files
>          *checking for empty or unneeded directories
>          *looking to see if a 'data/datalist' file should be added
>          *building 'newpackage.tar_0.1-6.gz'


Are you sure this is the error message?

That should be *building 'newpackage_0.1-6.tar.gz'

So we really need to see your package in order to learn why this fails.

Uwe Ligges



>           ERROR
>          Packaging into .tar.gz failed



>
> When I check the package with R CMD check Y:\Unit_TEM\3_TRAM\Projecten\N9393_ruimte_transport_model\newpackage, I get the following info from "00install"
>
>
>          * installing *source* package 'newpackage'...
>          ** libs
>
>          *** arch - i386
>          ERROR: compilation failed for package 'newpackage'
>          * removing 'C:/Users/franckxl/newpackage.Rcheck/newpackage'
>
> And the following info from the corresponding log file:
>
>          * using log directory 'C:/Users/franckxl/newpackage.Rcheck'
>          * using R version 2.15.0 (2012-03-30)
>          * using platform: x86_64-pc-mingw32 (64-bit)
>          * using session charset: ISO8859-1
>          * checking for file 'newpackage/DESCRIPTION' ... OK
>          * this is package 'newpackage' version '0.1-6'
>          * checking package namespace information ... OK
>          * checking package dependencies ... OK
>          * checking if this is a source package ... WARNING
>          Subdirectory 'newpackage/src' contains object files
>           firstccfile.o secondccfile.o
>          * checking if there is a namespace ... OK
>          * checking for .dll and .exe files ... OK
>          * checking whether package 'newpackage' can be installed ... ERROR
>          Installation failed.
>          See 'C:/Users/franckxl/newpackage.Rcheck/00install.out' for details.
>
>
> I have verified similar error messages that were reported on various discussion forums, and most answers I have seen suggested that this may be due to Rtools not being installed. However, I have re-installed the most recent version of Rtools this morning, so I cannot see how this could be the source of the problem. (At least, if it is sufficient to  install the R 2.15.x toolchain in a package that includes a C++ interface - I do not find the explanation in the "R installation and administration" manual very clear on this specific point.)
>
> I hope this is sufficient information to clarify the problem.
>
> -----Original Message-----
> From: Uwe Ligges [mailto:ligges at statistik.tu-dortmund.de]
> Sent: maandag 13 augustus 2012 19:29
> To: Franckx Laurent
> Cc: 'r-help at r-project.org'
> Subject: Re: [R] creation of package failed
>
>
>
> On 13.08.2012 17:10, Franckx Laurent wrote:
>> Dear all
>> I am trying to build a package, and get the error message: ""packaging into .tar.gz failed"".
>> I have also installed the same package directly from a locally created zip file.  In this case, the package is put correctly under C:\R\R-2.15.0\library. However, when I check the package, I get another error message, stating "ERROR: compilation failed for package".
>> I use a 64 bit computer.
>> Before attempting the installation, I had created the following path: PATH =  C:\R\R-2.15.0\bin\x64; c:\R\Rtools\bin; C:\R\Rtools\gcc-4.6.3\bin64;  C:\MiKTeX\miktex\miktex\bin;  c:\windows; c:\windows\system32; C:\Windows\SysWOW64; C:\Program Files (x86)\Inno Setup 5.
>> I have re-installed today the most recent version of Rtools.
>> Does anyone have an idea what is going wrong here?
>
> Unsufficient information to know that, but the PATH above is incorrect, you must not have spaces between the separate directories.
>
> In addition, we need full information what you tried when you said R CMD build and how the directory looked like. Do you have write permission in the parent directory etc.
>
> Uwe Ligges
>
>
>
>>
>> Laurent Franckx, PhD
>> Expert
>> VITO NV
>> Boeretang 200, 2400 MOL, Belgium
>> Tel. + 32 14 33 58 22
>> Skype: laurent.franckx
>> laurent.franckx at vito.be
>> Visit our website: www.vito.be/english and
>> http://www.vito.be/transport
>>
>>
>>
>>
>>
>>
>>
>> http://www.vito.be/e-maildisclaimer
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> http://www.vito.be/e-maildisclaimer
>



More information about the R-help mailing list