Re: [Rd] cannot connect to an FTP server with long HELLO message
The example works for me (eventually: the site was very slow to respond) --- nanoftp reads the response in 1024 byte chunks and makes sense of it. We do provide debugging facilites via, say, options(internet.info=0, warn=1, warning.length=4000) which may help you debug this. Simply fiddling with the buffer size doesn't help understanding and might well break something else. The code is essentially unchanged since 2006 when inter alia the buffer size was doubled to 1024 (because libxml2 2.6.6 did), and AFAICS is essentially unchanged in the current snapshots of libxml2. I can surmise that the nanoftp C code might break if the actual control code spanned 1024-byte chunks, but it needs someone with the problem to debug in more detail. On Thu, 21 Oct 2010, Hervé Pagès wrote: Hi, Trying to access files on the ftp server at ftp.ncbi.nih.gov will either give a time out or sometimes even a segfault on Linux. The 2 following methods give the same results: f <- url("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/GDS10.soft.gz";, open="r") download.file("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/GDS10.soft.gz";, destfile=tempfile()) I've tried one or the other method with all release versions >= 2.8 and with current R devel and they always fail to connect to this FTP server. What's particular about this FTP server is that it sends a long HELLO message before it finally sends the 220 control code. Using the Unix ftp client: Well, one of many such. - hpa...@latitude:~$ ftp ftp.ncbi.nih.gov Connected to ftp.ncbi.nih.gov. 220- Warning Notice! This is a U.S. Government computer system, which may be accessed and used only for authorized Government business by authorized personnel. Unauthorized access or use of this computer system may subject violators to criminal, civil, and/or administrative action. All information on this computer system may be intercepted, recorded, read, copied, and disclosed by and to authorized personnel for official purposes, including criminal investigations. Such information includes sensitive data encrypted to comply with confidentiality and privacy requirements. Access or use of this computer system by any person, whether authorized or unauthorized, constitutes consent to these terms. There is no right of privacy in this system. --- Welcome to the NCBI ftp server! The official anonymous access URL is ftp://ftp.ncbi.nih.gov Public data may be downloaded by logging in as "anonymous" using your E-mail address as a password. Please see ftp://ftp.ncbi.nih.gov/README.ftp for hints on large file transfers 220 FTP Server ready. - This seems to cause problems to the nanoftp module (src/modules/internet/nanoftp.c) used by url() and download.file() as it doesn't seem to be able to catch the 220 control code. I'm not familiar with the nanoftp module, or with socket programming in general, or with RFC 959 (FTP protocal), so I'm not really in a position to say what's going wrong exactly in the module but it seems that increasing the value of FTP_BUF_SIZE (size of the buffer for data received from the control connection) fixes the problem. Currently this is: #define FTP_BUF_SIZE1024 but, interestingly, *any* value > 1024 seems to fix the problem (even though the long HELLO message above is 1091 bytes). Any idea what's going on? Thanks, H. -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpa...@fhcrc.org Phone: (206) 667-5791 Fax:(206) 667-1319 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] S4 methods for rbind()
Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any number of arguments]. This is what I have so far: setGeneric(".rbind_pair", function(x,y){standardGeneric(".rbind_pair")}) setMethod(".rbind_pair", c("mdm", "mdm"), function(x,y){.mdm.cPair(x,y)}) setMethod(".rbind_pair", c("mdm", "ANY"), function(x,y){.mdm_rbind_error(x,y)}) setMethod(".rbind_pair", c("ANY", "mdm"), function(x,y){.mdm_rbind_error(x,y)}) setMethod(".rbind_pair", c("ANY", "ANY"), function(x,y){.mdm_rbind_error(x,y)}) ".mdm_rbind_error" <- function(x,y){ stop("an mdm object may only be rbinded to another mdm object") } ".mdm.rbind_pair" <- function(x,y){ stopifnot(compatible(x,y)) mdm(rbind(xold(x),xold(y)),c(types(x),types(y))) # this is the "meat" of the rbind functionality } setGeneric("rbind") setMethod("rbind", signature="mdm", function(x, ...) { if(nargs()<3) .mdm_rbind_pair(x,...) else .mdm_rbind_pair(x, Recall(...)) }) But LE223:~/packages% sudo R CMD INSTALL ./multivator [snip] Creating a new generic function for "tail" in "multivator" Error in conformMethod(signature, mnames, fnames, f, fdef, definition) : in method for ‘rbind’ with signature ‘deparse.level="mdm"’: formal arguments (... = "mdm", deparse.level = "mdm") omitted in the method definition cannot be in the signature Error : unable to load R code in package 'multivator' ERROR: lazy loading failed for package ‘multivator’ * removing ‘/usr/local/lib64/R/library/multivator’ * restoring previous ‘/usr/local/lib64/R/library/multivator’ LE223:~/packages% I can't understand what the error message is trying to say. Can anyone advise on a fix for this? -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB3 9EP 01223-764877 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Reference classes
On 23 October 2010 00:52, Jon Clayden wrote: > On 22 October 2010 18:55, John Chambers wrote: > >>> As a suggestion, it would be nice if the accessors() method could be >>> used to create just "getters" or just "setters" for particular fields, >>> although I realise this can be worked around by removing the unwanted >>> methods afterwards. >> >> In other words, read-only fields. There is a facility for that implemented >> already, but it didn't yet make it into the documentation, and it could use >> some more testing. The generator object has a $lock() method that inserts a >> write-once type of method for one or more fields. Example: >> >>> fg <- setRefClass("foo", list(bar = "numeric", flag = "character"), >> + methods = list( >> + addToBar = function(incr) { >> + b = bar + incr >> + bar <<- b >> + b >> + } >> + )) >>> fg$lock("bar") >>> ff = new("foo", bar = 1.5) >>> ff$bar <- 2 >> Error in function (value) : Field "bar" is read-only >> >> A revision will document this soon. >> >> (And no, the workaround is not to remove methods. To customize access to a >> field, the technique is to write an accessor function for the field that, in >> this case, throws an error if it gets an argument. See the documentation >> for the fields argument. The convention here and the underlying mechanism >> are taken from active bindings for environments.) > > OK, yes - I see. This is clearly much less superficial than removing > the setter method for a field which can be directly set anyway. I'll > have to try out field accessor functions and get a feel for the > semantics. Unfortunately, I'm having difficulty working out the accessor function approach. I've looked in the Rcpp package for examples, but it doesn't seem to use this feature. If I define Foo <- setRefClass("Foo", fields=list(bar=function (newBar) { if (missing(newBar)) bar else stop("bar is read-only") }), methods=list(barExists=function () print(exists("bar" then I can't access the value of "bar" due to infinite recursion. Using ".self$bar" in the accessor produces the same effect. > f <- Foo$new() > f$barExists() [1] TRUE > f$bar Error: evaluation nested too deeply: infinite recursion / options(expressions=)? > f$bar() Error: evaluation nested too deeply: infinite recursion / options(expressions=)? I can guess why this is happening (accessing "bar" within the accessor calls itself), but how can I get at the value of "bar" within the accessor without this occurring? The other problem is that I can't even set a value at the time of creation of the object, viz. > f <- Foo$new(bar=2) Error in function (newBar) : bar is read-only Is there a way to test whether "bar" has already been set in the accessor, so that I can allow it to be set once? (I know lock() allows this, but it would be useful to be able to replicate the effect using accessors, so that it can be generalised further where needed.) Clearly, exists("bar") doesn't do this, as seen above -- presumably because it sees the method rather than the field, or there is some default value. Thanks in advance, Jon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 methods for rbind()
On 10/26/2010 03:53 AM, Robin Hankin wrote: > Hello. > > I am trying to write an S4 method for rbind(). I have a class of objects > called 'mdm', and I want to be able to rbind() them to one another. > > I do not want the method for rbind() to coerce anything to an mdm object. > I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any > number of arguments]. > > This is what I have so far: > > > setGeneric(".rbind_pair", function(x,y){standardGeneric(".rbind_pair")}) > setMethod(".rbind_pair", c("mdm", "mdm"), function(x,y){.mdm.cPair(x,y)}) > setMethod(".rbind_pair", c("mdm", "ANY"), > function(x,y){.mdm_rbind_error(x,y)}) > setMethod(".rbind_pair", c("ANY", "mdm"), > function(x,y){.mdm_rbind_error(x,y)}) > setMethod(".rbind_pair", c("ANY", "ANY"), > function(x,y){.mdm_rbind_error(x,y)}) > > ".mdm_rbind_error" <- function(x,y){ > stop("an mdm object may only be rbinded to another mdm object") > } > > ".mdm.rbind_pair" <- function(x,y){ > stopifnot(compatible(x,y)) > mdm(rbind(xold(x),xold(y)),c(types(x),types(y))) # this is the "meat" of > the rbind functionality > } > > setGeneric("rbind") > setMethod("rbind", signature="mdm", function(x, ...) { > if(nargs()<3) > .mdm_rbind_pair(x,...) > else > .mdm_rbind_pair(x, Recall(...)) > }) > > > But > > > LE223:~/packages% sudo R CMD INSTALL ./multivator > [snip] > Creating a new generic function for "tail" in "multivator" > Error in conformMethod(signature, mnames, fnames, f, fdef, definition) : > in method for ‘rbind’ with signature ‘deparse.level="mdm"’: formal > arguments (... = "mdm", deparse.level = "mdm") omitted in the method > definition cannot be in the signature Hi Robin try getGeneric("rbind") and showMethods("rbind") after your setGeneric;. The generic is dispatching on 'deparse.level'. 'deparse.level' is missing from your method definition, and so can't be used as the signature for your method. Try to set the ... explicitly as the signature to be used for dispatch. setGeneric("rbind", function(..., deparse.level=1) standardGeneric("rbind"), signature = "...") Martin > Error : unable to load R code in package 'multivator' > ERROR: lazy loading failed for package ‘multivator’ > * removing ‘/usr/local/lib64/R/library/multivator’ > * restoring previous ‘/usr/local/lib64/R/library/multivator’ > LE223:~/packages% > > > I can't understand what the error message is trying to say. > > Can anyone advise on a fix for this? > > -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 methods for rbind()
Thank you very much for this Martin. It works! There were two gotchas: 1. One has to add 'deparse.level=1' to the setMethod() function argument list 2. Adding deparse.level=1 increments nargs() ...so the 3 should be 4. But now it works! Best wishes Robin On 26/10/10 13:49, Martin Morgan wrote: > On 10/26/2010 03:53 AM, Robin Hankin wrote: > >> Hello. >> >> I am trying to write an S4 method for rbind(). I have a class of objects >> called 'mdm', and I want to be able to rbind() them to one another. >> >> I do not want the method for rbind() to coerce anything to an mdm object. >> I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any >> number of arguments]. >> >> This is what I have so far: >> >> >> setGeneric(".rbind_pair", function(x,y){standardGeneric(".rbind_pair")}) >> setMethod(".rbind_pair", c("mdm", "mdm"), function(x,y){.mdm.cPair(x,y)}) >> setMethod(".rbind_pair", c("mdm", "ANY"), >> function(x,y){.mdm_rbind_error(x,y)}) >> setMethod(".rbind_pair", c("ANY", "mdm"), >> function(x,y){.mdm_rbind_error(x,y)}) >> setMethod(".rbind_pair", c("ANY", "ANY"), >> function(x,y){.mdm_rbind_error(x,y)}) >> >> ".mdm_rbind_error" <- function(x,y){ >> stop("an mdm object may only be rbinded to another mdm object") >> } >> >> ".mdm.rbind_pair" <- function(x,y){ >> stopifnot(compatible(x,y)) >> mdm(rbind(xold(x),xold(y)),c(types(x),types(y))) # this is the "meat" of >> the rbind functionality >> } >> >> setGeneric("rbind") >> setMethod("rbind", signature="mdm", function(x, ...) { >> if(nargs()<3) >> .mdm_rbind_pair(x,...) >> else >> .mdm_rbind_pair(x, Recall(...)) >> }) >> >> >> But >> >> >> LE223:~/packages% sudo R CMD INSTALL ./multivator >> [snip] >> Creating a new generic function for "tail" in "multivator" >> Error in conformMethod(signature, mnames, fnames, f, fdef, definition) : >> in method for ‘rbind’ with signature ‘deparse.level="mdm"’: formal >> arguments (... = "mdm", deparse.level = "mdm") omitted in the method >> definition cannot be in the signature >> > Hi Robin > > try getGeneric("rbind") and showMethods("rbind") after your setGeneric;. > The generic is dispatching on 'deparse.level'. 'deparse.level' is > missing from your method definition, and so can't be used as the > signature for your method. Try to set the ... explicitly as the > signature to be used for dispatch. > > setGeneric("rbind", > function(..., deparse.level=1) standardGeneric("rbind"), > signature = "...") > > Martin > > >> Error : unable to load R code in package 'multivator' >> ERROR: lazy loading failed for package ‘multivator’ >> * removing ‘/usr/local/lib64/R/library/multivator’ >> * restoring previous ‘/usr/local/lib64/R/library/multivator’ >> LE223:~/packages% >> >> >> I can't understand what the error message is trying to say. >> >> Can anyone advise on a fix for this? >> >> >> > > -- Robin K. S. Hankin Uncertainty Analyst University of Cambridge 19 Silver Street Cambridge CB3 9EP 01223-764877 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Reference classes
What you've written will certainly generate an infinite recursion. How could it not? Specifying an accessor function says to the system "Any reference to this field should be evaluated by calling this function." But then you refer to the field in the function itself, which will result in a call to the function, which Accessor functions are typically used when the field is a proxy for some data stored in a less convenient form (in a C++ object in the case of Rcpp). As a self-contained example: > ss <- setRefClass("silly", fields = list(now = function(value) { + if(missing(value)) Sys.time() + else stop("You can't change the time, dummy!") + })) > s1 <- ss$new() > s1$now [1] "2010-10-26 08:50:36 PDT" > s1$now <- "Never" Error in function (value) : You can't change the time, dummy! On 10/26/10 4:57 AM, Jon Clayden wrote: On 23 October 2010 00:52, Jon Clayden wrote: On 22 October 2010 18:55, John Chambers wrote: As a suggestion, it would be nice if the accessors() method could be used to create just "getters" or just "setters" for particular fields, although I realise this can be worked around by removing the unwanted methods afterwards. In other words, read-only fields. There is a facility for that implemented already, but it didn't yet make it into the documentation, and it could use some more testing. The generator object has a $lock() method that inserts a write-once type of method for one or more fields. Example: fg<- setRefClass("foo", list(bar = "numeric", flag = "character"), + methods = list( + addToBar = function(incr) { + b = bar + incr + bar<<- b + b + } + )) fg$lock("bar") ff = new("foo", bar = 1.5) ff$bar<- 2 Error in function (value) : Field "bar" is read-only A revision will document this soon. (And no, the workaround is not to remove methods. To customize access to a field, the technique is to write an accessor function for the field that, in this case, throws an error if it gets an argument. See the documentation for the fields argument. The convention here and the underlying mechanism are taken from active bindings for environments.) OK, yes - I see. This is clearly much less superficial than removing the setter method for a field which can be directly set anyway. I'll have to try out field accessor functions and get a feel for the semantics. Unfortunately, I'm having difficulty working out the accessor function approach. I've looked in the Rcpp package for examples, but it doesn't seem to use this feature. If I define Foo<- setRefClass("Foo", fields=list(bar=function (newBar) { if (missing(newBar)) bar else stop("bar is read-only") }), methods=list(barExists=function () print(exists("bar" then I can't access the value of "bar" due to infinite recursion. Using ".self$bar" in the accessor produces the same effect. f<- Foo$new() f$barExists() [1] TRUE f$bar Error: evaluation nested too deeply: infinite recursion / options(expressions=)? f$bar() Error: evaluation nested too deeply: infinite recursion / options(expressions=)? I can guess why this is happening (accessing "bar" within the accessor calls itself), but how can I get at the value of "bar" within the accessor without this occurring? The other problem is that I can't even set a value at the time of creation of the object, viz. f<- Foo$new(bar=2) Error in function (newBar) : bar is read-only Is there a way to test whether "bar" has already been set in the accessor, so that I can allow it to be set once? (I know lock() allows this, but it would be useful to be able to replicate the effect using accessors, so that it can be generalised further where needed.) Clearly, exists("bar") doesn't do this, as seen above -- presumably because it sees the method rather than the field, or there is some default value. Thanks in advance, Jon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] cannot connect to an FTP server with long HELLO message
Hi, On 10/26/2010 02:01 AM, Prof Brian Ripley wrote: The example works for me (eventually: the site was very slow to respond) --- nanoftp reads the response in 1024 byte chunks and makes sense of it. We do provide debugging facilites via, say, options(internet.info=0, warn=1, warning.length=4000) which may help you debug this. Simply fiddling with the buffer size doesn't help understanding and might well break something else. I'll have a second look at this and will try to provide more information. Thanks for your answer. The code is essentially unchanged since 2006 when inter alia the buffer size was doubled to 1024 (because libxml2 2.6.6 did), and AFAICS is essentially unchanged in the current snapshots of libxml2. I can surmise that the nanoftp C code might break if the actual control code spanned 1024-byte chunks, but it needs someone with the problem to debug in more detail. This seems to be actually the case. I've added some printf statements to the nanoftp module and what happens to the 220 code is the same as here: host <- "ftp.ncbi.nih.gov" get.ftp.hello <- function(host) { port <- 21L sk <- make.socket(host, port) on.exit(close.socket(sk)) output <- character(0) i <- 1L repeat { ss <- read.socket(sk, maxlen = 1024) if (ss == "") break cat(i, ": ", ss, "\n", sep="") i <- i + 1L output <- append(output, ss) } output } > hello <- get.ftp.hello(host) 1: 220- 2: Warning Notice! This is a U.S. Gov 3: ernment computer system, which may be accessed and used only for authorized Government business by authorized personnel. Unauthorized access or use of this computer system may subject violators to criminal, civil, and/or administrative action. All information on this computer system may be intercepted, recorded, read, copied, and disclosed by and to authorized personnel for official purposes, including criminal investigations. Such information includes sensitive data encrypted to comply with confidentiality and privacy requirements. Access or use of this computer system by any person, whether authorized or unauthorized, constitutes consent to these terms. There is no right of privacy in this system. --- Welcome to the NCBI ftp server! The official anonymous access URL is ftp://ftp.ncbi.nih.gov Public data may be downloaded by logging in as "anonymous" using your E-mail address as a password. Please see ftp://ftp.ncbi.nih.gov/README.ftp for hints on large file transfers 22 4: 0 FTP Server ready. 5: 421 Login Timeout (60 seconds): closing control connection. > nchar(hello) [1]6 40 1024 21 61 But there seems to be something else going on, because, as I mentioned earlier, sometimes (once every 20 attempts or so) I get a segfault when trying to open this url with url(). Cheers, H. On Thu, 21 Oct 2010, Hervé Pagès wrote: Hi, Trying to access files on the ftp server at ftp.ncbi.nih.gov will either give a time out or sometimes even a segfault on Linux. The 2 following methods give the same results: f <- url("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/GDS10.soft.gz";, open="r") download.file("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/GDS10.soft.gz";, destfile=tempfile()) I've tried one or the other method with all release versions >= 2.8 and with current R devel and they always fail to connect to this FTP server. What's particular about this FTP server is that it sends a long HELLO message before it finally sends the 220 control code. Using the Unix ftp client: Well, one of many such. - hpa...@latitude:~$ ftp ftp.ncbi.nih.gov Connected to ftp.ncbi.nih.gov. 220- Warning Notice! This is a U.S. Government computer system, which may be accessed and used only for authorized Government business by authorized personnel. Unauthorized access or use of this computer system may subject violators to criminal, civil, and/or administrative action. All information on this computer system may be intercepted, recorded, read, copied, and disclosed by and to authorized personnel for official purposes, including criminal investigations. Such information includes sensitive data encrypted to comply with confidentiality and privacy requirements. Access or use of this computer system by any person, whether authorized or unauthorized, constitutes consent to these terms. There is no right of privacy in this system. --- Welcome to the NCBI ftp server! The official anonymous access URL is ftp://ftp.ncbi.nih.gov Public data may be downloaded by logging in as "anonymous" using your E-mail address as a password. Please see ftp://ftp.ncbi.nih.gov/README.ftp for hints on large file transfers 220 FTP Server ready. - This seems to cause problems to the nanoftp module (src/modules/internet/nanoftp.c) used by url() and download.file() as it doesn't seem to be able to catch the
[Rd] Link to R 2.12.0 patched build for windows
On the download page for windows builds of R 2.12.0: http://cran.r-project.org/bin/windows/base/ The link for "r-patched snapshot build" goes to: http://cran.r-project.org/bin/windows/base/rpatched.html which has a link for R-2.11.1 patched. I believe that link should go to: http://cran.r-project.org/bin/windows/base/rtest.html which does have a link for R-2.12.0 patched. Or the "rpatched.html" page should be updated with a link to R-2.12.0 patched. -- Brian S. Diggs, PhD Senior Research Associate, Department of Surgery Oregon Health & Science University __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] windows 64-bit package build on 32-bit machine
Hello, Is it possible to build a 64-bit package on a 32-bit machine on windows? I can cross-compile for x86, x86_64, and ppc on a 32-bit OS X machine. And it looks like I could build a 32-bit library on a 64-bit windows machine. But it doesn't look possible to build a 64-bit library on a 32-bit windows machine? Thanks, --Michael __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] windows 64-bit package build on 32-bit machine
On Oct 26, 2010, at 9:04 PM, Michael Spiegel wrote: > Hello, > > Is it possible to build a 64-bit package on a 32-bit machine on > windows? I can cross-compile for x86, x86_64, and ppc on a 32-bit OS X > machine. And it looks like I could build a 32-bit library on a 64-bit > windows machine. But it doesn't look possible to build a 64-bit > library on a 32-bit windows machine? > Why not? It works for me without problems ... Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] windows 64-bit package build on 32-bit machine
Hmm. So our package does not have no src/Makefile.win and only an empty configure.win. We usually build a binary version with R CMD INSTALL --build. R --arch x64 CMD INSTALL --build yields the message "The system cannot find the path specified." On Tue, Oct 26, 2010 at 10:41 PM, Simon Urbanek wrote: > > On Oct 26, 2010, at 9:04 PM, Michael Spiegel wrote: > >> Hello, >> >> Is it possible to build a 64-bit package on a 32-bit machine on >> windows? I can cross-compile for x86, x86_64, and ppc on a 32-bit OS X >> machine. And it looks like I could build a 32-bit library on a 64-bit >> windows machine. But it doesn't look possible to build a 64-bit >> library on a 32-bit windows machine? >> > > Why not? It works for me without problems ... > > Cheers, > Simon > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] windows 64-bit package build on 32-bit machine
Hi Michael, My understanding is that this should work. According to section "D.4.2 64-bit toolchain" of the "R Installation and Administration" manual: The toolchain we use is technically a cross-compiler: the tools run under 32-bit Windows but produce code to run under 64-bit Windows. BTW, as reported here https://stat.ethz.ch/pipermail/r-devel/2010-June/057668.html in June, the following links in the Table of Contents of this manual are broken: 3.1.10 64-bit Windows builds C.4.1 64-bit Leopard builds D.4.1 32-bit toolchain D.4.2 64-bit toolchain Seems like only the sections with a title starting with a digit have this problem. Cheers, H. On 10/26/2010 06:04 PM, Michael Spiegel wrote: Hello, Is it possible to build a 64-bit package on a 32-bit machine on windows? I can cross-compile for x86, x86_64, and ppc on a 32-bit OS X machine. And it looks like I could build a 32-bit library on a 64-bit windows machine. But it doesn't look possible to build a 64-bit library on a 32-bit windows machine? Thanks, --Michael __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpa...@fhcrc.org Phone: (206) 667-5791 Fax:(206) 667-1319 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] windows 64-bit package build on 32-bit machine
On Tue, 26 Oct 2010, Simon Urbanek wrote: On Oct 26, 2010, at 9:04 PM, Michael Spiegel wrote: Hello, Is it possible to build a 64-bit package on a 32-bit machine on windows? I can cross-compile for x86, x86_64, and ppc on a 32-bit OS X machine. And it looks like I could build a 32-bit library on a 64-bit windows machine. But it doesn't look possible to build a 64-bit library on a 32-bit windows machine? Why not? It works for me without problems ... Depends what is meant by 'build': I would pretty sure it does not mean 'R CMD build': it might mean R CMD INSTALL --build. What you can't do is test loading, so you need INSTALL --no-test-load. Multi-arch packages only test loading for the primary architecture, which is why you can install for ppc on Intel Mac OS X machines. So you can INSTALL bi-arch packages on Windows on an i386 OS, but you cannot fully install a '64-bit package on a 32-bit machine on windows'. Given that almst everybody who wants to distribute 64-bit packages nowadays wants bi-arch packages and needs access to a 64-bit OS for testing, we don't bother to test and document what other combinations might be possible. (We don't make it easy for you to install a bi-arch R on a 32-bit OS either, to avoid end-user mistakes leading to increased support demands.) -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Link to R 2.12.0 patched build for windows
Wrong list. Only the person who maintains that area (documented on the page above) can change this, and he is aware of it. It is never correct to report problems about the CRAN website on R-devel: there is a contact address for the CRAN webmasters (cran-ad...@r-project.org as I recall). On Tue, 26 Oct 2010, Brian Diggs wrote: On the download page for windows builds of R 2.12.0: http://cran.r-project.org/bin/windows/base/ The link for "r-patched snapshot build" goes to: http://cran.r-project.org/bin/windows/base/rpatched.html which has a link for R-2.11.1 patched. I believe that link should go to: http://cran.r-project.org/bin/windows/base/rtest.html That page should not currently be active. which does have a link for R-2.12.0 patched. Or the "rpatched.html" page should be updated with a link to R-2.12.0 patched. -- Brian S. Diggs, PhD Senior Research Associate, Department of Surgery Oregon Health & Science University __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel