My package builds on Linux are failing with the following compilation error for rstan
package:
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [rstan.so] Error 1
ERROR: compilation failed for package ‘rstan’
How can I modify my travis.yaml
to successfully install rstan
on Travis?
Travis yaml: https://github.com/IndrajeetPatil/statsExpressions/blob/master/.travis.yml
-flto=2
flag in travis.yaml . – Ben GoodrichMAKEFLAGS="-j 2 && -flto 2"
? – Indrajeet Patilecho "CXX14 = g++-7 -fPIC -flto=2" >> ~/.R/Makevars
, which you can change to whatever you want, but I would suggest removing the-flto=2
if that is causing problems. You can set theMAKEVARS
environmental variable elsewhere. – Ben Goodrich-flto=2
, but the same issue persists. – Indrajeet Patil/usr/bin/ld: lto-wrapper failed
without using LTO? – Ben Goodrich