在 ubuntu 12.04 中安装 octave 3.8.0

在 ubuntu 12.04 中安装 octave 3.8.0

使用以下命令

wget ftp://ftp.gnu.org/gnu/octave/octave-3.8.0.tar.bz2
tar -xvf octave-3.8.0.tar.bz2
cd octave-3.8.0
sudo apt-get build-dep octave
./configure
make
sudo make install

我在 make 和 make install 阶段遇到错误,octave 无法安装。你有什么建议吗?感谢你的帮助

以下是 make 和 make install 命令末尾的错误消息:

/usr/local/include/llvm/PassManager.h:34:15: error: 'PassManager' is already declared in this scope
/usr/local/include/llvm/PassManager.h:35:15: error: 'FunctionPassManager' is already declared in this scope
corefcn/pt-jit.cc: In member function 'bool tree_jit::initialize()':
corefcn/pt-jit.cc:1891:48: error: cannot convert 'llvm::legacy::PassManager*' to 'llvm::PassManager*' in assignment
corefcn/pt-jit.cc:1892:22: error: invalid use of incomplete type 'struct llvm::PassManager'
corefcn/jit-util.h:46:9: error: forward declaration of 'struct llvm::PassManager'
corefcn/pt-jit.cc:1894:55: error: cannot convert 'llvm::legacy::FunctionPassManager*' to 'llvm::FunctionPassManager*' in assignment
corefcn/pt-jit.cc:1896:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1900:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1901:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1902:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1903:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1904:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1905:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1906:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:1907:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc: In member function 'void tree_jit::optimize(llvm::Function*)':
corefcn/pt-jit.cc:2003:22: error: invalid use of incomplete type 'struct llvm::PassManager'
corefcn/jit-util.h:46:9: error: forward declaration of 'struct llvm::PassManager'
corefcn/pt-jit.cc:2004:15: error: invalid use of incomplete type 'struct llvm::FunctionPassManager'
corefcn/jit-util.h:45:9: error: forward declaration of 'struct llvm::FunctionPassManager'
corefcn/pt-jit.cc:2010:34: error: 'F_Binary' is not a member of 'llvm::raw_fd_ostream'
make[3]: *** [corefcn/corefcn_libcorefcn_la-pt-jit.lo] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

答案1

这是针对 LLVM >= 3.4 构建 Octave 3.8.0 时出现的问题。此错误报告中有更新的信息: https://savannah.gnu.org/bugs/?41061

答案2

我按照这个说明安装了 3.8 octave 版本 - 效果很好。如果你按照说明操作,还会安装相当长的依赖包列表。

http://blogs.bu.edu/mhirsch/2013/12/compiling-octave-3-8/

欢呼 seeb

答案3


显然,你没有安装 Octave 的重要库,因为我看了错误消息。我的建议是安装八度正确地Ubuntu 软件中心,那么它会自动检测你的系统中缺少哪个库,从而添加并安装它八度. 如果你不知道如何安装Ubuntu 软件中心只要告诉我,我就可以一步一步指导你。

谢谢

答案4

llvm 由可选的 jit 使用。jit 使 octave 性能更好,但并非绝对必要。要防止 octave 构建寻找 llvm,请使用--disable-jit如下标志:

./configure --disable-jit
make
sudo make install

相关内容