Skip to content

Instantly share code, notes, and snippets.

@emersion
Last active December 1, 2016 11:26
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save emersion/11205966 to your computer and use it in GitHub Desktop.
Save emersion/11205966 to your computer and use it in GitHub Desktop.
Gitlab install on Raspberrypi (cross-compiling)
# Gitlab install instructions: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md
# Cross-compiling on Rpi: https://raspberrypi.stackexchange.com/questions/1/how-do-i-build-a-gcc-4-7-toolchain-for-cross-compiling
apt-get update -y
apt-get upgrade -y
apt-get install -y sudo
apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate
apt-get install -y git-core
apt-get install -y postfix
# Other dependencies
apt-get install autoconf
# Ruby
# Alternatively, i've found that: http://rsync.labby.co.uk/raspberrypi/raspbian/pool/main/r/ruby2.0/
# (did not test)
# Rpi toolchain
git clone https://github.com/raspberrypi/tools.git --depth 1
export PATH=~/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin:$PATH
# Ruby (2.0.0-p451)
# warning: there was an error with p353: `require': cannot load such file -- date_core (LoadError)
# See https://bugs.ruby-lang.org/issues/9169
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz
cd ruby-2.0.0-p451
./configure --disable-install-rdoc
# Patch Ruby
# There is a bug in ext/readline/readline.c
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741825
# Patch diff: https://launchpadlibrarian.net/170025658/ruby2.0_2.0.0.484-1ubuntu1_2.0.0.484-1ubuntu2.diff.gz
# Replace line 1886 with: rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
# Build Ruby
make CROSS_COMPILE=arm-bcm2708hardfp-linux-gnueabi-
# Copy build to Rpi
scp -r . pi@raspberrypi
# Make install on Rpi
ssh pi@raspberrypi
# We need to install Ruby in order to make Ruby
apt-get install ruby
./configure --disable-install-rdoc --with-baseruby=/usr/bin/ruby
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment