繁体   English   中英

在 Ubuntu 中编译 SuiteSparse,安装 CHOLMOD 时中断

[英]Compiling SuiteSparse in Ubuntu, breaks when installing CHOLMOD

我已经从以下GitHub下载了 SuiteSparse 的 .zip。 我正在尝试在 Ubuntu 中安装/编译 C/C++ 库。 我正在使用适用于 Linux 的 Windows 子系统并从 Microsoft Store 安装了 Ubuntu。

SuiteSparse 指令说 cd 到 SuiteSparse-5.5.0 目录,然后输入make 生成文件在这里 自述文件表明我需要 make、g++、gcc 和 cmake,所以我已经使用sudo apt install <package name>安装了它们。 这是我从make 2>error得到的错误信息:

/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/csr.c: In function ‘gk_csr_Normalize’:
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/csr.c:1344:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    else if (norm == 1)
         ^~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/csr.c:1346:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
           for (j=ptr[i]; j<ptr[i+1]; j++)
           ^~~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/csr.c:1371:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    else if (norm == 1)
         ^~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/csr.c:1373:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
           for (j=ptr[i]; j<ptr[i+1]; j++)
           ^~~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/getopt.c: In function ‘gk_getopt_internal’:
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/getopt.c:343:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (gk_optind == 0)
     ^~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/getopt.c:345:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
       optstring = gk_getopt_initialize (argc, argv, optstring);
       ^~~~~~~~~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/getopt.c:700:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
  else
  ^~~~
/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/metis-5.1.0/GKlib/getopt.c:703:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
    nextchar = NULL;
    ^~~~~~~~
ar: creating libsuitesparseconfig.a
cc1: warning: command line option ‘-Woverloaded-virtual’ is valid for C++/ObjC++ but not for C
ar: creating libamd.a
ar: creating libbtf.a
ar: creating libcamd.a
ar: creating libccolamd.a
ar: creating libcolamd.a
ar: creating libcholmod.a
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
make[3]: *** [/mnt/c/Users/Anshu/path/to/SuiteSparse-5.5.0/lib/libcholmod.so.3.0.13] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [library] Error 2
make[1]: *** [all] Error 2
make: *** [go] Error 2

我已经关闭了我的防病毒软件,它一直在阻止 makefile 写入某些文件夹。 可能出什么问题了? 似乎 makefile 试图安装一堆以 CHOLMOD 开头的库,并且在执行此操作时停滞不前。 我已经阅读了一些相关问题 第一个似乎不适用于这里,因为我没有更改 PATH,第二个建议使用我已经在做的 Metis。

安装 LLAPACK 和 OpenBLAS 开发库。 在 Ubuntu 上,命令是:

sudo apt install liblapack-dev  libopenblas-dev

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM