[R-pkg-devel] openMP/reduction statement causes build crash on travis-ci

Mark van der Loo mark.vanderloo at gmail.com
Wed Aug 3 15:22:45 CEST 2016


Thanks Dirk! that did it. I wasn't aware of the trusty 14.04 option.


Just adding

sudo: required
dist: trusty

at the top of my .travis.yaml solved it
https://docs.travis-ci.com/user/trusty-ci-environment/,


Cheers,
Mark



Op wo 3 aug. 2016 om 14:38 schreef Dirk Eddelbuettel <edd at debian.org>:

>
> On 3 August 2016 at 08:13, Mark van der Loo wrote:
> | Dear pkg developers,
> |
> |
> | I'm working on a package using C code and openMP. The package builds and
> | tests fine on my own machine[1] and also on r-hub[2]. However on
> travis-ci
> | the build crashes[3] with the following message (plus a few similar):
> |
> | gower.c:297:29: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, or
> ‘||’
> | before ‘min’
> |
> | The line in question is an #omp pragma statement:
> |
> |   #pragma omp for reduction(min:imin), reduction(max:imax)
> |
> |
> | I am using #pragma omp statements all over the place and this is the only
> | type causing crashes. I'm guessing it has something to do with travis
> | building on a 12.04 ubuntu VM with a rather old  gcc (4.6.3).
> |
> | So I have two questions:
> |
> | 1. Has anyone else seen this? Or am I missing something?
> | 2. Is there a workaround, or should I just go for another build service
> | (which one)?
>
> You can actually switch to 'Trusty' aka 14.04.
>
> That has been around for a bit, and AFAIK works with both the old scheme
> (ie
> r-travis) or the new scheme. [ I am partial to the old scheme which I now
> use
> via this fork http://eddelbuettel.github.io/r-travis/ -- and my drat and
> digest packages were the first to adopt it. ]
>
> We can take this off-line, but this should work.  I first used this when I
> needed g++-4.8 and I am pretty sure I have a .travis.yml somewhere using
> g++-4.9 because it was needed in one project.  "Yes we can."
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list