在付出一定的努力后,我成功地让它在Ubuntu 12.04 x86和Debian 7.4 x86_64上构建。下面我写了一份指南,请您尝试按照指南操作,看是否能解决问题?
如果不能,请告诉我你遇到了哪些问题。
安装常见依赖项
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
安装NumArray 1.5.2版本
wget http://goo.gl/6gL0q3 -O numarray-1.5.2.tgz
tar xfvz numarray-1.5.2.tgz
cd numarray-1.5.2
sudo python setup.py install
安装 Numeric 23.8
wget http://goo.gl/PxaHFW -O numeric-23.8.tgz
tar xfvz numeric-23.8.tgz
cd Numeric-23.8
sudo python setup.py install
安装 HDF5 1.6.5
wget ftp://ftp.hdfgroup.org/HDF5/releases/hdf5-1.6/hdf5-1.6.5.tar.gz
tar xfvz hdf5-1.6.5.tar.gz
cd hdf5-1.6.5
./configure --prefix=/usr/local
sudo make
sudo make install
安装Nanoengineer
git clone https://github.com/kanzure/nanoengineer.git
cd nanoengineer
./bootstrap
./configure
make
sudo make install
故障排除
在Debian Jessie上,您将收到无法穿裤子所提到的错误消息。似乎automake脚本存在问题。x86_64-linux-gnu-gcc
被插入到CFLAGS
中,gcc
会将其解释为其中一个源文件的名称。作为一种解决方法,让我们创建一个具有该名称的空文件。它是空的,这样就不会更改程序,并且是那个特定的名称,以便编译器选择它。从克隆的nanoengineer目录中运行此命令,使gcc快乐(是的,这是一个hack,但它确实起作用)...
touch sim/src/x86_64-linux-gnu-gcc
如果您在尝试编译HDF5时收到以下错误消息:“error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments”,则请修改文件perform/zip_perf.c,将第548行修改为以下内容,然后重新运行make命令...
output = open(filename, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR);
如果在构建Nanoengineer时收到关于未找到Numeric/arrayobject.h的错误消息,请尝试运行
export CPPFLAGS=-I/usr/local/include/python2.7
./configure
make
sudo make install
如果你收到类似于“TRACE_PREFIX未声明”的错误消息,请修改文件sim/src/simhelp.c中的38到41行,使其看起来像这样,并重新运行make:
#ifdef DISTUTILS
static char tracePrefix[] = "";
#else
static char tracePrefix[] = "";
如果您在尝试启动NanoEngineer-1时收到错误消息,并提到类似于“无法导入名称GL_ARRAY_BUFFER_ARB”,请修改以下文件中的行:
/usr/local/bin/NanoEngineer1_0.9.2.app/program/graphics/drawing/setup_draw.py
/usr/local/bin/NanoEngineer1_0.9.2.app/program/graphics/drawing/GLPrimitiveBuffer.py
/usr/local/bin/NanoEngineer1_0.9.2.app/program/prototype/test_drawing.py
看起来像这样:
from OpenGL.GL import GL_ARRAY_BUFFER_ARB
from OpenGL.GL import GL_ELEMENT_ARRAY_BUFFER_ARB
看起来像这样:
from OpenGL.GL.ARB.vertex_buffer_object import GL_ARRAY_BUFFER_AR
from OpenGL.GL.ARB.vertex_buffer_object import GL_ELEMENT_ARRAY_BUFFER_ARB
我还找到了一份已被删除的附加故障排除文本文件,但你可以在这里找到它。
configure
脚本的?看起来你在 CXXFLAGS 中添加了垃圾或其他东西。x86_64-linux-gnu-gcc
在Makefile
中的哪里出现? - DanielKO-v
选项的gcc命令并发布其输出。实际上,发布的命令中出现了错误,即gcc ...options... x86_64-linux-gnu-gcc ..options..
,而gcc试图将x86_64-linux-gnu-gcc
作为输入文件使用,这是错误的。因此,您应该调试Makefile。 - osgxgcc ... x86_64-linux-gnu-gcc ...
-gcc
没有将x86_64-linux-gnu-gcc
参数视为选项/标志等,因此假定它是应该编译的文件。由于没有附加路径,它假定该文件应该在当前目录中,找不到它并产生错误消息。然而,为什么这个命令行会是这样,可能与configure
或其运行方式有关,或者与Makefile
有关 - 如上所述的命令是没有意义的。 - twalberg