PaddleNLP [Bug]:无法使用Clang构建fast_tokenizer

knsnq2tg  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(37)

软件环境

N/A

重复问题

  • 我已搜索现有的问题

错误描述

Upon setup and build fast_tokenizer with Clang, the build fails in extern_icu and ends with configure: 

checking if we have a C++ compiler... no
configure: error: C++ compiler g++ does not work or no compiler found
../extern_icu/icu4c/source/runConfigureICU: ./configure failed
make[2]: *** [CMakeFiles/extern_icu.dir/build.make:92: third_party/icu/src/extern_icu-stamp/extern_icu-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:275: CMakeFiles/extern_icu.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

A potential cause might be the hard coding gcc compiler used in building icu4c https://github.com/PaddlePaddle/PaddleNLP/blob/develop/fast_tokenizer/cmake/external/icu.cmake#L116.

稳定复现步骤 & 代码

cmake -DCMAKE_C_COMPILER=clang \
      -DCMAKE_CXX_COMPILER=clang++ \
      -DCMAKE_CXX_FLAGS="-stdlib=libc++" \
      -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi" \
      -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++ -lc++abi" <PATH_TO_FAST_TOKENIZER>
make -j
iezvtpos

iezvtpos1#

这个问题已经过时了,因为它已经开放了60天,没有任何活动。当前的问题在60天内没有活动,被标记为过时。

相关问题