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

陌路散爱 提交于 2019-12-24 12:14:07

问题


I'm on OSX. I'm installing Salt by following Salt's official guide here and I've ran into a problem. Running 'sudo pip install salt' gives me the following error.

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

I put the entire installation text in this gist. I just want to install salt via pip. Any ideas?

Attempted Solutions used from other overflow questions

  1. I've tried export CFLAGS=-Qunused-arguments and export CPPFLAGS=-Qunused-arguments in sudo bash
  2. I've tried running sudo pip install salt with ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
  3. Updating xcode from 5.1 to 5.1.1, as I read this might be an xcode problem.

All of these return the same exact error. I don't know what to do. I've been hitting my head against this wall for about 2 hours with no resolve. Can someone help please?


回答1:


Try putting the environmental variable assignment after sudo:

sudo ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" pip install gdal

Or, become root, then do the export:

sudo su - 
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" install gdal
pip install ...

It appears that the sudo command does not inherit the environmental variables, and they certainly aren't saved across multiple runs with sudo:

$ export  ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
$ sudo printenv | grep ARCHFLAGS
$ 


来源:https://stackoverflow.com/questions/23021735/pip-install-salt-returns-clang-error-unknown-argument-mno-fused-madd-wu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!