Closed jdreyf closed 5 years ago
@jdreyf,
First off, thanks for the feedback. Secondly, those errors signify that >= C++14
is not being utilized. As cppreference states, std::make_unique
was not available until C++14
.
The downstream errors that occur in RcppThread
are probably not really errors and shouldn't concern you. They will probably disappear after the first errors are corrected. Generally, you should start debugging C++
code from the top as mentioned here cprogramming.
As you have already pointed out, Travis CI doesn't play well with anything requiring C++14
. In the article you linked it recommended using at least g++-6
which uses C++14
by default (N.B. you have only specified g++
).
I haven't tried this yet, but I think if you correct the compiler, these errors should go away.
When I get a chance, I will try to implement this fix and let you know what happens.
Thanks, Joseph Wood
Turns out it was better to remove the script from http://dirk.eddelbuettel.com/blog/2017/06/13/ & instead add instruction to install g++-6 in the Travis YML (I hadn't known how to do this before; https://thecoatlessprofessor.com/programming/selecting-an-alternative-compiler-for-r-package-testing-on-travis-ci), and now my package passes Travis-CI. Here's the new Travis YML:
language: r
sudo: required
warnings_are_errors: false
cache: packages
r_github_packages: jdreyf/ezlimma
bioc_packages: limma
# https://thecoatlessprofessor.com/programming/selecting-an-alternative-compiler-for-r-package-testing-on-travis-ci/
# makevars: https://github.com/stan-dev/rstan/issues/569
before_install:
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
- Rscript -e 'update.packages(ask = FALSE)'
- mkdir -p ~/.R
- echo "CXX14FLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -Wno-macro-redefined" >> ~/.R/Makevars
- echo "CXX14=g++ -std=c++1y -fPIC" >> ~/.R/Makevars
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
output:
pdf_document:
latex_engine: xelatex
after_success:
- Rscript -e 'covr::codecov()'
Thanks again for your response & excellent package!
My R package jdreyf/PANTS uses RcppAlgos and R CMD check passess, but I'm getting Travis-CI errors. I have already debugged Travis-CI issues with "Error in .shlib_internal(args): C++14 standard requested but CXX14 is not defined" (http://dirk.eddelbuettel.com/blog/2017/06/13/) but am now getting:
My Travis YML file is:
Thanks for this valuable package.