Dear List, I have been experimenting with building packages from sources, having previously relied upon the binaries. I downloaded and installed all the tools suggested in http://www.stats.ox.ac.uk/pub/Rtools/ , including ActivePerl 5.6.1.631. I also downloaded the HTML Help workshop exe and installed it. During install though, a message popped up to say that I had a newer version of the workshop installed, clicking OK allowed the installation to proceed and end with a message saying that the installation had completed. I placed all the relevant info in my path, sh.exe in c:\bin, etc, and edited MkRules to reflect the location of the HTML Help Workshop. I was able to make libR.a without any problems following readme.packages. I am using rw1040, under Win2000(SP2), having installed R from the SetupR binary. To test things were working I tried to install some packages from CRAN. I downloaded the tar files from CRAN and unpacked them into R-HOME\rw1040\src\gnuwin32. I then ran Rcmd INSTALL on the directory containing the package. This is where I started to have problems: The following is the output from Rcmd INSTALL when trying to install package vegan: C:\R\rw1040\src\gnuwin32>Rcmd INSTALL C:\R\rw1040\src\gnuwin32\vegan make: Entering directory `/cygdrive/c/R/rw1040/src/gnuwin32' make DLLNM= \ -C C:/R/rw1040/src/gnuwin32/vegan PKG=vegan RHOME=C:/R/rw1040 RLIB=C:/R/rw1040 /library \ -f C:/R/rw1040/src/gnuwin32/MakePkg make[1]: Entering directory `/cygdrive/c/R/rw1040/src/gnuwin32/vegan' ---------- Making package vegan ------------ mkdir -p C:/R/rw1040/library/vegan cp -r ./INDEX ./TITLE ./WhatsNew.txt C:/R/rw1040/library/vegan/ adding build stamp to DESCRIPTION making DLL make[2]: Entering directory `/cygdrive/c/R/rw1040/src/gnuwin32/vegan/src' make[3]: `libR.a' is up to date. make[2]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32/vegan/src' DLL made mkdir -p C:/R/rw1040/library/vegan/libs cp src/vegan.dll C:/R/rw1040/library/vegan/libs/vegan.dll installing R files installing data files installing man source files make[1]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32/vegan' make -C ./help RHOME=C:/R/rw1040 PKGDIR=C:/R/rw1040/src/gnuwin32 RLIB=C:/R/rw104 0/library help-vegan make[1]: Entering directory `/cygdrive/c/R/rw1040/src/gnuwin32/help' PERL5LIB=C:/R/rw1040/share/perl perl ../../../share/perl/build-help-windows.pl -txt -html -example -latex C:/R/rw1040/src/gnuwin32/vegan C:/R/rw1040/library >>> Building/Updating help pages for package `vegan' Formats: text html latex example decorana text html latex example decostand text html latex example diversity text html latex example initMDS text html latex example postMDS text html latex example procrustes text html latex example rankindex text html latex example varechem text html latex example vectorfit text html latex example vegdist text html latex example wascores text html latex example make[1]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32/help' make -C ./help RHOME=C:/R/rw1040 PKGDIR=C:/R/rw1040/src/gnuwin32 RLIB=C:/R/rw104 0/library contents-vegan make[1]: Entering directory `/cygdrive/c/R/rw1040/src/gnuwin32/help' PERL5LIB=C:/R/rw1040/share/perl perl \ ../../../share/perl/Rd2contents.pl \ --os=windows -o C:/R/rw1040/library/vegan/CONTENTS C:/R/rw1040/src/gnuwin32/ve gan cat C:/R/rw1040/library/*/CONTENTS > C:/R/rw1040/doc/html/search/index.txt PERL5LIB=C:/R/rw1040/share/perl perl ../../../share/perl/build-help-windows.pl -htmllists make[1]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32/help' make -C ./help RHOME=C:/R/rw1040 PKGDIR=C:/R/rw1040/src/gnuwin32 RLIB=C:/R/rw104 0/library chm-vegan make[1]: Entering directory `/cygdrive/c/R/rw1040/src/gnuwin32/help' PERL5LIB=C:/R/rw1040/share/perl perl ../../../share/perl/build-help-windows.pl -chm C:/R/rw1040/src/gnuwin32/vegan C:/R/rw1040/library >>> Building/Updating help pages for package `vegan' Formats: chm make --no-print-directory -C C:/R/rw1040/src/gnuwin32/vegan/chm -f C:/R/rw1040/ src/gnuwin32/help/Makefile vegan.chm hhc vegan.hhp make[2]: hhc: Command not found make[2]: [vegan.chm] Error 127 (ignored) mkdir -p C:/R/rw1040/library/vegan/chtml cp C:/R/rw1040/src/gnuwin32/vegan/chm/vegan.chm C:/R/rw1040/library/vegan/chtml cp: cannot stat `C:/R/rw1040/src/gnuwin32/vegan/chm/vegan.chm': No such file or directory make[1]: *** [chm-vegan] Error 1 make[1]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32/help' make: *** [pkg-vegan] Error 2 make: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32' *** Installation of vegan failed *** It seems to be getting as far as doing the compiled HTML help and then not finding a particular file. I'm am at a loss as to how to continue. Can anyone suggest what I am doing wrong, or suggest what to do next? I have tried this with a number of package sources from CRAN, and all fail at the same point, with the same message. Because the CHM thing seemed to be the problem, I have installed the HTMLHelp workshop into a different directory on my disk, altered MkRules and tried Rcmd again, but the same thing happens. Many thanks for your help, Gavin Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Problem building packages from source (WIN32)
5 messages · Peter Dalgaard, Brian Ripley, Gavin Simpson
Gavin Simpson <gavin.simpson at ucl.ac.uk> writes:
hhc vegan.hhp make[2]: hhc: Command not found make[2]: [vegan.chm] Error 127 (ignored)
It seems to be getting as far as doing the compiled HTML help and then not finding a particular file. I'm am at a loss as to how to continue. Can anyone suggest what I am doing wrong, or suggest what to do next? I have tried this with a number of package sources from CRAN, and all fail at the same point, with the same message. Because the CHM thing seemed to be the problem, I have installed the HTMLHelp workshop into a different directory on my disk, altered MkRules and tried Rcmd again, but the same thing happens.
This looks like a problem with your PATH setting. It expects to be able to invoke the help compiler from a command line with just "hhc". Set in autoexec.bat (if that still exists in W2000).
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
The short answer, from readme.packages, All of these need to be installed and in your path, and the appropriate environment variables set. Clearly hhc is not in your path. The setting in MkRules is only used to find the C header files.
Brian D. Ripley, ripley at 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Many thanks to Peter Dalgaard and Brian Ripley for there incredibly quick and accurate identification of my error. I hadn't put the path to hhc in my path, hence it wouldn't run. Having fixed this, things seem to run alright. Is there a way to check to see if everything has worked as required, or is there something more I should do after Rcmd INSTALL pkg as a matter of course? There still seems to be an error (reported as ignored), and I wondered if this can be checked? <snip> Created c:\R\rw1040\src\gnuwin32\vegan\chm\vegan.chm, 42,50 Compression decreased file by 19,366 bytes. make[2]: [vegan.chm] Error 1 (ignored) mkdir -p C:/R/rw1040/library/vegan/chtml cp C:/R/rw1040/src/gnuwin32/vegan/chm/vegan.chm C:/R/rw1040 make[1]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin make: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32' By the way, as Uwe Ligges indicated in a private email, putting the path information in autoexec.bat won't work under Win2000. The way to do it is in Control Panel > System > (click) Advanced Tab > Environmental Variables... , choose path from the System Variables window and click Edit..., and the add the new path information in the textbox, separating entries with a semi colon ";" Cheers Gav -----Original Message----- From: pd at pubhealth.ku.dk [mailto:pd at pubhealth.ku.dk] On Behalf Of Peter Dalgaard BSA Sent: 17 January 2002 17:02 To: gavin.simpson Cc: r-help Subject: Re: [R] Problem building packages from source (WIN32) Gavin Simpson <gavin.simpson at ucl.ac.uk> writes:
hhc vegan.hhp make[2]: hhc: Command not found make[2]: [vegan.chm] Error 127 (ignored)
It seems to be getting as far as doing the compiled HTML help and then
not finding a particular file. I'm am at a loss as to how to continue. Can anyone suggest what I am doing wrong, or suggest what to
do next? I have tried this with a number of package sources from CRAN, and all fail at the same point, with the same message. Because the CHM thing seemed to be the problem, I have installed the HTMLHelp workshop into a different directory on my disk, altered MkRules and tried Rcmd again, but the same thing happens.
This looks like a problem with your PATH setting. It expects to be able to invoke the help compiler from a command line with just "hhc". Set in autoexec.bat (if that still exists in W2000).
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 17 Jan 2002, Gavin Simpson wrote:
Many thanks to Peter Dalgaard and Brian Ripley for there incredibly quick and accurate identification of my error. I hadn't put the path to hhc in my path, hence it wouldn't run. Having fixed this, things seem to run alright. Is there a way to check to see if everything has worked as required, or is there something more I should do after Rcmd INSTALL pkg as a matter of course? There still seems to be an error (reported as ignored), and I wondered if this can be checked?
That's a bug in hhc.exe which always returns a non-zero error code. That's documented in the help/Makefile, as I recall. Double-click on the foo.chm installed and check it works is the only test. But in hundreds of tests I have never seen hhc complete and produce an invalid .chm. I always run make pkgcheck-foo after Rcmd INSTALL foo, which checks all the examples.
<snip> Created c:\R\rw1040\src\gnuwin32\vegan\chm\vegan.chm, 42,50 Compression decreased file by 19,366 bytes. make[2]: [vegan.chm] Error 1 (ignored) mkdir -p C:/R/rw1040/library/vegan/chtml cp C:/R/rw1040/src/gnuwin32/vegan/chm/vegan.chm C:/R/rw1040 make[1]: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin make: Leaving directory `/cygdrive/c/R/rw1040/src/gnuwin32' By the way, as Uwe Ligges indicated in a private email, putting the path information in autoexec.bat won't work under Win2000. The way to do it is in Control Panel > System > (click) Advanced Tab > Environmental Variables... , choose path from the System Variables window and click Edit..., and the add the new path information in the textbox, separating entries with a semi colon ";"
Or since you must run this from a terminal (commands prompt or whatever) you can have a small batch file which sets the path as needed for building R packages. That's what I do, as otherwise the path can get too long.
From what I read Windows NT variants accept paths of more than 262 chars,
but only parse the first 262 characters (which explains a problem Marc Feldesman had with HHW a long time ago).
Brian D. Ripley, ripley at 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._