【发布时间】:2015-12-27 14:09:57
【问题描述】:
主要问题
我正在尝试在 Ubuntu 14.04.3 LTS 上构建 linuxbrew standalone installation,但原始链接中的脚本当前已损坏。我理想的答案是一个脚本,它可以一次性正确设置。我有improved the script 可以减少打嗝。
修复脚本的当前进展
在通过 linuxbrew 作为独立设置的一部分构建 gcc 时,我无法通过 crti.o 错误。但是,我找到了一些解释问题的资源:
- stackoverflow crti.o file missing
- stackoverflow cannot find crti.o
- askubuntu crti.o
- old launchpad bug
我搜索了该文件,它就在那儿!
find -name crti.o
./.linuxbrew/lib/crti.o
./.linuxbrew/Cellar/glibc/2.19/lib/crti.o
我目前遇到crtn.o 的以下编译器错误:
/home/hbr/.linuxbrew/Cellar/binutils/2.25.1/x86_64-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/home/hbr/.linuxbrew/Cellar/binutils/2.25.1/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
/home/hbr/.linuxbrew/Cellar/binutils/2.25.1/x86_64-unknown-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/tmp/gcc20150929-3726-hif3of/gcc-5.2.0/build/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/tmp/gcc20150929-3726-hif3of/gcc-5.2.0/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/tmp/gcc20150929-3726-hif3of/gcc-5.2.0/build'
make: *** [bootstrap] Error 2
本质上,在这一步我需要弄清楚如何确保 brew/linuxbrew/gcc 编译命令知道在哪里找到它。我尝试将它添加到the script 中的PATH、LIBRARY_PATH 和LD_LIBRARY_PATH,但都没有任何运气。因此,必须有其他方法来确保正确设置路径并找到目标文件。有什么想法吗?
注意:我最初在this github issue 寻求帮助,但他们目前无法解决此问题。
更新
我认为在这个linuxbrew gcc formula 中可能需要一个 linuxbrew 案例,它实现了在 stackoverflow crti.o file missing 中找到的解决方案之一。
这是原homebrew gcc formula供参考。
【问题讨论】:
标签: ubuntu installation homebrew linuxbrew