[R-pkg-devel] openMP/reduction statement causes build crash on travis-ci
Dirk Eddelbuettel
edd at debian.org
Wed Aug 3 14:38:53 CEST 2016
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
More information about the R-package-devel
mailing list