无法安装橙色:“错误:命令'clang'失败,退出状态为1” [英] Can't install Orange: "error: command 'clang' failed with exit status 1"

查看:237
本文介绍了无法安装橙色:“错误:命令'clang'失败,退出状态为1”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Mac OS X 10.7.3(Lion)上安装 Orange ,我不断收到使用pip或源代码构建时出现错误。首先,我得到的错误是:

  error:command'gcc-4.0'failed with exit status 1 

我有Xcode 4,它与gcc 4.2.1捆绑在一起。所以我安装了 64位/ 32位Python 2.7.3 ,它内置了gcc 4.2。我还尝试使用以下方法覆盖编译器选项:

  export CC = gcc-4.2 



但是这产生了一个不同的错误:

 没有找到gcc-4.2,使用clang来代替
...
错误:命令'clang'失败,退出状态1

以下是完整的日志:

  $ python setup.py build 
运行构建
运行build_py
复制Orange / version.py - > build / lib.macosx-10.6-intel-2.7 / Orange
正在运行build_ext
未找到gcc-4.2,使用clang代替
建立'Orange.orange'扩展名
运行pyxtract for Orange.orange
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/defvectors.py
/ Library / Frameworks / Python。 framework / Versions / 2.7 / Resources / Python.app / Contents / MacOS / Python ../pyxtract/pyprops.py -n orange
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app /目录/ MacOS / Python ../pyxtract/pyxtract.py -m -n橙色lib_kernel.cpp lib_components.cpp lib_preprocess.cpp lib_learner.cpp lib_io.cpp lib_vectors.cpp cls_example.cpp cls_value.cpp cls_orange.cpp cls_misc.cpp函数.cpp orange.cpp
解析lib_kernel.cpp
解析lib_components.cpp
解析lib_preprocess.cpp
解析lib_learner.cpp
解析lib_io.cpp
解析lib_vectors.cpp
解析cls_example.cpp
解析cls_value.cpp
Parsin g cls_orange.cpp
解析cls_misc.cpp
解析函数cpp
解析orange.cpp
警告:class'PearsonCorrelation'将不可用
警告:class' ItemsetNodeProxy'将不可选
clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I / Library / Frameworks / Python.framework /版本/ 2.7 / include / python2.7 -INone -Isource / include -Isource / orange / liblinear -Isource / orange / ppp -Isource / orange / px -I / Library / Frameworks / Python.framework / Versions / 2.7 / include / python2.7 -c source / orange / assoc.cpp -o build / temp.macosx-10.6-intel-2.7 / source / orange / assoc.o -fPIC -fpermissive -fno-common -w -DDARWIN -DORANGE_EXPORTS
:在源代码/ orange / random.hpp中包含的文件:25:
在source / orange / root.hpp中包含的文件中:25:
source / orange / garbage.hpp:221:9:错误:使用undecla红色标识符'raiseError'
raiseError(从%s到%s的错误转换,typeid(U).name(),typeid(T).name());
^
source / orange / garbage.hpp:253:7:错误:使用未声明的标识符'raiseError'
raiseError(橙色内部错误:NULL指针指向'%s' TYPENAME(typeid的(T)));
^
source / orange / garbage.hpp:261:7:错误:使用未声明的标识符'raiseError'
raiseError(橙色内部错误:NULL指针指向'%s' TYPENAME(typeid的(T)));

source / orange / garbage.hpp:301:7:错误:使用未声明的标识符'raiseError'
raiseError(橙色内部错误:NULL指针指向'%s' TYPENAME(typeid的(T)));

source / orange / garbage.hpp:312:7:错误:使用未声明的标识符'raiseError'
raiseError(橙色内部错误:NULL指针指向'%s' TYPENAME(typeid的(T)));
^
在source / orange / assoc.cpp中包含的文件中:27:
source / orange / examplegen.hpp:143:38:错误:预期的成员名称或声明后的';'说明符
TExampleIterator :: TExampleIterator(const TExampleIterator& other);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~源码/源/橙/ examplegen.hpp注意:要匹配这个'('
TExampleIterator :: TExampleIterator(const TExampleIterator& other):' ;
^
source / orange / assoc.cpp:33:1:错误:实例化后'st_classDescription'的显式特化
DEFINE_TOrangeVector_classDescription(PAssociationRule,TAssociationRules,true,ORANGE_API)
^
source / orange / orvector.hpp:105:57:note:从宏'DEFINE_TOrangeVector_classDescription'
扩展TClassDescription TOrangeVector< _TYPE,_WRAPPED> :: st_classDescription = {_NAME,& typeid( TorangeVector< _TYPE,_WRAPPED>),& TOrange :: st_classDescription,TOrange_properties,TOrange_components};
^
source / orange / ppp / assoc.ppp:111:72:note:implicit instantiation first在这里需要
{rules,association rules,& typeid(POrange),& TAssociationRules :: st_classDescription,offsetof(TAssociationClassifier,rules),false,false,0},
^
8生成的错误。
error:command'clang'failed with exit status 1


解决方案

问题解决了:Xcode 4实际上并没有使用gcc-4.2;它带有新的LLVM编译器。



