/usr/bin/ld: crtbegin.o: 没有这样的文件: 没有这样的文件或目录
/usr/bin/ld: crtbegin.o: No such file: No such file or directory
我想安装 llvm-clang,但在工作中没有 root 访问权限。 我们的许多软件包都已经过时了,所以我在我的主目录下本地安装所有内容。
我安装了 cmake 和 gcc,但现在在安装 llvm 时出现错误。
我的主目录结构如下:
~/gcc_build -> has the /bin directory which includes gcc, g++...etc (result of make install).
~/gcc-7.1.0 -> which has the main gcc build directory (where make was run)
~/llvm-4.0.0.src -> the main llvm directory
~/llvm_make -> where I am trying to make llvm in (empty)
这是我的命令:
[server-01:llvm_make]% ../cmake-3.8.2/bin/cmake ../llvm-4.0.0.src -DCMAKE_CXX_COMPILER=/home/sbay/gcc_build/bin/g++ -DCMAKE_C_COMPILER=/home/sbay/gcc_build/bin/gcc
但是我收到此错误:
[server-01:llvm_make]% ../cmake-3.8.2/bin/cmake ../llvm-4.0.0.src -DCMAKE_CXX_COMPILER=/home/sbay/gcc_build/bin/g++ -DCMAKE_C_COMPILER=/home/sbay/gcc_build/bin/gcc
-- The C compiler identification is GNU 7.1.0
-- The CXX compiler identification is GNU 7.1.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/sbay/bin/gcc
-- Check for working C compiler: /home/sbay/gcc_build/bin/gcc
-- Check for working C compiler: /whome/sbay/gcc_build/bin/gcc -- broken
CMake Error at /home/sbay/cmake-3.8.2/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "/home/sbay/gcc_build/bin/gcc" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: /home/sbay/llvm_make/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_13e2f/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_13e2f.dir/build.make
CMakeFiles/cmTC_13e2f.dir/build
gmake[1]: Entering directory
`/home/sbay/llvm_make/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_13e2f.dir/testCCompiler.c.o
/home/sbay/gcc_build/bin/gcc -o
CMakeFiles/cmTC_13e2f.dir/testCCompiler.c.o -c
/home/sbay/llvm_make/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_13e2f
/home/sbay/cmake-3.8.2/bin/cmake -E cmake_link_script
CMakeFiles/cmTC_13e2f.dir/link.txt --verbose=1
/home/sbay/gcc_build/bin/gcc
CMakeFiles/cmTC_13e2f.dir/testCCompiler.c.o -o cmTC_13e2f
/usr/bin/ld: crtbegin.o: No such file: No such file or directory
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_13e2f] Error 1
gmake[1]: Leaving directory
`/home/sbay/llvm_make/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_13e2f/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:47 (project)
-- Configuring incomplete, errors occurred!
See also "/home/sbay/llvm_make/CMakeFiles/CMakeOutput.log".
See also "/home/sbay/llvm_make/CMakeFiles/CMakeError.log".
我将非常感谢任何意见。
你可以尝试添加 --sysroot= 选项例如--sysroot=/home/lz/olimex/gcc-4.3.3/
相关文章:
- /usr/include/c++/7/cstdlib:75:15:致命错误:stdlib.h:没有这样的文件或目录 #i
- pip install uwsgi 失败,出现 /usr/local/include/string/string.h:7:10:致命错误:找不到'sstream'文件?
- bitbake-grpc交叉编译/配置失败,错误为c-ares::care引用文件/usr/lib/libcares.s
- /usr/bin/ld: build-debug/obj/gpsitem.o: 文件无法识别: 文件被截断
- C++ 可执行文件在运行时找不到库,即使它在 /usr/lib 中(在 Linux 上)
- Java System.loadLibrary 不会在 /usr/lib/x86_64-linux-gnu/ 文件夹中查
- Boost 文件在 /usr/local/include 和 /usr/include 中有所不同
- C++: 错误: opencv_core: 即使所需的 .so 文件位于 /usr/lib/ 中,也没有这样的文件或目录
- /usr/bin/ld: crtbegin.o: 没有这样的文件: 没有这样的文件或目录
- ld:找不到文件:/usr/lib/crt1.o
- /usr/bin/ld:无法打开输出文件 bin/genericMatching:没有这样的文件或目录
- /usr/bin/ld找不到标头:未识别的文件格式
- 不应该在 /usr/local/include 中抑制来自头文件的警告吗?
- Cmake,在 /usr/local/include 中查找头文件,在 /usr/local/lib 中查找库
- 链接 CXX 可执行文件 - /usr/bin/ld:找不到
- 编译 fortran 文件"/usr/bin/ld: errno: TLS definition in /lib/libc.so.6"
- Xcode 4.3在/usr/include中找不到头文件
- QTableView clearSelect 失败,并显示 ASSERT:在文件 /usr/include/qt4/QtCore/qlist.h 中"!isEmpty()",第 282 行
- 如何在cmake项目中包含/usr/include中的头文件
- GCC在/usr/local/include中找不到头文件