当前位置: 首页 > 面试题库 >

铛:错误:未知参数:'-mno-fused-madd'[-Wunused命令行参数硬错误在将来]

桂高义
2023-03-14
问题内容

尝试在Mavericks操作系统中安装Scrapy时出现以下错误。

我已经安装了命令行工具和X11,但我真的不知道发生了什么,也没有发现通过Web浏览时出现的相同错误。我认为这可能与Xcode 5.1中的某些更改有关

感谢您的回答!

这是命令输出的一部分:

$ pip安装scrapy

.
.
.
.

Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->scrapy)
  Downloading cryptography-0.3.tar.gz (208kB): 208kB downloaded
  Running setup.py egg_info for package cryptography
    OS/X: confusion between 'cc' versus 'gcc' (see issue 123)
    will not use '__thread' in the C code
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/Users/agonzamart/.virtualenvs/Parser/build/cryptography/setup.py", line 156, in <module>
        "test": PyTest,
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
        return installer(requirement)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
    Complete output from command python setup.py egg_info:
    OS/X: confusion between 'cc' versus 'gcc' (see issue 123)

will not use '__thread' in the C code

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/Users/agonzamart/.virtualenvs/Parser/build/cryptography/setup.py", line 156, in <module>

    "test": PyTest,

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain

    return installer(requirement)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg

    return cmd.easy_install(req)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install

    return self.install_item(spec, dist.location, tmpdir, deps)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item

    dists = self.install_eggs(spec, download, tmpdir)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs

    return self.build_and_install(setup_script, setup_base)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install

    self.run_setup(setup_script, setup_base, args)

  File "/Users/agonzamart/.virtualenvs/Parser/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1118, in run_setup

    raise DistutilsError("Setup script exited with %s" % (v.args[0],))

distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/agonzamart/.virtualenvs/Parser/build/cryptography

问题答案:

这是由于clang默认设置的更改,Xcode 5.1Apple并未注意到它将破坏使用系统Python的扩展模块的构建。一种解决方法是先定义以下环境变量:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

更新[2014-05-16]:正如预期的那样,Apple已使用更新的系统Python(2.7、2.6和2.5)修复了此问题,OS X 10.9.3因此在使用最新的Mavericks和时不再需要解决方法Xcode 5.1+。但是,到目前为止,OS X 10.8.x如果您正在使用(Mountain Lion,当前为10.8.5),仍然需要解决方法Xcode 5.1+



 类似资料:
  • 问题内容: 当尝试psycopg2通过Mavericks 10.9上的pip 安装时出现以下错误: 不知道如何进行,并已在此和其他地方搜索了此特定错误。任何帮助深表感谢! 这是pip的完整输出: 问题答案: 您可以通过在编译前设置以下环境变量来告诉clang不要将其引发错误: 然后应该工作。 尝试时我有同样的想法。 编辑:如果您是以超级用户身份安装(如果要追加到,可能是这种情况,如果要附加到OS

  • 问题内容: 在Scala Play中使用AngularJS时,出现此错误。 错误:参数“ MainCtrl”不是函数,未定义 我正在尝试创建包含一周中各天的表格。 请看一下我的代码。我检查了控制器的名称,但这似乎是正确的。注意:此SO答案中使用的代码 index.scala.html MainCtrl.js 问题答案: 从模块名称([myApp])中删除 并添加到html,它应该可以工作。

  • 为了方便起见,我们支持在运行 Blade 应用的时候修改一些配置,比如我在运行时指定端口: java -jar blade-app.jar --server.port=9088 当然还支持一些其他的命令行参数,看看下面的表格: 命令行参数 描述 示例 server.address 服务地址,默认是本机 0.0.0.0 回环地址 --server.address=192.168.1.100 serv

  • 1.2. 命令行参数 大多数的程序都是处理输入,产生输出;这也正是“计算”的定义。但是, 程序如何获取要处理的输入数据呢?一些程序生成自己的数据,但通常情况下,输入来自于程序外部:文件、网络连接、其它程序的输出、敲键盘的用户、命令行参数或其它类似输入源。下面几个例子会讨论其中几个输入源,首先是命令行参数。 os包以跨平台的方式,提供了一些与操作系统交互的函数和变量。程序的命令行参数可从os包的Ar

  • '-m' 选项 显示所有编译的模块,自1.4.0以来,Tengine支持动态模块,static表示静态编译,shared表示动态编译(后面接的是动态模块的版本)。下面是例子: $ nginx -m Tengine version: Tengine/1.4.1 (nginx/1.2.3) loaded modules: ngx_core_module (static) ng

  • V2Ray V2Ray 的程序文件的命令行参数如下: v2ray [-version] [-test] [-config=config.json] [-format=json] -version 只输出当前版本然后退出,不运行 V2Ray 主程序。 -test 测试配置文件有效性,如果有问题则输出错误信息,不运行 V2Ray 主程序。 -config 配置文件路径,可选的形式如下: 本地路径,可

  • 所有标志都是可选的,但是有些必须跟指定标志组合使用才生效。 标志 默认 描述 示例 --shell null 进入 REPL 模式 --allow-cors false 打开 CORS 兼容模式,这将允许从托管在任何域中的网站内连接到 Appium 服务器。启用此功能时要小心,因为如果您访问的网站使用跨域请求,在 Appium 服务器上启动或运行内省会话,则可能存在安全风险。 --ipa null

  • 这是一个给初次编写OCaml程序且想知道命令行意义的人看的简略指南。 argv 与C语言一样, 传给程序的参数存在一个数组里面。按照惯例, 数组名为argv.它可以在标准库的Sys模块中找到, 因此它的全称是Sys.argv.包括程序名的参数,它们的个数就是此数组的长度. 它可以通过Array.length函数取得。 简单示例 下面的程序显示Sys.argv里的参数以及它们各自在数组中的位置: o