Skip to content

Instantly share code, notes, and snippets.

@asford
Last active November 28, 2015 02:39
Show Gist options
  • Save asford/b9fd01291ecbc7ed5d9a to your computer and use it in GitHub Desktop.
Save asford/b9fd01291ecbc7ed5d9a to your computer and use it in GitHub Desktop.
RHEL 6.7 Linuxbrew Standalone

On hyak build node

Setup modern ruby

mkdir ~/opt
wget 'https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz'
tar -zxof ruby-2.2.3.tar.gz
pushd ruby-2.2.3
configure --prefix=$HOME/opt
make -j 8 && make install
popd

Sanitize build path

PATH=~/opt/bin:~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
unset LD_LIBRARY_PATH PKG_CONFIG_PATH

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
ln -s $(which gcc) `brew --prefix`/bin/gcc-$(gcc -dumpversion |cut -d. -f1,2)
ln -s $(which g++) `brew --prefix`/bin/g++-$(g++ -dumpversion |cut -d. -f1,2)
brew tap homebrew/dupes

Install the compiler tool chain

##Install glibc

brew install glibc
brew remove binutils
brew unlink glibc
brew test glibc
brew install hello && brew test hello; brew remove hello
ln -s `brew —-/prefix/lib `brew --prefix`/lib64

##Install zlib brew install https://raw.githubusercontent.com/Homebrew/homebrew-dupes/master/zlib.rb

##Install binutils

brew install binutils
brew install hello && brew test hello; brew remove hello

##Install gcc brew link glibc brew install patchelf ln -s /usr/lib64/libstdc++.so.6 /lib64/libgcc_s.so.1 brew --prefix/lib/ brew install gcc --with-glibc -v rm -f brew --prefix/lib/{libstdc++.so.6,libgcc_s.so.1} brew link gcc brew install hello && brew test hello; brew remove hello

##Install core utils brew install bzip2 curl expat git brew install ruby PATH=~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin

rm -rf opt ruby-2.2.3 opt ruby-2.2.3.tar.gz
brew install hello && brew test hello; brew remove hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment