The Primary Question
I'm trying to build the linuxbrew standalone installation on Ubuntu 14.04.3 LTS, but the script in the original link is currently broken. My ideal answer would be a script that sets it up correctly in one go. I've improved the script to run with fewer hiccups.
Current progress towards fixing the script
I'm not able to get past a crti.o
error when building gcc via linuxbrew as part of the standalone setup. However, I found some resources explaining the problem:
- stackoverflow crti.o file missing
- stackoverflow cannot find crti.o
- askubuntu crti.o
- old launchpad bug
I searched for the file and it was right there!
find -name crti.o
./.linuxbrew/lib/crti.o
./.linuxbrew/Cellar/glibc/2.19/lib/crti.o
I'm currently on the following compiler error for 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
Essentially, at this step I need to figure out how to make sure brew/linuxbrew/the gcc compilation command knows where to find it. I tried adding it to PATH
, LIBRARY_PATH
, and LD_LIBRARY_PATH
in the script all without any luck. So, there must be some other way to make sure the path is set correctly and the object file is found. Any ideas?
Note: I originally searched for help in this github issue but they haven't been able to solve this at the moment.
Update
I think a linuxbrew case may be needed in this linuxbrew gcc formula that implements one of the solutions found in stackoverflow crti.o file missing.
This is the original homebrew gcc formula for reference.