Skip to content

[Rcpp-devel] Work-around for Stangle failure on Rcpp-modules.Rnw?

9 messages · Dirk Eddelbuettel, Douglas Bates

#
I have been unable to install Rcpp SVN revision 1758.  It fails to
build the package indices with error message

** building package indices ...
Error : running Stangle on vignette
'/home/bates/sloc/Rcpp/inst/doc/Rcpp-modules.Rnw' failed with message:
invalid value for 'lang' : cpp
ERROR: installing package indices failed

Can anyone suggest a work-around?
#
On 28 June 2010 at 09:19, Douglas Bates wrote:
| I have been unable to install Rcpp SVN revision 1758.  It fails to
| build the package indices with error message
| 
| ** building package indices ...
| Error : running Stangle on vignette
| '/home/bates/sloc/Rcpp/inst/doc/Rcpp-modules.Rnw' failed with message:
| invalid value for 'lang' : cpp
| ERROR: installing package indices failed
| 
| Can anyone suggest a work-around?

I have had no issues at all on Ubuntu 10.4 / amd64 with either g++-4.3 or
g++-4.4 all morning.

Exactly how are you invoking this?  The install step should not re-process
the pdf files.

And for what it is worth, I can also do

    cd inst/doc && make Rcpp-sugar.pdf 

just fine.
#
On Mon, Jun 28, 2010 at 9:45 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
It is Stangle, not Sweave that is causing the problem and I am just running

R CMD INSTALL -c $RCPP_SRC
As mentioned above, producing the PDF files is not the issue with the
INSTALL process but nonetheless I am glad to receive that information.
 I am able to build the PDF files for Rcpp-sugar but not for Rcpp-FAQ,
Rcpp-extending and Rcpp-package.  The logs from those attempts look
like this

$ make Rcpp-extending.pdf
rm Rcpp-extending.Rnw
cp -f Rcpp-extending/Rcpp-extending.Rnw .
Rscript -e "require(highlight); driver <- HighlightWeaveLatex(boxes =
TRUE, bg = 'white' ); Sweave( 'Rcpp-extending.Rnw', driver = driver );
"
Loading required package: highlight
Loading required package: tools
Loading required package: codetools
Loading required package: parser
Loading required package: Rcpp
Loading required package: methods
Writing to file Rcpp-extending.tex
Processing code chunks ...
 1 : term verbatim
Loading required package: inline
 3 : term verbatim
 4 : term tex
sh: highlight: not found

Error:  chunk 4
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open file '/tmp/Rtmp4wAPqs/file2eb141f2': No such file or directory
Execution halted
make: *** [Rcpp-extending.pdf] Error 1

Is there something in the highlight package that should install a
highlight script in $RHOME/bin?  If so I can reinstall the package as
root.
#
On 28 June 2010 at 10:00, Douglas Bates wrote:
| $ make Rcpp-extending.pdf
| rm Rcpp-extending.Rnw
| cp -f Rcpp-extending/Rcpp-extending.Rnw .
| Rscript -e "require(highlight); driver <- HighlightWeaveLatex(boxes =
| TRUE, bg = 'white' ); Sweave( 'Rcpp-extending.Rnw', driver = driver );
| "
| Loading required package: highlight
| Loading required package: tools
| Loading required package: codetools
| Loading required package: parser
| Loading required package: Rcpp
| Loading required package: methods
| Writing to file Rcpp-extending.tex
| Processing code chunks ...
|  1 : term verbatim
| Loading required package: inline
|  3 : term verbatim
|  4 : term tex
| sh: highlight: not found
  ^^^^^^^^^^^^^^^^^^^^^^^^

Please try 

    sudo apt-get install highlight

We do not pre-test for this as clearly as we maybe should. It is also 'just'
in the pdf-creation so we have not added it to SystemRequirements. Maybe we
should.

In short, 'highlight' has become overloaded as there is Romain's on CRAN and
Andre's in Debian and elsewhere.  Some of Andre's code may end up in Romain's
R package at which point we may no longer require the external binary.
#
On Mon, Jun 28, 2010 at 10:12 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
Thanks.  Once I have installed the Ubuntu package I can build the pdf files.

Regards,
Doug
#
On Mon, Jun 28, 2010 at 10:41 AM, Douglas Bates <bates at stat.wisc.edu> wrote:
And I'm not sure why but building the PDF files for the vignettes
bypasses the problem with Stangle so not I am successful at installing
the latest Rcpp.

Thanks.
Doug
#
On Mon, Jun 28, 2010 at 11:00 AM, Douglas Bates <bates at stat.wisc.edu> wrote:
s/not/now/
#
On 28 June 2010 at 11:00, Douglas Bates wrote:
| And I'm not sure why but building the PDF files for the vignettes
| bypasses the problem with Stangle so not I am successful at installing
| the latest Rcpp.

It is having the '-fake.Rnw' files there that do not require actual work:

edd at max:~/svn/rcpp/pkg$ ls -l1 Rcpp/inst/doc/Rcpp*sugar*
-rw-r--r-- 1 edd edd 245788 2010-06-28 09:44 Rcpp/inst/doc/Rcpp-sugar.pdf
-rw-r--r-- 1 edd edd     95 2010-06-28 09:44 Rcpp/inst/doc/Rcpp-sugar.Rnw

Rcpp/inst/doc/Rcpp-sugar:
total 28
-rw-r--r-- 1 edd edd    95 2010-06-19 08:20 Rcpp-sugar-fake.Rnw
-rw-r--r-- 1 edd edd 21908 2010-06-28 06:24 Rcpp-sugar.Rnw
edd at max:~/svn/rcpp/pkg$ 

The 'real' vignette is dies to Rcpp-sugar/Rcpp-sugar.Rnw but 'R does not
know' as it only sees the -fake variant in the directory above. Same for the
other vignettes.  

For check and build, however, the real McCoy reappears. Hence your earlier
failure over the inavialability of the not-exactly-well-documented
requirement.

Hth.
#
On 28 June 2010 at 11:20, Dirk Eddelbuettel wrote:
|
| On 28 June 2010 at 11:00, Douglas Bates wrote:
| | And I'm not sure why but building the PDF files for the vignettes
| | bypasses the problem with Stangle so not I am successful at installing
| | the latest Rcpp.
| 
| It is having the '-fake.Rnw' files there that do not require actual work:
| 
| edd at max:~/svn/rcpp/pkg$ ls -l1 Rcpp/inst/doc/Rcpp*sugar*
| -rw-r--r-- 1 edd edd 245788 2010-06-28 09:44 Rcpp/inst/doc/Rcpp-sugar.pdf
| -rw-r--r-- 1 edd edd     95 2010-06-28 09:44 Rcpp/inst/doc/Rcpp-sugar.Rnw
| 
| Rcpp/inst/doc/Rcpp-sugar:
| total 28
| -rw-r--r-- 1 edd edd    95 2010-06-19 08:20 Rcpp-sugar-fake.Rnw
| -rw-r--r-- 1 edd edd 21908 2010-06-28 06:24 Rcpp-sugar.Rnw
| edd at max:~/svn/rcpp/pkg$ 
| 
| The 'real' vignette is dies to Rcpp-sugar/Rcpp-sugar.Rnw but 'R does not

s/dies/due/

| know' as it only sees the -fake variant in the directory above. Same for the
| other vignettes.  
| 
| For check and build, however, the real McCoy reappears. Hence your earlier
| failure over the inavialability of the not-exactly-well-documented
| requirement.
| 
| Hth.
| 
| -- 
|   Regards, Dirk