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

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

软件环境

  1. N/A

重复问题

  • 我已搜索现有的问题

错误描述

  1. Upon setup and build fast_tokenizer with Clang, the build fails in extern_icu and ends with configure:
  2. checking if we have a C++ compiler... no
  3. configure: error: C++ compiler g++ does not work or no compiler found
  4. ../extern_icu/icu4c/source/runConfigureICU: ./configure failed
  5. make[2]: *** [CMakeFiles/extern_icu.dir/build.make:92: third_party/icu/src/extern_icu-stamp/extern_icu-configure] Error 1
  6. make[1]: *** [CMakeFiles/Makefile2:275: CMakeFiles/extern_icu.dir/all] Error 2
  7. make: *** [Makefile:91: all] Error 2
  8. 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.

稳定复现步骤 & 代码

  1. cmake -DCMAKE_C_COMPILER=clang \
  2. -DCMAKE_CXX_COMPILER=clang++ \
  3. -DCMAKE_CXX_FLAGS="-stdlib=libc++" \
  4. -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi" \
  5. -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++ -lc++abi" <PATH_TO_FAST_TOKENIZER>
  6. make -j
iezvtpos

iezvtpos1#

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

相关问题