rdotnet/rClr

Trouble building project

Ductomaniac opened this issue · 2 comments

Hi,
I’m trying to see if I can get rclr built on R 3.5 to get around the issues this version is causing with rclr. However, the build instructions available on the site (clicking on “Read the current build instructions” here https://github.com/jmp75/rClr jumps to here: https://archive.codeplex.com/?p=r2clr instead of anything with actual build instructions). Would you be able to help me get set up with building on Windows?
I have tried using pkgbuild::build, which seems to try to build the package, however, when it gets to the MS Build portion it has trouble building, giving the following output:

Build configuration Release
Microsoft (R) Build Engine version 4.6.1586.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified.
Switch: t:Build

As far as I can tell, this error is frequently caused by misuse of quotation marks on makefiles. Would you happen to have any insight on this error, or on newer documentation for building the package?

Figured it out - when R builds a package, it moves all non dll files to a temporary folder and does the building there. For whatever reason the location of the temporary folder was causing MSBuild to fail.
To fix this, I built the dll's out in Visual Studio and put them in the location the script moves them from (libs folder I think).

jmp75 commented

Hi,

First thank you @Ductomaniac for reporting in the first place. I just bumped into a similar issue. I was using the windows command prompt to do R CMD INSTALL and the like. Adding 'echo' outputs in the Makefile.win.in template file was outputing a perfectly good command line:

MSBuild.exe rClr.sln /t:Build /p:Configuration=Release /p:Platform=x64

so was puzzled. Reading this stack overflow answer I then tried to generate double forward slashes:

MSBuild.exe rClr.sln //t:Build //p:Configuration=Release //p:Platform=x64

Lord and behold, it works

I don't know whether this always occured on windows CMD prompt and I used to use cygwin on a previous machine hence this was hiding this problem.

Not sure of the interplay between CMD, RTools mingw, and a cygwin prompt, but I thought this was worth reporting given the obscure nature.