I'm trying to build: https://github.com/kanzure/nanoengineer
我正在尝试构建:https://github.com/kanzure/nanoengineer。
But it looks like it errors out on:
但它看起来是错误的:
gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/python2.7 -std=c99 x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -MT libstructcompare_a-structcompare.o -MD -MP -MF .deps/libstructcompare_a-structcompare.Tpo -c -o libstructcompare_a-structcompare.o `test -f 'structcompare.c' || echo './'`structcompare.c
gcc: error: x86_64-linux-gnu-gcc: No such file or directory
x86_64-linux-gnu-gcc
definitely exists in /usr/bin (It's a symlink) and the target definitely exists as well. It looks to me like the Makefile wasn't generated correctly, perhaps there is a flag that should be passed before specifying x86_64-linux-gnu-gcc? I am unsure as well what specifying x86_64-linux-gnu-gcc
is supposed to accomplish.
在/usr/bin中肯定存在x86_64-linux-gnu-gcc(它是一个符号链接),而且目标肯定也存在。在我看来,Makefile不是正确生成的,也许在指定x86_64-linux-gnu-gcc之前应该传递一个标记?我也不确定什么是指定x86_64-linux-gnu-gcc应该完成的。
Finally, this makefile was generated by configure, so once we narrow down the cause of the error, I'll have to figure out what files to modify in order to fix this. (I'm a CMake kind of guy myself, but of course I didn't choose the build system for this project.) My OS is Debian.
最后,这个makefile是通过configure生成的,所以一旦我们缩小了错误的原因,我就必须找出要修改的文件以修复这个问题。(我自己是一个CMake类型的人,但是我当然没有选择这个项目的构建系统。)我的操作系统是Debian。
I've tried building this branch as well: https://github.com/kanzure/nanoengineer/branches/kirka-updates
我也尝试过构建这个分支:https://github.com/kanzure/nanoengineer/branches/kirka-updates。
If you can try getting this to build on your system, I would greatly appreciate it! Thanks!
如果您可以尝试在您的系统上构建这个,我将非常感激!谢谢!
5 个解决方案
#1
67
After a fair amount of work, I was able to get it to build on Ubuntu 12.04 x86 and Debian 7.4 x86_64. I wrote up a guide below. Can you please try following it to see if it resolves the issue?
在大量的工作之后,我可以在Ubuntu 12.04 x86和Debian 7.4 x86_64上构建它。我在下面写了一个指南。你能不能试着跟踪一下,看看是否能解决这个问题?
If not please let me know where you get stuck.
如果不知道,请告诉我你在哪里卡住了。
Install Common Dependencies
安装常见的依赖关系
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
Install NumArray 1.5.2
安装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
Install Numeric 23.8
安装数字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
Install HDF5 1.6.5
安装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
Install Nanoengineer
安装Nanoengineer
git clone https://github.com/kanzure/nanoengineer.git
cd nanoengineer
./bootstrap
./configure
make
sudo make install
Troubleshooting
故障排除
On Debian Jessie, you will receive the error message that cant pants mentioned. There seems to be an issue in the automake scripts. x86_64-linux-gnu-gcc
is inserted in CFLAGS
and gcc
will interpret that as a name of one of the source files. As a workaround, let's create an empty file with that name. Empty so that it won't change the program and that very name so that compiler picks it up. From the cloned nanoengineer directory, run this command to make gcc happy (it is a hack yes, but it does work) ...
在Debian Jessie上,你会收到一条不能穿裤子的错误信息。在自动脚本中似乎有一个问题。在CFLAGS中插入了x86_64-linux-gnu-gcc,并将其解释为源文件的名称。作为一个解决方案,让我们创建一个具有该名称的空文件。空的,这样它就不会改变程序和那个名字,这样编译器就会把它拿起来。从克隆的nanoengineer目录中,运行这个命令使gcc高兴(它是一个hack,但是它确实有效)……
touch sim/src/x86_64-linux-gnu-gcc
If you receive an error message when attemping to compile HDF5 along the lines of: "error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments", then modify the file perform/zip_perf.c, line 548 to look like the following and then rerun make...
如果您在尝试编译HDF5时收到一条错误消息:“错误:调用‘__open_missing_mode '声明的属性错误:在第二个参数中打开O_CREAT需要3个参数”,然后修改文件执行/zip_perf。c,第548行看起来像下面,然后重新运行make…
output = open(filename, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR);
If you receive an error message about Numeric/arrayobject.h not being found when building Nanoengineer, try running
如果您收到一个关于数字/arrayobject的错误消息。在建造纳米工程师时没有发现,试着跑。
export CPPFLAGS=-I/usr/local/include/python2.7
./configure
make
sudo make install
If you receive an error message similar to "TRACE_PREFIX undeclared", modify the file sim/src/simhelp.c lines 38 to 41 to look like this and re-run make:
如果您收到类似于“TRACE_PREFIX未声明”的错误消息,请修改文件sim/src/simhelp。c第38到41行看起来像这样,然后重新运行:
#ifdef DISTUTILS
static char tracePrefix[] = "";
#else
static char tracePrefix[] = "";
If you receive an error message when trying to launch NanoEngineer-1 that mentions something similar to "cannot import name GL_ARRAY_BUFFER_ARB", modify the lines in the following files
如果您在尝试启动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
that look like this:
这看起来像这样:
from OpenGL.GL import GL_ARRAY_BUFFER_ARB
from OpenGL.GL import GL_ELEMENT_ARRAY_BUFFER_ARB
to look like this:
看起来像这样:
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
I also found an additional troubleshooting text file that has been removed, but you can find it here
我还发现了一个额外的故障排除文本文件已经被删除,但是您可以在这里找到它。
#2
17
you just need:
你只需要:
sudo apt-get install gcc.
#3
12
apt-get install python-dev
...solved the problem for me.
…帮我解决了这个问题。
#4
6
sudo apt-get -y install python-software-properties && \
sudo apt-get -y install software-properties-common && \
sudo apt-get -y install gcc make build-essential libssl-dev libffi-dev python-dev
sudo apt-get -y安装python软件- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You need the libssl-dev and libffi-dev if especially you are trying to install python's cryptography libraries or python libs that depend on it(eg ansible)
您需要libssld -dev和libffi-dev,尤其是您正在尝试安装依赖于它的python加密库或python libs(如anable)
#5
4
the error can be due to one of several missing package. Below command will install several packages like g++, gcc, etc.
错误可能是由于几个丢失的包中的一个。下面的命令将安装几个包,如g++、gcc等。
sudo apt-get install build-essential
#1
67
After a fair amount of work, I was able to get it to build on Ubuntu 12.04 x86 and Debian 7.4 x86_64. I wrote up a guide below. Can you please try following it to see if it resolves the issue?
在大量的工作之后,我可以在Ubuntu 12.04 x86和Debian 7.4 x86_64上构建它。我在下面写了一个指南。你能不能试着跟踪一下,看看是否能解决这个问题?
If not please let me know where you get stuck.
如果不知道,请告诉我你在哪里卡住了。
Install Common Dependencies
安装常见的依赖关系
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
Install NumArray 1.5.2
安装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
Install Numeric 23.8
安装数字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
Install HDF5 1.6.5
安装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
Install Nanoengineer
安装Nanoengineer
git clone https://github.com/kanzure/nanoengineer.git
cd nanoengineer
./bootstrap
./configure
make
sudo make install
Troubleshooting
故障排除
On Debian Jessie, you will receive the error message that cant pants mentioned. There seems to be an issue in the automake scripts. x86_64-linux-gnu-gcc
is inserted in CFLAGS
and gcc
will interpret that as a name of one of the source files. As a workaround, let's create an empty file with that name. Empty so that it won't change the program and that very name so that compiler picks it up. From the cloned nanoengineer directory, run this command to make gcc happy (it is a hack yes, but it does work) ...
在Debian Jessie上,你会收到一条不能穿裤子的错误信息。在自动脚本中似乎有一个问题。在CFLAGS中插入了x86_64-linux-gnu-gcc,并将其解释为源文件的名称。作为一个解决方案,让我们创建一个具有该名称的空文件。空的,这样它就不会改变程序和那个名字,这样编译器就会把它拿起来。从克隆的nanoengineer目录中,运行这个命令使gcc高兴(它是一个hack,但是它确实有效)……
touch sim/src/x86_64-linux-gnu-gcc
If you receive an error message when attemping to compile HDF5 along the lines of: "error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments", then modify the file perform/zip_perf.c, line 548 to look like the following and then rerun make...
如果您在尝试编译HDF5时收到一条错误消息:“错误:调用‘__open_missing_mode '声明的属性错误:在第二个参数中打开O_CREAT需要3个参数”,然后修改文件执行/zip_perf。c,第548行看起来像下面,然后重新运行make…
output = open(filename, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR);
If you receive an error message about Numeric/arrayobject.h not being found when building Nanoengineer, try running
如果您收到一个关于数字/arrayobject的错误消息。在建造纳米工程师时没有发现,试着跑。
export CPPFLAGS=-I/usr/local/include/python2.7
./configure
make
sudo make install
If you receive an error message similar to "TRACE_PREFIX undeclared", modify the file sim/src/simhelp.c lines 38 to 41 to look like this and re-run make:
如果您收到类似于“TRACE_PREFIX未声明”的错误消息,请修改文件sim/src/simhelp。c第38到41行看起来像这样,然后重新运行:
#ifdef DISTUTILS
static char tracePrefix[] = "";
#else
static char tracePrefix[] = "";
If you receive an error message when trying to launch NanoEngineer-1 that mentions something similar to "cannot import name GL_ARRAY_BUFFER_ARB", modify the lines in the following files
如果您在尝试启动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
that look like this:
这看起来像这样:
from OpenGL.GL import GL_ARRAY_BUFFER_ARB
from OpenGL.GL import GL_ELEMENT_ARRAY_BUFFER_ARB
to look like this:
看起来像这样:
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
I also found an additional troubleshooting text file that has been removed, but you can find it here
我还发现了一个额外的故障排除文本文件已经被删除,但是您可以在这里找到它。
#2
17
you just need:
你只需要:
sudo apt-get install gcc.
#3
12
apt-get install python-dev
...solved the problem for me.
…帮我解决了这个问题。
#4
6
sudo apt-get -y install python-software-properties && \
sudo apt-get -y install software-properties-common && \
sudo apt-get -y install gcc make build-essential libssl-dev libffi-dev python-dev
sudo apt-get -y安装python软件- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You need the libssl-dev and libffi-dev if especially you are trying to install python's cryptography libraries or python libs that depend on it(eg ansible)
您需要libssld -dev和libffi-dev,尤其是您正在尝试安装依赖于它的python加密库或python libs(如anable)
#5
4
the error can be due to one of several missing package. Below command will install several packages like g++, gcc, etc.
错误可能是由于几个丢失的包中的一个。下面的命令将安装几个包,如g++、gcc等。
sudo apt-get install build-essential