【问题标题】:travis builds failing due to rstan compilation issues由于 rstan 编译问题,travis 构建失败
【发布时间】:2020-01-16 13:40:24
【问题描述】:

我在 Linux 上构建的包失败,rstan 包的编译错误如下:

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’

如何修改我的 travis.yaml 以在 Travis 上成功安装 rstan

构建日志: https://travis-ci.org/IndrajeetPatil/statsExpressions/builds/638404778?utm_source=github_status&utm_medium=notification

特拉维斯 yaml: https://github.com/IndrajeetPatil/statsExpressions/blob/master/.travis.yml

【问题讨论】:

  • 我会尝试使用 travis.yaml 中的 -flto=2 标志。
  • @BenGoodrich 如何添加多个标志? MAKEFLAGS="-j 2 && -flto 2"?
  • 有一行写着echo "CXX14 = g++-7 -fPIC -flto=2" >> ~/.R/Makevars,您可以随意更改,但如果这会导致问题,我建议删除-flto=2。您可以在别处设置MAKEVARS 环境变量。
  • 我在删除-flto=2后尝试过,但同样的问题仍然存在。
  • 你还有/usr/bin/ld: lto-wrapper failed而不使用LTO?

标签: r travis-ci rstan


【解决方案1】:

在尝试了许多不同的排列和组合之后,我终于让 Travis 构建成功了,不仅通过正确编译 rstan 还安装了其他需要编译的包,以便日志不超过最大限制或超时.

这是新的yaml 文件,供将来可能遇到类似问题的任何人使用: https://github.com/IndrajeetPatil/statsExpressions/blob/master/.travis.yml

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    相关资源
    最近更新 更多