这只是一个问题:

  export CC = llvm-gcc-4.2 
export CXX = llvm-g ++ - 4.2

然后建立橙色。

I am trying to install Orange on my Mac OS X 10.7.3 (Lion) and I keep getting an error when using either pip or building from source. First, I was getting an error that read:

error: command 'gcc-4.0' failed with exit status 1

I have Xcode 4, which comes bundled with gcc 4.2.1. So I installed 64-bit/32-bit Python 2.7.3, which has gcc 4.2 built in. I also tried to override the compiler choice using:

export CC=gcc-4.2

But this produced a different error:

gcc-4.2 not found, using clang instead
...
error: command 'clang' failed with exit status 1

Here is the full log:

$ python setup.py build
running build
running build_py
copying Orange/version.py -> build/lib.macosx-10.6-intel-2.7/Orange
running build_ext
gcc-4.2 not found, using clang instead
building 'Orange.orange' extension
running pyxtract for Orange.orange
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/defvectors.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/pyprops.py -n orange
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/pyxtract.py -m -n orange lib_kernel.cpp lib_components.cpp lib_preprocess.cpp lib_learner.cpp lib_io.cpp lib_vectors.cpp cls_example.cpp cls_value.cpp cls_orange.cpp cls_misc.cpp functions.cpp orange.cpp
Parsing lib_kernel.cpp
Parsing lib_components.cpp
Parsing lib_preprocess.cpp
Parsing lib_learner.cpp
Parsing lib_io.cpp
Parsing lib_vectors.cpp
Parsing cls_example.cpp
Parsing cls_value.cpp
Parsing cls_orange.cpp
Parsing cls_misc.cpp
Parsing functions.cpp
Parsing orange.cpp
Warning: class 'PearsonCorrelation' will not be picklable
Warning: class 'ItemsetNodeProxy' will not be picklable
clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -INone -Isource/include -Isource/orange/liblinear -Isource/orange/ppp -Isource/orange/px -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c source/orange/assoc.cpp -o build/temp.macosx-10.6-intel-2.7/source/orange/assoc.o -fPIC -fpermissive -fno-common -w -DDARWIN -DORANGE_EXPORTS
clang: warning: argument unused during compilation: '-fpermissive'
In file included from source/orange/assoc.cpp:25:
In file included from source/orange/random.hpp:26:
In file included from source/orange/root.hpp:25:
source/orange/garbage.hpp:221:9: error: use of undeclared identifier 'raiseError'
        raiseError("bad cast from %s to %s", typeid(U).name(), typeid(T).name());
        ^
source/orange/garbage.hpp:253:7: error: use of undeclared identifier 'raiseError'
      raiseError("Orange internal error: NULL pointer to '%s'", TYPENAME(typeid(T)));
      ^
source/orange/garbage.hpp:261:7: error: use of undeclared identifier 'raiseError'
      raiseError("Orange internal error: NULL pointer to '%s'", TYPENAME(typeid(T)));
      ^
source/orange/garbage.hpp:301:7: error: use of undeclared identifier 'raiseError'
      raiseError("Orange internal error: NULL pointer to '%s'", TYPENAME(typeid(T)));
      ^
source/orange/garbage.hpp:312:7: error: use of undeclared identifier 'raiseError'
      raiseError("Orange internal error: NULL pointer to '%s'", TYPENAME(typeid(T)));
      ^
In file included from source/orange/assoc.cpp:27:
source/orange/examplegen.hpp:143:38: error: expected member name or ';' after declaration specifiers
  TExampleIterator::TExampleIterator(const TExampleIterator &other);
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
source/orange/examplegen.hpp:143:38: error: expected ')'
source/orange/examplegen.hpp:143:37: note: to match this '('
  TExampleIterator::TExampleIterator(const TExampleIterator &other);
                                    ^
source/orange/assoc.cpp:33:1: error: explicit specialization of 'st_classDescription' after instantiation
DEFINE_TOrangeVector_classDescription(PAssociationRule, "TAssociationRules", true, ORANGE_API)
^
source/orange/orvector.hpp:105:57: note: expanded from macro 'DEFINE_TOrangeVector_classDescription'
    TClassDescription TOrangeVector< _TYPE, _WRAPPED >::st_classDescription = { _NAME, &typeid(TOrangeVector< _TYPE, _WRAPPED >), &TOrange::st_classDescription, TOrange_properties, TOrange_components };
                                                        ^
source/orange/ppp/assoc.ppp:111:72: note: implicit instantiation first required here
  {"rules", "association rules", &typeid(POrange), &TAssociationRules::st_classDescription, offsetof(TAssociationClassifier, rules), false, false, 0},
                                                                       ^
8 errors generated.
error: command 'clang' failed with exit status 1

解决方案

Problem solved: Xcode 4 doesn't actually come with gcc-4.2; it comes with the new LLVM compilers.

It was just a matter of doing:

export CC=llvm-gcc-4.2
export CXX=llvm-g++-4.2

then building Orange.

这篇关于无法安装橙色:“错误:命令'clang'失败,退出状态为1”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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