在 fish 上的 virtualenv 中安装 kivy 时出现错误 mno-fused-madd shell

getting error mno-fused-madd installing kivy in virtualenv over fish shell

您好,当我尝试在名为 virtualenv 中安装 kivy 时,我收到错误提示 clang: error: unknown argument: '-mno-fused-madd' kivy编程.

cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -Wno-error=unused-command-line-argument-hard-error-in-future -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip-build-UDRH26/kivy/kivy/graphics/texture.c -o build/temp.macosx-10.9-intel-2.7/private/tmp/pip-build-UDRH26/kivy/kivy/graphics/texture.o -F/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks -arch x86_64

    clang: error: unknown argument: '-mno-fused-madd'

     error: command 'cc' failed with exit status 1

尽管我尝试使用 : sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install kivy 得到了上面相同的错误 clang: error: unknown argument: '-mno-fused-madd'

我的 gcc 版本:

$gcc --version 
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

编译 cython 文件时也出现错误

cythoning /private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-Im9flX/kivy/kivy/graphics/texture.pyx to /private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-build-Im9flX/kivy/kivy/graphics/texture.c

     Error compiling Cython file:
     ------------------------------------------------------------
     ...
         cpdef release(self)
         cpdef get_pixel_color(self, int wx, int wy)
         cdef void create_fbo(self)
         cdef void delete_fbo(self)
         cdef void apply(self)
                       ^
     ------------------------------------------------------------

     kivy/graphics/fbo.pxd:25:19: Signature not compatible with previous declaration

     Error compiling Cython file:
     ------------------------------------------------------------
     ...
         cdef void push_states(self, list names) except *
         cdef void pop_state(self, str name) except *
         cdef void pop_states(self, list names) except *
         cdef void enter(self) except *
         cdef void leave(self) except *
         cdef void apply(self) except *
                       ^
     ------------------------------------------------------------

我应该继续使用 fish shell 作为 kivy 蛋糕的默认 shell 还是我必须切换回我 bash shell 默认的OSx小牛队?

这是由 cython 0.22 中的一个明显错误引起的,我们尚未在 kivy master 中解决该错误(尚不清楚什么是最好的,或者我们是否应该在 cython 本身中修复部分问题)。您可以使用 cython 0.21 来解决它,或者如果您愿意手动构建源代码,可以尝试在 kivy 的 github 存储库中进行修复。

我认为这与您使用 fish 没有任何关系,这可能只是与 cython 更新的巧合。