簡體   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