Comments (7)
应该不是少拉了文件之类的,感觉是nghttp2的构建过程(用的autotools那套应该是)有问题,试试git clean . -xdf看看重新来一次OK不
from yadcc.
应该不是少拉了文件之类的,感觉是nghttp2的构建过程(用的autotools那套应该是)有问题,试试git clean . -xdf看看重新来一次OK不
大概知道原因了,通过环境变量指定gcc路径,在一些非blade构建的三方库不生效。
由于机器上默认的gcc版本为4.x,这里搜索了blade的文档,export CC=/home/distcc/gcc-8.3.0/bin/gcc CXX=/home/distcc/gcc-8.3.0/bin/g++ CPP=/home/distcc/gcc-8.3.0/bin/cpp LD=/home/distcc/gcc-8.3.0/bin/g++
,export了这些变量来指定gcc路径。
上面出现报错,在去掉环境变量 LD=/home/distcc/gcc-8.3.0/bin/g++,就不会出现了。
另外还发现编译fmt的时候,命令中修改CXX为g++,导致环境变量不生效,命令如下。
**CXX=g++ CC=gcc** cmake -DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_EXPORT_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DFMT_TEST=OFF ../fmt-7.1.3
手动修改了命令后,fmt不再报错。不过还有其他三方库在报错。
所以应该如何正确指定gcc路径?
from yadcc.
把gcc8的bin目录加到path最前面试试
手动改了CXX是因为有些第三方库会默认找到clang去,所以hack了一把
from yadcc.
还是不好使。
一些打印编译指令的还能手动改改。
类似,ctemplate这种的,编译指令都不打印的,完全不知道怎么改。好崩溃。。。
$ make -C build64_release/thirdparty/ctemplate/ctemplate-ctemplate-2.4
make: Entering directory `/home/syslab/wuminghui/yadcc/yadcc/build64_release/thirdparty/ctemplate/ctemplate-ctemplate-2.4'
make all-am
make[1]: Entering directory `/home/syslab/wuminghui/yadcc/yadcc/build64_release/thirdparty/ctemplate/ctemplate-ctemplate-2.4'
CXXLD make_tpl_varnames_h
./.libs/libctemplate_nothreads.so: undefined reference to `ctemplate_htmlparser::htmlparser_new()'
./.libs/libctemplate_nothreads.so: undefined reference to `ctemplate_htmlparser::htmlparser_attr_type(ctemplate_htmlparser::htmlparser_ctx_s*)'
./.libs/libctemplate_nothreads.so: undefined reference to `ctemplate_htmlparser::htmlparser_state(ctemplate_htmlparser::htmlparser_ctx_s*)'
./.libs/libctemplate_nothreads.so: undefined reference to `typeinfo for ctemplate::BaseArena'
./.libs/libctemplate_nothreads.so: undefined reference to `ctemplate::BaseArena::~BaseArena()'
./.libs/libctemplate_nothreads.so: undefined reference to `ctemplate::BaseArena::Reset()'
from yadcc.
最终部分编不过的库,手动编完,在软链进build64_release中,现在编译终于通过了,期待明天能跑
from yadcc.
这个不太对……
- 检查
/home/distcc/gcc-8.3.0/bin/
下面有没有cc
,很多手动编译的gcc会缺这个,然后跟cmake合作会有问题。不过BUILD里面强行改成了gcc
,可能没有cc
也能跑。不放心话可以把gcc软链接成cc。 export PATH=/home/distcc/gcc-8.3.0/bin/:$PATH
把gcc8加到PATH
。这时候命令行执行gcc -v
应该是8.x。- 环境变量的
CC
CXX
LD
之类的全部unset掉。 - 把
build64_release
删掉。 - 全新编译一次试试。
鹅厂内部用的系统跟CentOS7用户态基本一样,原生的CentOS7应该只要把gcc 8放在PATH
头部就没啥特殊要求了(除了blade
依赖的,比如python)才对。
from yadcc.
问题可能是出在:
- 一些环境没unset掉
./blade clean ...
和 直接删除build目录的逻辑不同。
之前试过unset CXX等环境变量,同时./blade clean,但是还是有问题。今天创新打开了终端,并且删除了build64_release
, 把gcc8的加入到PATH就可以正常编译了,不存在 cc
并不影响。
from yadcc.
Related Issues (20)
- 文件预处理是由客户端自己完成吗 HOT 9
- 技术原理请教 HOT 2
- Cannot contact delegate daemon. Daemon died? HOT 9
- 能否给daemon加个功能,当scheduler重启后自动重链 HOT 2
- 关于调度机制的问题 HOT 1
- yadcc编译时,提示ld链接无法找到pthread、m、c、dl等动态库 HOT 2
- [2023-01-29 20:02:30.532771] [INFO ] [yadcc/client/cxx/yadcc-cxx.cc:207] Failed on the cloud with [-126]. Failing back to local machine. HOT 2
- 无法缓存C++编译之后的文件 HOT 2
- 安装失败 HOT 2
- can not support CROSS_COMPILE HOT 8
- yadcc v1.x 版本编译报错 HOT 1
- failling back to local machine 126 HOT 3
- yadcc能不能用于安卓系统AOSP构建加速 HOT 3
- 经常编译报错. Child process exited unexpectedly with status HOT 1
- 当我运行./yadcc-daemon时,报Check failed: parts.size() >= 3 (2 vs. 3) Unexpected cgroup setting错误 HOT 2
- build latest llvm failed HOT 1
- 运行daemon错误 HOT 1
- --with-nghttp2 was specified but could not find libnghttp2 pkg-config file.
- 这个是否支持clang? HOT 3
- 如何使用如YADCC_IGNORE_TIMESTAMP_MACROS这样的参数去控制客户端的行为? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yadcc.