Skip to content

[R-pkg-devel] AppVeyor with LinkingTo: field

9 messages · Gábor Csárdi, Tim Keitt, Dirk Eddelbuettel

#
My tests are failing on AppVeyor because BH is not available. How do I
force AppVeyor to install the package? It is in the LinkingTo: field, but
my tests call sourceCpp and it fails there. The Cpp code has the "depends"
directive for BH. It is either not being installed or is absent from the
test environment. Thought I would try to modify .appveyor.yml and force a
BH install. What's the trick?

THK

http://www.keittlab.org/
#
You need to put it in 'Imports' as well. Whatever is in LinkingTo, must be
in Imports.

Gabor
On Mon, Feb 13, 2017 at 3:05 PM, Tim Keitt <tkeitt at utexas.edu> wrote:

            

  
  
#
On 13 February 2017 at 09:05, Tim Keitt wrote:
| My tests are failing on AppVeyor because BH is not available. How do I
| force AppVeyor to install the package? It is in the LinkingTo: field, but
| my tests call sourceCpp and it fails there. The Cpp code has the "depends"
| directive for BH. It is either not being installed or is absent from the
| test environment. Thought I would try to modify .appveyor.yml and force a
| BH install. What's the trick?

It is a design shortcoming in R's dependency mechanism.  A 'LinkingTo:' used
this way is a 'Build-Depends' but not recognised by the code doing the
installations for you which installs only (run-time) Depends.

I don't use AppVeyor, and when I use Travis with my maintained fork of the
initial scheme [1], I install packages explicitly.  I like having that control,
and that is one of the reason I use that scheme.

Dirk

[1] http://eddelbuettel.github.io/r-travis/
#
On Mon, Feb 13, 2017 at 9:11 AM, G?bor Cs?rdi <csardi.gabor at gmail.com>
wrote:
That did the trick. Thanks.

I am almost there -- only failing on devel in Travis CI. It failing at the
"R CMD build" phase.

* installing *source* package ?odeintr? ...
I think my PKG_CPPFLAGS or some such is not right. Is there something about
the devel branch of R I am missing?

THK

http://www.keittlab.org/
#
(off-list)
On 13 February 2017 at 15:11, G?bor Cs?rdi wrote:
| You need to put it in 'Imports' as well. Whatever is in LinkingTo, must be
| in Imports.

Not true.

So if you could not tic
edd at max:~/git$ cat anytime/DESCRIPTION
Package: anytime
Type: Package
Title: Anything to 'POSIXct' or 'Date' Converter
Version: 0.2.1
Date: 2017-02-09
Author: Dirk Eddelbuettel
Maintainer: Dirk Eddelbuettel <edd at debian.org>
Description: Convert input in any one of character, integer, numeric, factor,
 or ordered type into 'POSIXct' (or 'Date') objects, using one of a number of
 predefined formats, and relying on Boost facilities for date and time parsing.
URL: http://dirk.eddelbuettel.com/code/anytime.html
BugReports: https://github.com/eddelbuettel/anytime/issues
License: GPL (>= 2)
Encoding: UTF-8
Depends: R (>= 3.2.0)
Imports: Rcpp (>= 0.12.9)
LinkingTo: Rcpp (>= 0.12.9), BH
Suggests: gettz
RoxygenNote: 6.0.0
edd at max:~/git$ 

Has LinkingTo:, does not have Imports:.

Dirk
#
On Mon, Feb 13, 2017 at 10:36 AM, Dirk Eddelbuettel <edd at debian.org> wrote:

            
It seems to be a work-around for Travis, but as you say not a general
packaging requirement.

THK

http://www.keittlab.org/
#
On Mon, Feb 13, 2017 at 10:31 AM, Tim Keitt <tkeitt at utexas.edu> wrote:

            
Known Travis bug.

Finally everything works!

THK

http://www.keittlab.org/
#
Indeed, I am sorry, misremembered.

G.
On Mon, Feb 13, 2017 at 4:36 PM, Dirk Eddelbuettel <edd at debian.org> wrote: