Compilation ARM64 - DONE

Finally, I fixed it -
there is a link to old version of evhtp package (v1.1.6)
Compiled and install it.
Now my ARM64 self-built package is fully working.

sudo pip install moviepy
sudo pip install django-appconf
sudo pip install qrcode
sudo pip install django-formtools
sudo pip install captcha
sudo pip install django-webpack-loader
sudo pip install django-tagging
sudo pip install django-simple-captcha

make sure to install above Python packages

if pip point to pip3, then use pip2 to install above packages

Share my binary package:
(for Ubuntu 18.04LTS only, gcc7 compiler, GLIBC_VER2.5)

install ldap development package :
sudo apt install libldap2-dev
my build includes ldap feature
(for Ubuntu 16.04LTS )

Verify what is missing or why seafile or seahub not started.

logs/controller.log and seafile.log can tell the reason why seafile does not start properly.
./ start-fastcgi
shows what is wrong or missing for seahub

Once everything is good and ready.
./ start
./ start
Per official document, start-fastcgi is obsoleted, but good for debugging purpose.

Create D service script file for seafile and seahub, and put them into /etc/systemd/system
sudo systemctl start seafile
sudo systemctl start seahub

Seems like such a laborious and extremely complicated process. Is there any plan to move all of this to an ARM64 supported Docker image?!

I have made a docker image for ARM64, tested on rpi3 with ubuntu 18.04 64bit and qnap TS-212P3 (RTD1295 4C A53).

Change ~/Downloads/seafile to your prefer folder. 8000 for seafile, 8080 for WebDAV (need to enable), 8082 for seahub.

docker run --name seafile \
  -v ~/Downloads/seafile:/home/seafile \
  -p 8000:8000 \
  -p 8080:8080 \
  -p 8082:8082 \
  -ti mjysci/seafile:arm64v8

After configuration, ^P^Q to detach.

Could you please handle the MaridaDB support with their official image and just link it. Restoring those mixed images is pain in the ass. Additionally, Seafile should be stored under /opt. Maybe look at some existing good Docker seafile images and port one of them to ARM64.

First of all thank you for your image.

Unfortunately it doesn’t run on my rockpro64.
I got every time a INTERNAL SERVER ERROR, the seahub.log is empty and i can’t find any useful information in the seafile.log

Edit: The docker file from mjy works btw, but it looks strange.

@coinabc Maybe you can try my compilation guide above. A friend of mine who owns another RK3399 board compiled it just fine by following my instructions.

Yes, that will be my next step.
But what is the latest version of the compilation guide, your second post or the guide from jzhang18?

Probably his, I moved a long time ago off seafile in favor of syncthing.

Alright, thanks.

I tried to compile seafile today.
So far everything has worked, only the last command (packaging) didn’t work.
I got an error after i execute (with some params)

[ERROR] ~/seafile-sources/libsearpc-3.1.0.tar.gz not exists

But if i check it with ls ~/seafile-sources/libsearpc-3.1.0.tar.gz the file was found.

7.0 is out and i think we need an update on how to compile seafile. I was able to compile seafile in chroot, but without mysql support.
Seems like a missed one step :’) Maybe you guys can help us out getting 7.0 compiled for arm64

7.0.4 arm64 sqlite only

export BASE=/opt/seafile
export DIR=$BASE/src
export LC_ALL=C
export CHROOTD=/opt/arm64chroot
#export CHROOTD=/home/helge/debian-arm64/
export MIRROR=
export SUITE=buster

mkdir -p $CHROOTD
mkdir -p $DIR
#We're "crosscompiling"
qemu-debootstrap --arch=arm64 --keyring /usr/share/keyrings/debian-archive-keyring.gpg --variant=buildd --include=bash,apt-utils,ca-certificates,cmake,build-essential $SUITE $CHROOTD $MIRROR

#Mounts for chroot
mount -t proc none "$CHROOTD/proc"
mount -t sysfs none "$CHROOTD/sys"
mount --bind /dev/pts "$CHROOTD/dev/pts"

LANG=C LC_ALL=C DEBIAN_FRONTEND=noninteractive chroot "$CHROOTD"

#Export again
export BASE=/opt/seafile
export DIR=$BASE/src
#export DIR=$BASE/dev
export CORES=4
export LOGDIR=$BASE/log
export VERSION=7.0

#export PKG_CONFIG_PATH=/usr/local/include/evhtp:/usr/local/lib/:/usr/local/include:/usr/include/mariadb/mysql:/usr/include/mariadb/:$DIR/ccnet-server:$DIR/libsearpc:$DIR/seafile-server/lib
export PKG_CONFIG_PATH=/usr/include/mariadb/mysql:/usr/include/mariadb:$DIR/ccnet-server:$DIR/libsearpc:$DIR/seafile-server/lib:$DIR/seafile-server:/opt/seafile/src/libevhtp/libevhtp-1.1.6:/usr/include
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#export PATH=$DIR/seahub_thirdparty:$PATH

mkdir -p $CHROOTD
mkdir -p $DIR
mkdir -p $LOGDIR

# Install Packages
apt-get install apt-get install autoconf automake libpq-dev libtool libevent-dev libcurl4-openssl-dev libgtk2.0-dev uuid-dev intltool libsqlite3-dev valac libjansson-dev cmake qtchooser qtbase5-dev libqt5webkit5-dev qttools5-dev qttools5-dev-tools libssl-dev wget git libjpeg-dev  libldap2-dev python-openssl libssl-dev python-pip python-numpy libevent-dev libonig-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmariadbclient-dev default-libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev re2c flex python-dev python-setuptools python-setuptools cmake

#libmysqlcppconn-dev libmariadbd-dev 
# entfernt : python3-numpy python3-pip python3-openssl python3-dev python3-setuptools

