rh7编译python310源码或的动态库时出现configure warning:By default will build c++ extension modules with g++ if this is not intended then set CXX on the configure command lin,应该怎么办
时间: 2024-03-06 11:48:30 浏览: 14
这个警告提示是默认情况下使用 g++ 编译 C++ 扩展模块,如果不需要可以在 configure 命令行上设置 CXX。如果您需要使用 g++ 编译 C++ 扩展模块,可以忽略此警告,否则可以在执行 configure 命令时使用以下命令:
```
./configure CXX=clang++
```
这将使用 clang++ 编译 C++ 扩展模块。您也可以使用其他 C++ 编译器,只需将其替换为上述命令中的 clang++ 即可。
相关问题
QT 源码静态编译 已安装 clang 仍然提示 WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
如果在 QT 源码静态编译时,出现类似以下 WARNING:
```
WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
```
这可能是因为 QT 的 configure 脚本没有正确地检测到 CLANG 的信息。你可以尝试在编译 QT 之前设置以下环境变量:
```
export LLVM_INSTALL_DIR=/path/to/clang/installation
export LLVM_LIBS_DIR=$LLVM_INSTALL_DIR/lib
export LLVM_INCLUDE_DIR=$LLVM_INSTALL_DIR/include
```
其中,/path/to/clang/installation 是 CLANG 的安装路径。
然后,在编译 QT 之前,执行以下命令:
```
./configure -static -prefix /path/to/qt/installation -opensource -confirm-license -nomake examples -nomake tests -skip qtwebengine -skip qtandroidextras -skip qtmacextras -skip qtpurchasing -skip qtquickcontrols2 -skip qtwebview -no-pch -no-icu -no-cups -no-dbus -no-glib -no-harfbuzz -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-xcb -no-opengl -no-feature-relocatable -no-feature-process -no-feature-shared -no-feature-dynamic -no-feature-ssl -no-openssl -no-system-proxies -no-pulseaudio -no-gtk -no-iconv -no-sse2 -no-avx -no-avx2 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx512f -no-avx512bw -no-avx512cd -no-avx512dq -no-avx512er -no-avx512ifma -no-avx512pf -no-avx512vbmi -no-avx512vl -no-avx512vpopcntdq -no-avx5124fmaps -no-avx5124vnniw -no-avx512bitalg -no-avx512vnni -no-avx512vbmi2 -no-avx512bf16 -no-avx512fp16
```
这个 configure 命令会禁用 QT 中的一些功能,以避免与 CLANG 的冲突。其中,-no-feature-shared 和 -no-feature-dynamic 选项会禁用 QT 的共享库和动态库功能,以确保 QT 静态编译后不依赖于系统中的任何共享库。
如果仍然提示 WARNING,可以在 configure 命令中添加 --verbose 参数,查看 QT 配置过程中的详细信息,以确定问题所在。
QT 编译 提示 WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation
如果您在编译QT时遇到“WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation”的提示,这意味着QT无法找到libclang库,因此无法编译QDoc文档。
要解决此问题您需要安装libclang库。您可以使用以下命令来安装它:
```
sudo apt-get install libclang-dev
```
安装完成后,您需要重新配置和编译QT源码。您可以使用以下命令重新配置QT源码:
```
./configure -opensource -confirm-license -xplatform linux-g++ -static -qt-xcb -developer-build -nomake examples -nomake tests
```
请注意,我们在此添加了“-developer-build”选项,这将启用QDoc文档的编译。然后,您可以使用以下命令重新编译QT源码:
```
make -j4
```
这将使用4个线程并行编译QT源码。整个编译过程可能需要一些时间,具体时间取决于您的计算机性能和QT源码的大小。完成编译后,您应该能够使用QDoc编译QT文档。