我正在尝试打包一个使用 Scipy 和 Flatpak 的程序。我不知道如何定义 lapack/blas 依赖项。构建失败的错误消息在错误上非常清楚:
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
我当前(WIP)配置的提交在这里:https ://github.com/innstereo/innstereo/commit/7f0272a70584e919546c4fdd07531d2c5c063d52
当我将它添加到模块数组的开头时:
{
"name": "lapack",
"buildsystem": "cmake",
"sources": [
{
"type": "git",
"url": "https://github.com/Reference-LAPACK/lapack"
}
]
}
我收到此错误:
-- The Fortran compiler identification is unknown -- The C compiler identification is GNU 6.2.0 CMake Error at CMakeLists.txt:3 (project): No CMAKE_Fortran_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
-- Check for working C compiler: /run/ccache/bin/cc
-- Check for working C compiler: /run/ccache/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring incomplete, errors occurred!
See also "/run/build/lapack/CMakeFiles/CMakeOutput.log".
See also "/run/build/lapack/CMakeFiles/CMakeError.log".
Error: module lapack: Child process exited with code 1
https://github.com/Reference-LAPACK/lapack有一个 cmake 配置。这应该开箱即用吗?是否有必要覆盖其中的一部分才能让 Flatpak 构建运行?
编辑 1
我添加了
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.gfortran-62"
]
和
"modules": [
{
"name": "lapack",
"buildsystem": "simple",
"append-path": "/usr/lib/sdk/gfortran-62/bin",
"build-commands": [
"/usr/lib/sdk/gfortran-62/use.sh"
],
"sources": [
{
"type": "git",
"url": "https://github.com/Reference-LAPACK/lapack"
}
]
}
到我的flatpak json。这似乎是解决方案的一部分。但是当 numpy 尝试在容器内编译时它仍然丢失(我假设)。