解决 Solaris 上未说明的 -llapack 依赖问题 [英] Resolving unstated -llapack dependency issue on Solaris

查看:40
本文介绍了解决 Solaris 上未说明的 -llapack 依赖问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 CRAN 上发布了一个 R 包,它依赖于一些 RcppArmadillo 代码的成功编译.该软件包构建正确,并且在我尝试的所有测试系统上都没有注释(如果有兴趣,请在此处 CRAN 评论),但是,CRAN 检查在 solaris-sparc 上失败,并且无法加载对 solaris-x86 的依赖.

I have released an R package on CRAN which depends on the successful compilation of some RcppArmadillo code. The package built correctly and with no notes on all the test systems that I tried (CRAN comments here if interested), however, the CRAN checks fail on solaris-sparc and are unable to load a dependency on solaris-x86.

请参阅此处了解 CRAN 检查.

错误原因如下 ld:fatal: library -llapack: not found(来自 goldi-00install.html).

The reason for the error is given as ld: fatal: library -llapack: not found (from goldi-00install.html).

在我的 MakevarsMakevars.win 中,我在 PKG_LIBS 中声明了 -llapack,我认为已经足够了.

In my Makevars and Makevars.win, I have stated -llapack in PKG_LIBS, which I thought was sufficient.

PKG_LIBS= -Wsign-compare -llapack 在两者中.

但是,我不确定如何为 Solaris 声明此依赖项.是否有一个单独的 Makevars 我必须编写,或者有一个不同的位置我必须声明依赖关系?

However, I'm unsure how to declare this dependency for Solaris. Is there a separate Makevars that I must write, or there a different location that I must state the dependency?

我已阅读相关Writing R Extensions"手册的部分,并怀疑我可能必须在PKG_LIBS中声明$(LLAPACK_LIBS),但无法对其进行测试在solaris平台上.这是要遵循的正确路径吗?

I have read the relevant section of the "Writing R Extensions" manual, and suspect that I may have to declare $(LLAPACK_LIBS) in PKG_LIBS, but have no way of testing it on a solaris platform. Is this the correct path to follow?

感谢您的帮助,非常感谢.

Thanks for any help, it's much appreciated.

Github 上的软件包

CRAN 上的包

推荐答案

你在 src/Makevars 是错误的.不要做你做过的事:

Your line in src/Makevars is just wrong. Don't do what you did:

PKG_LIBS= -Wsign-compare -llapack

做我们都做的事情,示例包有什么以及自动生成的包获取:

do what we all do, what the example package has and the what the auto-generated package gets:

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

当我们说它确实有效时,请相信我们.我敢说,在 CRAN 上的 291 个 (291 !!) 软件包中,基本上都使用这个.

Believe us when we say that it just works. I venture that among the two-hundred-ninenty-one (291 !!) packages on CRAN, essentially all use this.

任何不喜欢你的人,只是做错了.上面的分发给 R 对 LAPACK 及其依赖项的了解.使用它.

And any who do not, like yours, simply do it wrong. The above dispatches to what R knows about LAPACK and its dependencies. Use it.

这篇关于解决 Solaris 上未说明的 -llapack 依赖问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