内容简介:编译Rust的项目时候出现了错误:关键的错误信息是:原因是升级了Mac系统之后 C++ .h 不正确造成的。 解决的方式,是删除clang相关的编译环境,并重新安装,首先删除头文件:
编译Rust的项目时候出现了错误:
error: failed to run custom build command for croaring-sys v0.3.7
process didn't exit successfully: /Users/.../grin/target/release/build/croaring-sys-20d6d5c35e3a436a/build-script-build (exit code: 101)
--- stdout
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
DEBUG = Some("false")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-std=c11" "-march=native" "-O3" "-o" "/Users/.../grin/target/release/build/croaring-sys-4f7af44253f571e8/out/CRoaring/roaring.o" "-c" "CRoaring/roaring.c"
复制代码
关键的错误信息是:
error: unknown type name 'uint64_t' cargo:warning= uint64_t ri resident_size; 复制代码
原因是升级了Mac系统之后 C++ .h 不正确造成的。 解决的方式,是删除clang相关的编译环境,并重新安装,首先删除头文件:
rm -rf /usr/local/include/*
再卸载LLVM相关的 工具 链
brew uninstall llvm
最后需要卸载掉Xcode命令行工具:
rm -rf /Library/Developer/CommandLineTools
卸载掉clang相关工具之后,再重新安装。 安装Xcode命令行工具:
xcode-select --install
安装llvm
brew install --with-toolchain llvm
重新编译正常。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Developing Large Web Applications
Kyle Loudon / Yahoo Press / 2010-3-15 / USD 34.99
As web applications grow, so do the challenges. These applications need to live up to demanding performance requirements, and be reliable around the clock every day of the year. And they need to withs......一起来看看 《Developing Large Web Applications》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
在线进制转换器
各进制数互转换器