cd $DIR
git clone
cd $DIR/libevhtp
cmake -j$CORES
make -j$CORES
make install

#apt install libevhtp-dev

cd $DIR
git clone -b $VERSION --single-branch
cd $DIR/libsearpc
sed -i "s,3.1.0,$VERSION,g" $DIR/libsearpc/
make -j$CORES 2>&1 | tee $LOGDIR/make_libsearpc
make -j$CORES dist 2>&1 | tee $LOGDIR/make_libsearpc_dist

cd $DIR
git clone -b $VERSION --single-branch
cd $DIR/ccnet-server
#edit version in
sed -i "s,6.0.1,$VERSION,g" $DIR/ccnet-server/
#Enable subir-objects to get rid of warning
sed -i "s,AM_INIT_AUTOMAKE(\[1.9 foreign\]),AM_INIT_AUTOMAKE(\[1.9 foreign\] \[subdir-objects\])," $DIR/ccnet-server/
#./configure --with-mysql=/usr/local/bin/mariadb_config 2>&1 | tee $LOGDIR/configure_ccnet-server
./configure 2>&1 | tee $LOGDIR/configure_ccnet-server

#mysql check doesnt understand mariadb_config output - 
#checking for MySQL... /usr/bin/yes: unrecognized option '--include'
#Try '/usr/bin/yes --help' for more information.
#/usr/bin/yes: unrecognized option '--libs'
#Try '/usr/bin/yes --help' for more information.
#./configure --enable-ldap --with-mysql --enable-python 2>&1 | tee $LOGDIR/configure_ccnet-server

make -j$CORES dist 2>&1 | tee $LOGDIR/make_ccnet-server_dist

cd $DIR
git clone -b $VERSION --single-branch
cd $DIR/seafile-server
#edit version in
sed -i "s,6.0.1,$VERSION,g" $DIR/seafile-server/
#Add [include-subdir] in AM_INIT_AUTOMAKE
sed -i "s,AM_INIT_AUTOMAKE(\[1.9 foreign\]),AM_INIT_AUTOMAKE(\[1.9 foreign\] \[subdir-objects\])," $DIR/seafile-server/
#Configure with mysql enforced
# ./configure --with-mysql 2>&1 | tee $LOGDIR/configure_seafile-server
make -j$CORES dist 2>&1 | tee $LOGDIR/cmake_seafile-server

mkdir $DIR/seahub_thirdparty
cd $DIR/seahub_thirdparty


mv 2.1.10.tar.gz djangoframework.tar.gz

#export PYTHONPATH=/usr/local/lib/python3/dist-packages:/$DIR/seahub_thirdparty
export PYTHONPATH=/$DIR/seahub_thirdparty
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/chardet-3.0.4.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/django-formtools-2.1.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/django-picklefield-2.0.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/django-post_office-3.2.1.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/django-statici18n-1.8.3.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/django_compressor-2.3.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/djangoframework.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/djangorestframework-3.10.2.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/et_xmlfile-1.0.1.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/flup-1.0.3.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/futures-3.3.0.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/gunicorn-19.9.0.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/index.html
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/jdcal-1.4.1.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/jsonfield-2.0.2.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/openpyxl-2.6.2.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/python-dateutil-2.8.0.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/pytz-2019.2.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/qrcode-6.1.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/six-1.12.0.tar.gz
python3 /usr/lib/python3/dist-packages/ -d . $DIR/seahub_thirdparty/Djblets-1.0.12.tar.gz

cd $DIR
git clone -b $VERSION --single-branch
#git clone
cd $DIR/seahub
./tools/ --version=$VERSION --branch=HEAD

cd $DIR
git clone -b $VERSION --single-branch
#git clone
cd $DIR/seafobj
make dist

cd $DIR
git clone -b $VERSION --single-branch
#git clone
cd $DIR/seafdav

cd $DIR
mkdir $DIR/seafile-sources
cp $DIR/libsearpc/libsearpc-*.tar.gz $DIR/seafile-sources
cp $DIR/ccnet-server/ccnet-*.tar.gz $DIR/seafile-sources
cp $DIR/seafile-server/seafile-*.tar.gz $DIR/seafile-sources
cp $DIR/seahub/seahub-*.tar.gz $DIR/seafile-sources
cp $DIR/seafobj/seafobj.tar.gz $DIR/seafile-sources
cp $DIR/seafdav/seafdav.tar.gz $DIR/seafile-sources

mkdir $DIR/seafile-server-pkgs

python3 $DIR/seafile-server/scripts/build/ \
--version=$VERSION \
--libsearpc_version=$VERSION \
--ccnet_version=$VERSION \
--seafile_version=$VERSION  \
--thirdpartdir=$DIR/seahub_thirdparty \
--srcdir=$DIR/seafile-sources \
--outputdir=$DIR/seafile-server-pkgs \
--mysql_config=/usr/bin/mariadb_config \
--jobs=$CORES 2>&1 | tee $LOGDIR/build-server

@TCB13 @opfer15 I commit the build script for this. You are welcome to contribute.
Build for aarch64 (OrangePi Lite2 with Armbian Bionic) is successful

github .com/haiwen/seafile-rpi/blob/master/


Thx for the effort. I’ll try it in a few days, when i am back at my building maschine.

i think in the file, line 114 has to be “git reset --hard $LIBSEARPC_TAG” and not “git reset --hard $VERSION_TAG”

@tfischer73 yep, you are right. Can you create PR for this?

Seafile is succesfully created and runs on a nanopim4 with armbian Debian Buster

PR is created

1 Like

@tfischer73 have you done any benchmarks on the NanoPi M4? Can you share details on CPU/Ram usage? Thank you.