sh make.sh cffi.VerificationError: CompileError: command 'gcc' failed with exit status 1

解决方案:

开头加上:

#!/usr/bin/env bash

export CXXFLAGS="-std=c++11"
export CFLAGS="-std=c99"
   raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 36, in <module>
    ffi.build()
  File "/home/vivian/anaconda3/envs/test-pip/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 184, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/vivian/anaconda3/envs/test-pip/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 108, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/vivian/anaconda3/envs/test-pip/lib/python3.6/site-packages/cffi/api.py", line 723, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/vivian/anaconda3/envs/test-pip/lib/python3.6/site-packages/cffi/recompiler.py", line 1526, in recompile
    compiler_verbose, debug)
  File "/home/vivian/anaconda3/envs/test-pip/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/vivian/anaconda3/envs/test-pip/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.VerificationError: CompileError: command 'gcc' failed with exit status 1

参考:

https://blog.csdn.net/zichen7055/article/details/83278966

https://blog.csdn.net/shang_jia/article/details/82929983

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值