From murdoch.duncan at gmail.com  Wed Oct  9 18:34:49 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Wed, 09 Oct 2013 12:34:49 -0400
Subject: [Rd] "Failed to locate the 'texi2pdf' output file"
In-Reply-To: <1461841680.1235725.1381257269992.JavaMail.root@fhcrc.org>
References: <1461841680.1235725.1381257269992.JavaMail.root@fhcrc.org>
Message-ID: <525585A9.8010903@gmail.com>

On 08/10/2013 2:34 PM, Dan Tenenbaum wrote:
> Just thought I would mention that the issue below (and in https://stat.ethz.ch/pipermail/r-devel/2013-April/066318.html) is still not resolved.

The bug reporting system is back up, so if you haven't filed a bug 
report on this, please do.

If you have filed a bug report on it that doesn't include instructions 
to reproduce it, please add them.  Intermittent non-reproducible bugs 
are unlikely to be fixed.

Duncan Murdoch

>
> It hasn't been a big problem, but it potentially could be, if a critical package were to have this error on release day, then all its dependencies would fail to build, which would probably require us to postpone our release.
>
> See the complete thread (link above) for followup posts which establish that this has nothing to do with databases, sockets, or virus scanners, and occurs even in packages that have no dependencies or R code in them. The post below from Henrik points to a possible cause.
>
> Thanks,
> Dan
>
>
>
>
> On Fri, Apr 12, 2013 at 4:23 PM, Henrik Bengtsson <hb at biostat.ucsf.edu> wrote:
> > On Fri, Apr 12, 2013 at 3:53 PM, Kasper Daniel Hansen
> > <kasperdanielhansen at gmail.com> wrote:
> >> Dan,
> >>
> >> This error looks _very_ similar to what I reported regarding the use of
> >> 'foreach' inside a windows vignette, on the bioc-devel email list.  As you
> >> say, it looks funny that it lists the tex file, yet fails to find it.
> >
> > It's not looking for the TeX file, but the PDF file - that is what the
> > error message is referring to by "Failed to locate the 'texi2pdf'
> > output file".  [ Note that in this error message I use the term
> > "vignette" in a conceptual sense, not necessarily the vignette
> > *source* file (here *.Rnw) - maybe that is what is confusing. ]
> > Immediately after calling tools::texi2pdf("OrganismDbi.tex"), the code
> > tries to locate the texi2pdf output file, that is, 'OrganismDbi.pdf',
> > which it cannot find.  This indicates that tools::texi2pdf() gave an
> > error (an error message which is currently not reported/available),
> > which in turn indicates that the 'OrganismDbi.tex' file is
> > corrupt/incomplete.
> >
> >>
> >> The issue had to do with closing relevant connections (for foreach, this
> >> was a Windows issue because the default foreach backend on Windows uses
> >> connections).   For my particular case, solving it was a bit difficult
> >> because I could not just close all connections since a vignette is being
> >> run inside sink().
> >>
> >> The package name makes me suspect a database connection. As a starting
> >> point I suggest closing all existing connections in the vignette.
> >
> > I think it's worth looking into what Kasper says - that's hopefully the reason.
> >
> > /Henrik
> >
> > PS. I do find it odd that these issues starting to occur now, because
> > most of the vignette framework is performing the same steps as in R (<
> > 3.0.0).  The main difference is see is that it now validates/asserts
> > that the expected output file is there *immediately* after trying to
> > generate them (using weave, tangle, and texi2pdf).  If for some reason
> > texi2pdf generates the PDF in a background process which is not
> > completed in full when returning the control to R, then the PDF is not
> > there and you would get this error.  I don't know if this can happen.
> > The reason why I came to think of this is because I recall that I've
> > seen this behavior when using bitmap() and Ghostscript to create PNGs.
> >  Just a shot from the hip, though.
> >
> >>
> >> Kasper
> >>
> >>
> >>
> >> On Fri, Apr 12, 2013 at 5:34 PM, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
> >>
> >>> Hi,
> >>> Every day a few Bioconductor packages (different ones each day) fail
> >>> to build, on Windows only, with an error like this:
> >>>
> >>> D:\biocbld\bbs-2.13-bioc\meat>D:\biocbld\bbs-2.13-bioc\R\bin\R.exe CMD
> >>> build --keep-empty-dirs --no-resave-data OrganismDbi
> >>> [...]
> >>> Error in find_vignette_product(name, by = "texi2pdf", engine = engine) :
> >>>   Failed to locate the 'texi2pdf' output file (by engine
> >>> 'utils::Sweave') for vignette with name 'OrganismDbi'. The following
> >>> files exists in directory '.': 'OrganismDbi.Rnw', 'OrganismDbi.tex',
> >>> 'databaseTypes.pdf'
> >>> Calls: <Anonymous> -> find_vignette_product
> >>> Execution halted
> >>>
> >>> This is puzzling to me because I would have thought that
> >>> 'OrganismDbi.tex' was the file it was looking for, yet it says that
> >>> file exists.
> >>>
> >>> These build errors are transient...if I re-run the build, the error
> >>> does not recur. So I was hesitant to report the problem because can't
> >>> be reproduced consistently. Nevertheless it is a problem.
> >>>
> >>> > sessionInfo()
> >>> R version 3.0.0 (2013-04-03)
> >>> Platform: i386-w64-mingw32/i386 (32-bit)
> >>>
> >>> locale:
> >>> [1] LC_COLLATE=English_United States.1252
> >>> [2] LC_CTYPE=English_United States.1252
> >>> [3] LC_MONETARY=English_United States.1252
> >>> [4] LC_NUMERIC=C
> >>> [5] LC_TIME=English_United States.1252
> >>>
> >>> attached base packages:
> >>> [1] stats     graphics  grDevices utils     datasets  methods   base
> >>>
> >>> Thanks,
> >>> Dan
> >>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] "Failed to locate the 'texi2pdf' output file"
Duncan Murdoch