调试错误“gcc:error:x86_64-linux-gnu-gcc:No such file or directory” [英] Debugging the error "gcc: error: x86_64-linux-gnu-gcc: No such file or directory"

查看:354
本文介绍了调试错误“gcc:error:x86_64-linux-gnu-gcc:No such file or directory”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建:
https://github.com/kanzure/nanoengineer



但它看起来像是出错:

  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 绝对存在于/ usr / bin中(这是一个符号链接)目标也一定存在。它看起来像Makefile没有正确生成,也许有一个标志,应该在指定x86_64-linux-gnu-gcc之前传递?我不确定指定 x86_64-linux-gnu-gcc 应该完成什么。

最后,这个makefile是由configure生成的,所以一旦我们缩小了错误的原因,我将不得不弄清楚为了解决这个问题需要修改哪些文件。 (我自己是一个CMake种人,但当然我没有选择这个项目的构建系统。)我的操作系统是Debian。



我已经尝试建设这个分支:
https://github.com/kanzure/nanoengineer/branches/kirka -updates



如果您可以尝试在您的系统上构建这个版本,我将不胜感激!谢谢!

解决方案

经过相当多的工作后,我能够在Ubuntu 12.04 x86和Debian 7.4 x86_64上构建它。我在下面写了一篇指南。你可以请尝试关注它是否能解决问题吗?



如果不是,请让我知道您遇到困难的地方。

安装通用依赖项


$ b $ pre $ 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 -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数字-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安装

安装Nanoengineer

  git clone https://github.com/kanzure/nanoengineer.git 
cd nanoengineer
./bootstrap
./configure
make $ b $ sudo make install

疑难解答



在Debian Jessie上,您将收到错误信息,提到裤子。在automake脚本中似乎存在一个问题。在 CFLAGS gcc x86_64-linux-gnu-gcc c>会将其解释为源文件之一的名称。作为解决方法,让我们创建一个具有该名称的空文件。清空以便它不会更改程序和名称,以便编译器将其提取出来。从克隆的nanoengineer目录中,运行这个命令让gcc开心(这是一个黑客行为,但它确实有效)...

  touch sim / src / x86_64-linux-gnu-gcc 

如果您在收到错误消息时试图编译HDF5:error:调用'__open_missing_mode'声明属性错误:在第二个参数中用O_CREAT打开需要3个参数,然后修改文件执行/ zip_perf.c,第548行看起来像下面然后重新运行make ...

  output = open(文件名,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 undeclared的错误消息,修改文件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/程序/原型/ test_drawing.py

看起来像这样:


$来自OpenGL.GL的b $ b

 从OpenGL.GL导入GL_ARRAY_BUFFER_ARB 
导入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

我还发现了一个额外的故障排除文本文件那已经是r emoved,但您可以在此处找到它。


I'm trying to build: 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.

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.

I've tried building this branch as well: 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!

解决方案

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?

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

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

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

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

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) ...

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...

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

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:

#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

/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

这篇关于调试错误“gcc:error:x86_64-linux-gnu-gcc:No such file or directory”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