Coder Social home page Coder Social logo

安装报错 about yadcc HOT 7 CLOSED

tencent avatar tencent commented on May 18, 2024
安装报错

from yadcc.

Comments (7)

0x804d8000 avatar 0x804d8000 commented on May 18, 2024

应该不是少拉了文件之类的,感觉是nghttp2的构建过程(用的autotools那套应该是)有问题,试试git clean . -xdf看看重新来一次OK不

from yadcc.

zcfh avatar zcfh commented on May 18, 2024

应该不是少拉了文件之类的,感觉是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.

0x804d8000 avatar 0x804d8000 commented on May 18, 2024

把gcc8的bin目录加到path最前面试试

手动改了CXX是因为有些第三方库会默认找到clang去,所以hack了一把

from yadcc.

zcfh avatar zcfh commented on May 18, 2024

还是不好使。

一些打印编译指令的还能手动改改。
类似,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.

zcfh avatar zcfh commented on May 18, 2024

最终部分编不过的库,手动编完,在软链进build64_release中,现在编译终于通过了,期待明天能跑

from yadcc.

0x804d8000 avatar 0x804d8000 commented on May 18, 2024

这个不太对……

  1. 检查/home/distcc/gcc-8.3.0/bin/下面有没有cc,很多手动编译的gcc会缺这个,然后跟cmake合作会有问题。不过BUILD里面强行改成了gcc,可能没有cc也能跑。不放心话可以把gcc软链接成cc。
  2. export PATH=/home/distcc/gcc-8.3.0/bin/:$PATH把gcc8加到PATH。这时候命令行执行gcc -v应该是8.x。
  3. 环境变量的CC CXX LD之类的全部unset掉。
  4. build64_release删掉。
  5. 全新编译一次试试。

鹅厂内部用的系统跟CentOS7用户态基本一样,原生的CentOS7应该只要把gcc 8放在PATH头部就没啥特殊要求了(除了blade依赖的,比如python)才对。

from yadcc.

zcfh avatar zcfh commented on May 18, 2024

问题可能是出在:

  • 一些环境没unset掉
  • ./blade clean ... 和 直接删除build目录的逻辑不同。

之前试过unset CXX等环境变量,同时./blade clean,但是还是有问题。今天创新打开了终端,并且删除了build64_release, 把gcc8的加入到PATH就可以正常编译了,不存在 cc 并不影响。

from yadcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.