最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

macxcode5.1安装Mysql-python编译异常解决

来源:懂视网 责编:小采 时间:2020-11-09 13:35:37
文档

macxcode5.1安装Mysql-python编译异常解决

macxcode5.1安装Mysql-python编译异常解决:mac xcode5.1安装Mysql-python编译错误解决 前几天才入的macbook air,在 app store 安装的xcode和command_line_tools都是最新版本,结果我被坑了,编译工具太新了,不兼容,出现错误。 clang : error : unknown argument
推荐度:
导读macxcode5.1安装Mysql-python编译异常解决:mac xcode5.1安装Mysql-python编译错误解决 前几天才入的macbook air,在 app store 安装的xcode和command_line_tools都是最新版本,结果我被坑了,编译工具太新了,不兼容,出现错误。 clang : error : unknown argument

mac xcode5.1安装Mysql-python编译错误解决 前几天才入的macbook air,在 app store 安装的xcode和command_line_tools都是最新版本,结果我被坑了,编译工具太新了,不兼容,出现错误。 clang : error : unknown argument : '-mno-fused-madd' [- Wunused - c

mac xcode5.1安装Mysql-python编译错误解决

前几天才入的macbook air,在 app store 安装的xcode和command_line_tools都是最新版本,结果我被坑了,编译工具太新了,不兼容,出现错误。

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


我在mysql-python.sourceforge.net下载MySQL-python-1.2.4b4.tar.gz

shell cmd :

tar -cjf MySQL-python-1.2.4b4.tar.gz

cd MySQL-python-1.2.4b4

python setup.py build

然后出现下面都错误代码

build/lib.macosx-10.9-intel-2.7/MySQLdb running build_ext building '_mysql' extension
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 -pipe -Dversion_info=(1,2,4,'beta',4) -D__version__=1.2.4b4 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-intel-2.7/_mysql.o -Os -g -fno-strict-aliasing -arch x86_64
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

error: command 'cc' failed with exit status 1

说一下问题分析过程,我开始分析 setup.py里面的代码,想找出编译选项-mno-fused-madd,然后将它删除,可是找了半天没找到,

发现python调用的是setuptools模块,我就去找这个模块的代码,最后发现是一个egg包,没办法去看它的源码。


最后没办法了,我想了一下应该是我的编译工具太新了的原因。

最后成功解决办法:

我在网上找到xcode5.0.2和老一点版本的command_line_tools的dmg包

卸载xcode5.1然后安装这两个包,最后问题解决了!!!

文档

macxcode5.1安装Mysql-python编译异常解决

macxcode5.1安装Mysql-python编译异常解决:mac xcode5.1安装Mysql-python编译错误解决 前几天才入的macbook air,在 app store 安装的xcode和command_line_tools都是最新版本,结果我被坑了,编译工具太新了,不兼容,出现错误。 clang : error : unknown argument
推荐度:
标签: 安装 解决 Mac
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top