installation - Building linuxbrew (homebrew) standalone version on Ubuntu 14.04 -


the primary question

i'm trying build linuxbrew standalone installation on ubuntu 14.04.3 lts, script in original link broken. ideal answer script sets correctly in 1 go. i've improved script run fewer hiccups.

current progress towards fixing script

i'm not able past crti.o error when building gcc via linuxbrew part of standalone setup. however, found resources explaining problem:

i searched file , right there!

find -name crti.o ./.linuxbrew/lib/crti.o ./.linuxbrew/cellar/glibc/2.19/lib/crti.o 

i'm on following compiler error 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, @ step need figure out how make sure brew/linuxbrew/the gcc compilation command knows find it. tried adding path, library_path, , ld_library_path in the script without luck. so, there must other way make sure path set correctly , object file found. ideas?

note: searched in this github issue haven't been able solve @ moment.

update

i think linuxbrew case may needed in linuxbrew gcc formula implements 1 of solutions found in stackoverflow crti.o file missing.

this original homebrew gcc formula reference.

i've updated linuxbrew standalone installation instructions solution. i've created updated linuxbrew-standalone.sh that's tested , working in 14.04 couple of small caveats listed below in todo comments.

# /bin/bash set -e set -u set -x  cd $home  # todo: next ln -s line breaks cross compiling multiarch, need alternative! #       source: https://stackoverflow.com/a/9004026/99379 sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64 sudo apt-get update -y sudo apt-get update --fix-missing -y sudo apt-get install build-essential curl g++ git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev gawk make patch tcl -y  unset ld_library_path pkg_config_path homebrew_cc path=$home/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin yes | ruby -e "$(curl -fssl https://raw.github.com/homebrew/linuxbrew/go/install)"  # hang on here. have press return # note if brew doctor little unhappy want keep going brew doctor || true  mkdir $home/.linuxbrew/lib ln -s lib $home/.linuxbrew/lib64 ln -s $home/.linuxbrew/lib $home/.linuxbrew/lib64 ln -s /usr/lib64/libstdc++.so.6 /lib64/libgcc_s.so.1 $home/.linuxbrew/lib/ path=$home/.linuxbrew/lib:$path export path library_path=$home/.linuxbrew/lib export library_path ld_library_path=$home/.linuxbrew/lib export ld_library_path  # before this, may want `brew edit glibc` produce compatibility particular kernel, example: # "--enable-version=2.6.18"  #brew unlink gawk brew install glibc brew unlink glibc brew install https://raw.githubusercontent.com/homebrew/homebrew-dupes/master/zlib.rb brew reinstall binutils brew link glibc brew install patchelf brew install gcc --with-glibc --only-dependencies -v # when tested gcc working except linking step, that's why force-accepted ||true # todo: make force accepting isn't necessary , errors shown correctly brew install gcc --with-glibc -v || true rm -f $home/.linuxbrew/lib/{libstdc++.so.6,libgcc_s.so.1} brew link gcc --overwrite export homebrew_cc=gcc  brew install bzip2 curl expat brew install git --with-brewed-curl --with-brewed-openssl --without-tcl-tk brew tap homebrew/dupes brew install coreutils findutils gawk gnu-sed gnu-which grep libpng libxml2 libxslt make ncurses readline #ln -s ncursesw/curses.h ncursesw/form.h ncursesw/ncurses.h ncursesw/term.h ncursesw/termcap.h $home/.linuxbrew/include/ #ln -s libncurses.a $home/.linuxbrew/lib/libcurses.a #ln -s libncurses.so $home/.linuxbrew/lib/libcurses.so brew install ruby path=$home/.linuxbrew/bin:$home/.linuxbrew/sbin brew install hello && brew test hello; brew remove hello 

the primary line fixed things sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64, comes caveat i'm interested in fix, because breaks cross compiling multiarch.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -