Last active
December 21, 2015 15:29
-
-
Save Metaxal/6326948 to your computer and use it in GitHub Desktop.
Compile racket on the QNAP TS 121 (ARMv5)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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