I've been looking into getting FreeBASIC working on it, for something I can keep easily stored in a VirtualBox VM for easy access.
I've compiled these instructions on a bare 32-bit setup of Tiny Core Linux 9.0.
They should even work from a live environment, but I'd recommend a hard disk install, so that you have somewhere to save the downloaded packages and FreeBASIC source/binaries etc.
Packages in Tiny Core are installed with 'tce-load -wi package-names'. This saves the package to the hard disk, loads it now, and configures it load at next boot.
Alternatively, to not load the package on every boot, you can just download the package with 'tce-load -w ...', and load the package now with 'tce-load -i ...'
Here are the dependencies:
Code: Select all
# Packages needed to compile with fbc
tce-load -wi ncurses5 binutils gcc glibc_base-dev glib2
# Packages needed to compile fbc and its libraries
tce-load -wi make linux-4.14.3_api_headers ncurses-dev gpm-dev libX11-dev libffi-dev libGL-dev libXpm-dev libXext-dev libXrandr-dev
# git, for downloading new source code
tce-load -wi git
# Command-line niceties
tce-load -wi bash nano screen
Code: Select all
# FB directory
FBDIR=/mnt/sda1/fb/
FBGITDIR=$FBDIR/fbc-git/
# create FB directory, make it writable
sudo mkdir $FBDIR
sudo chmod a+w $FBDIR
Code: Select all
wget 'https://downloads.sourceforge.net/project/fbc/Binaries - Linux/More/FreeBASIC-1.05.0-linux-x86.tar.xz'
tar -C $FBDIR -xJf FreeBASIC-1.05.0-linux-x86.tar.xz
FBC=$FBDIR/bin/fbc
alias fbc=$FBC
Code: Select all
echo 'print "Hello World!" ' > ~/hello.bas
fbc ~/hello.bas
~/hello # Hello World!
Code: Select all
git clone https://github.com/freebasic/fbc.git $FBGITDIR
cd $FBGITDIR
make FBC=$FBC
Code: Select all
FBC=$FBGITDIR/bin/fbc
alias fbc=$FBC
fbc ~/hello.bas && ~/hello # Hello world!
Code: Select all
cd $FBGITDIR
make clean-tests
make unit-tests FBC=$FBC
make log-tests FBC=$FBC
make warning-tests FBC=$FBC
Finally, I set my profile to set up $FBDIR / $FBGITDIR / fbc for me whenever I log in:
Code: Select all
echo 'export FBDIR=/mnt/sda1/fb/' >> ~/.profile
echo 'export FBGITDIR="$FBDIR/fbc-git/"' >> ~/.profile
echo 'export FBC="$FBGITDIR/bin/fbc"' >> ~/.profile
echo 'alias fbc="$FBC"' >> ~/.profile
Code: Select all
filetool.sh -b -v
The VM uses around 256 MB of memory at rest, so should comfortably run in 512 MB RAM.
I hope you find this useful.
I've revised these instructions retrospectively as I've gone along, so it would be good to see how someone finds working through them from start to finish.