简体   繁体   English

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

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

I've downloaded the .zip for SuiteSparse from the following GitHub .我已经从以下GitHub下载了 SuiteSparse 的 .zip。 I'm trying to install/compile the C/C++ libraries in Ubuntu.我正在尝试在 Ubuntu 中安装/编译 C/C++ 库。 I'm using the Windows Subsystem for Linux and installed Ubuntu from the Microsoft Store.我正在使用适用于 Linux 的 Windows 子系统并从 Microsoft Store 安装了 Ubuntu。

The SuiteSparse instructions say to cd to the SuiteSparse-5.5.0 directory and just type make . SuiteSparse 指令说 cd 到 SuiteSparse-5.5.0 目录,然后输入make Makefile here .生成文件在这里 The readme suggests that I need make, g++, gcc, and cmake, so I've installed those using sudo apt install <package name> .自述文件表明我需要 make、g++、gcc 和 cmake,所以我已经使用sudo apt install <package name>安装了它们。 Here's the error message I get from make 2>error :这是我从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

I've turned off my antivirus, which had been preventing the makefile from writing in some folders.我已经关闭了我的防病毒软件,它一直在阻止 makefile 写入某些文件夹。 What might be going wrong?可能出什么问题了? It seems like the makefile tries to install a bunch of libraries starting with CHOLMOD, and gets stalled while doing that.似乎 makefile 试图安装一堆以 CHOLMOD 开头的库,并且在执行此操作时停滞不前。 I've read some related questions .我已经阅读了一些相关问题 The first one doesn't seem to apply here since I didn't change PATH, and the second one suggests using Metis which I'm already doing.第一个似乎不适用于这里,因为我没有更改 PATH,第二个建议使用我已经在做的 Metis。

Install LLAPACK and OpenBLAS development libraries.安装 LLAPACK 和 OpenBLAS 开发库。 On Ubuntu the command is:在 Ubuntu 上,命令是:

sudo apt install liblapack-dev  libopenblas-dev

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

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