gpt4 book ai didi

linux - Boost 找不到本地安装的 icu

转载 作者:太空宇宙 更新时间:2023-11-04 11:51:08 25 4
gpt4 key购买 nike

我正在尝试构建 libboost,1.70.0。我已经编译了 ICU4C,并将其本地安装在我的 $HOME/usr 中。我还构建了 icu-config 以帮助找到它。我的 LD_LIBRARY_PATH 环境变量中有 $HOME/usr/lib,我的 PATH 中有 $HOME/usr/bin

我正在以这种方式运行 bootstrap:

./bootstrap.sh --with-icu=$HOME/usr/ --prefix=$HOME/usr/

输出表明将启用 icu。并且提供的路径保存在 bjam 配置中。

稍后,运行时

./b2 --reconfigure

它说不会使用 ICU:

- bzip2                    : yes
- lzma : no
- zstd : no
- iconv (libc) : yes
- icu : no
- icu (lib64) : no
- native-atomic-int32-supported : yes

虽然不重要,但有趣的是它没有找到 lzma,即使它也在本地安装。

我有点迷茫,不知道我错过了什么。重新编译了几次 ICU,尝试了我在网上找到的不同方法,但没有任何效果。欢迎任何帮助。


Config.log 显示,

In file included from /home/ambs/usr/include/unicode/uversion.h:30:0,
from libs/regex/build/has_icu_test.cpp:12:
/home/ambs/usr/include/unicode/umachine.h:340:13: error: char16_t does not name a type
typedef char16_t UChar;
^
In file included from libs/regex/build/has_icu_test.cpp:12:0:
/home/ambs/usr/include/unicode/uversion.h:173:55: error: UChar does not name a type
u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
^

以及其他类似的错误。我正在(好吧,我想我正在)使用相同的编译器进行编译(它也不在标准路径中,但在我的路径中)。

最佳答案

虽然我不明白为什么 bjam 没有正确检测到编译器,但如果我使用:

./bjam  cxxflags='-std=c++11'

然后,不仅我有 icu,因为我检测到 C++11 功能。

关于linux - Boost 找不到本地安装的 icu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56041307/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com