[R-pkg-devel] Trouble installing XML on Windows 7 (64-bit)

Haigh, Rowan Rowan.Haigh at dfo-mpo.gc.ca
Fri Dec 15 23:47:18 CET 2017


Hi Avi,
Thank-you so much for your help. It took me a long time to figure it out but your suggestion was a great start. The trick in the end was to define the variable LIB_CURL in the Makeconf files to be the same as CURL_PATH. The package source build routine just did not recognise the latter variable,  but after inspecting the file `Makevars.win' in the RCurl/src/ directory, I guessed that this variable needed to be set to the location I had copied the curl goodies to.  (FMI: curl-7.40.0.zip obtained from http://www.stats.ox.ac.uk/pub/Rtools/goodies/multilib/).

You're a star Avi! Thanks again.

# set to use libcurl
USE_LIBCURL = YES
# path to parent of libcurl headers
CURL_PATH = C:/Apps/R/Rtools/curl7400
LIB_CURL  = C:/Apps/R/Rtools/curl7400
# libs: for 32-bit
# CURL_LIBS = -lcurl -lrtmp -lssl -lssh2 -lcrypto -lgdi32 -lcrypt32 -lz -lws2_32 -lgdi32 -lcrypt32 -lwldap32 -lwinmm -lidn
# libs: for 64-bit
CURL_LIBS = -lcurl -lrtmp -lssl -lssh2 -lcrypto -lgdi32 -lcrypt32 -lz -lws2_32 -lgdi32 -lcrypt32 -lwldap32 -lwinmm

Cheers, Rowan

From: Avraham Adler [mailto:avraham.adler at gmail.com]
Sent: Friday, December 15, 2017 12:11 PM
To: Haigh, Rowan
Subject: Re: [R-pkg-devel] Trouble installing XML on Windows 7 (64-bit)

I always build R from source, so that doesn’t affect me directly. I suggest you copy the lines relating to CURL out of Mkrules.dist, populate them (you’ll need 3 of the 4, 1 depends on 32/64) to your makeconf somewhere like you did for XML.

Good luck!

Avi

On Fri, Dec 15, 2017 at 1:22 PM Haigh, Rowan <Rowan.Haigh at dfo-mpo.gc.ca<mailto:Rowan.Haigh at dfo-mpo.gc.ca>> wrote:
Thanks Avi,
I wasn't rebuilding R, just getting the existing R-devel to install XML from source. I don't see any Mkrules in the compiled version of R-devel.

On a related issue, I now need to install RCurl from source but I have not yet found an obvious way to tell Makeconf how to find the files in `curl-7.40.0.zip' in addition to those in `local323.zip'.

These were never issues in previous builds of R-devel. The Windows binary packages from CRAN were usually compatible with R-devel.

Cheers, Rowan
Tel. (250) 363-8718


-----Original Message-----
From: Avraham Adler [mailto:avraham.adler at gmail.com<mailto:avraham.adler at gmail.com>]
Sent: Friday, December 15, 2017 9:48 AM
To: Haigh, Rowan; R Package Development
Subject: Re: [R-pkg-devel] Trouble installing XML on Windows 7 (64-bit)

On Fri, Dec 15, 2017 at 12:02 PM, Haigh, Rowan
<Rowan.Haigh at dfo-mpo.gc.ca<mailto:Rowan.Haigh at dfo-mpo.gc.ca>> wrote:
> Hi Duncan,
>
> Well I finally managed to install XML from source in Windows under R-devel. Basically it was a clue provided by user wlandau-lilly (last message on https://github.com/igraph/igraph/issues/915), and discussions between Gábor and user stewid (https://github.com/krlmlr-archive/r-portable/issues/3#issuecomment-72928971) that lead to success.
>
> 1. Download local323.zip from http://www.stats.ox.ac.uk/pub/Rtools/libs.html ;
>
> 2. Copy the files in local323.zip/include/libxml2/libxml/ directory to R-devel/include/libxml/ ;
>
> 3. Copy entire contents of local323.zip (directories include/ and lib/) to new directory C:/Apps/R/Rtools/local323/ ;
>
> 4. Change line 31 of two files `Makeconf' (in C:/Apps/R/Rdev/etc/i386/ and C:/Apps/R/Rdev/etc/x64/),  from `#LOCAL_SOFT' to `LOCAL_SOFT = C:/Apps/R/Rtools/local323'  ;
>
> 5. In R-devel, issue command `install.packages("XML", type = "source")'.
>

Sorry I didn't see this earlier. I've been building R from source on
Windows for years, although XML is one of the three packages I usually
build from binary (the other two being stringi and BH).

As per the instructions (which also tell you where to get the extras)
[1], you don't need to change MakeConf. You need to copy Mkrules.dist
to Mkrules.local and set LOCAL_SOFT to the directory you need and then
ensure EXT_LIBS = $(LOCAL_SOFT) is active. And yes, you need to put
the extra goodies in RLocalSoft (EXCEPT for Tcl), and that includes
Curl and ICU if you want to include that support.

Thanks,

Avi

[1] https://cran.r-project.org/doc/manuals/R-admin.html#Building-from-source
--
Sent from Gmail Mobile

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list