Skip to content

Instantly share code, notes, and snippets.

@Metaxal
Last active December 21, 2015 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Metaxal/6326948 to your computer and use it in GitHub Desktop.
Save Metaxal/6326948 to your computer and use it in GitHub Desktop.
Compile racket on the QNAP TS 121 (ARMv5)
# This is not really a script and should be run line by line instead.
# With the admin user, do the following.
# Install Optware (ipkg)
# and configure the admin's path.
# http://wiki.qnap.com/wiki/Install_Optware_IPKG
# Install correct versions of basic tools,
# otherwise the following will not work.
ipkg install coreutils make find grep sed gawk
# Create a directory where to place our builds
cd /share/HDA_DATA
mkdir build
cd build
# Building libffi
# (although building libffi could be disabled when configuring racket
# and racket can also build itself it seems)
# Read https://github.com/atgreen/libffi
git clone git://github.com/atgreen/libffi.git
cd libffi
./configure --prefix /opt
make
make install
# Strangely the .h files were not copied to /opt/include, so we do it
# manually:
cp armv5tel-unknown-linux-gnueabi/include/ffi.h /opt/include
cd ..
# Building racket
# Read https://github.com/plt/racket/blob/master/INSTALL.txt
# Also https://github.com/plt/racket/tree/master/racket/src/INSTALL.txt
git clone https://github.com/plt/racket
cd racket
# make PGKS="" # ... did not work.
# Then follow the subdirectory installation instructions in
# https://github.com/plt/racket/tree/master/racket/src/INSTALL.txt
cd racket/src
mkdir build
cd build
# gracket is not useful on the server:
../configure --disable-gracket
# Add "--prefix /opt" if you want to install it globally,
# instead of an in-place installation.
make
make install
# raco: bootstrapping from source may take several minutes without any
# message before actually showing some lines.
# Now racket should be installed. Test it:
racket/bin/racket
# ... (exit) to finish.
# Install packages:
cd pkgs
../racket/bin/raco pkg install base
# etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment