源码编译llvm Error 记录

$ cmake -G "Unix Makefiles" ../llvm      -DLLVM_ENABLE_PROJECTS="bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libclc;l
ld;lldb;mlir;openmp;polly;pstl;flang"      -DLLVM_BUILD_EXAMPLES=ON      -DCMAKE_BUILD_TYPE=Release           -DLLVM_ENABLE_ASSERTIONS=ON           -DLLVM_ENABLE_RUNTIMES=all             -DLLVM_BUILD_LLVM_DYLIB=ON              -DCMAKE_INSTALL_PREFIX=../bin_lib

Error:

[100%] Built target lldbIntelFeatures
[100%] Linking CXX executable ../../../../bin/lldb
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `whline@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `update_panels@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `waddch@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `waddnstr@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_set@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `newwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `subwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `subpad@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wredrawln@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `new_panel@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `top_panel@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_get@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wbkgd@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `refresh@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_off@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `doupdate@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wtouchln@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `vw_printw@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `mvwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `newpad@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `delscreen@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `newterm@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `derwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_on@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `copywin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `box@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `del_panel@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `init_pair@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wresize@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `start_color@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `noecho@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wgetch@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wmove@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `endwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `delwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `werase@NCURSES6_5.0.19991023'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/lldb/tools/driver/CMakeFiles/lldb.dir/build.make:119: bin/lldb] Error 1
make[1]: *** [CMakeFiles/Makefile2:156157: tools/lldb/tools/driver/CMakeFiles/lldb.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable ../../../../bin/lldb-vscode
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `whline@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `update_panels@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `waddch@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `waddnstr@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_set@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `newwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `subwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `subpad@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wredrawln@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `new_panel@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `top_panel@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_get@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wbkgd@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `refresh@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_off@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `doupdate@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wtouchln@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `vw_printw@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `mvwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `newpad@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `delscreen@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `newterm@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `derwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wattr_on@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `copywin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `box@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `del_panel@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `init_pair@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wresize@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `start_color@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `noecho@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wgetch@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `wmove@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `endwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `delwin@NCURSES6_5.0.19991023'
/usr/bin/ld: ../../../../lib/liblldb.so.16.0.6: undefined reference to `werase@NCURSES6_5.0.19991023'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/lldb/tools/lldb-vscode/CMakeFiles/lldb-vscode.dir/build.make:296: bin/lldb-vscode] Error 1
make[1]: *** [CMakeFiles/Makefile2:156868: tools/lldb/tools/lldb-vscode/CMakeFiles/lldb-vscode.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我可以为您提供一些关于在Linux上编译LLVM源代码的基本步骤。请注意,由于不同的Linux发行版可能有不同的安装要求,所以下面的步骤可能需要根据您的特定情况进行调整。 1. 首先,您需要安装一些必要的依赖项,例如CMake、GCC、Python等。您可以使用以下命令在Ubuntu上安装这些依赖项: ```sh sudo apt-get install cmake build-essential python ``` 2. 下载最新版本的LLVM源代码。您可以在LLVM官方网站(https://llvm.org/)上找到源代码的下载链接。例如,您可以使用以下命令从LLVM官方网站上下载最新版本的源代码: ```sh wget https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/llvm-project-12.0.1.tar.xz ``` 3. 解压缩下载的源代码包并进入解压后的目录: ```sh tar -xf llvm-project-12.0.1.tar.xz cd llvm-project-12.0.1 ``` 4. 创建一个构建目录并进入该目录: ```sh mkdir build cd build ``` 5. 运行CMake,指定LLVM源代码的路径和其他配置选项。例如,您可以使用以下命令启动CMake: ```sh cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS="clang;lld" -DCMAKE_BUILD_TYPE=Release ../llvm ``` 6. 运行make命令来编译LLVM和其他组件: ```sh make -j8 ``` 在这个命令中,“-j8”选项表示使用8个并行处理器编译代码。您可以根据您的机器配置进行调整。 7. 安装编译后的LLVM和其他组件: ```sh sudo make install ``` 完成上述步骤后,您应该能够在Linux上成功编译LLVM源代码。请注意,这只是一个基本的指南,您可能需要根据您的特定情况进行其他调整或安装其他依赖项。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值