内容简介:编译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
重新编译正常。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 使用 Visual Studio 编译时,让错误一开始发生时就停止编译(以便及早排查编译错误节省时间)
- PHP7编译错误:php编译undefined reference to `libiconv 错误
- 奇怪的GWT编译错误
- c++ 单元测试编译时错误
- C语言编译常见错误解析
- Maven在Java8下忽略Javadoc的编译错误
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Building Web Reputation Systems
Randy Farmer、Bryce Glass / Yahoo Press / 2010 / GBP 31.99
What do Amazon's product reviews, eBay's feedback score system, Slashdot's Karma System, and Xbox Live's Achievements have in common? They're all examples of successful reputation systems that enable ......一起来看看 《Building Web Reputation Systems》 这本书的介绍吧!