Skip to content

Instantly share code, notes, and snippets.

@Alexey-Tsarev
Last active March 2, 2021 14:00
Show Gist options
  • Save Alexey-Tsarev/d5809e353e756c5ce2d49363ed63df35 to your computer and use it in GitHub Desktop.
Save Alexey-Tsarev/d5809e353e756c5ce2d49363ed63df35 to your computer and use it in GitHub Desktop.
ZFS 0.8 at Raspberry Pi
#!/usr/bin/env sh
set -e
set -x
CUR_PWD="$(pwd)"
cd "$(dirname $0)"
if [ ! -d zfs ]; then
# https://github.com/zfsonlinux/zfs/wiki/Building-ZFS
sudo apt-get install -y build-essential autoconf automake libtool gawk alien fakeroot ksh
sudo apt-get install -y zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev
sudo apt-get install -y libacl1-dev libaio-dev libdevmapper-dev libssl-dev libelf-dev
sudo apt-get install -y python3 python3-dev python3-setuptools python3-cffi
#sudo apt-get install -y linux-headers-$(uname -r)
sudo apt-get install raspberrypi-kernel-headers
sudo apt-get install -y git
git clone https://github.com/zfsonlinux/zfs.git
fi
cd zfs
git checkout .
git checkout zfs-0.8-release
git pull
git branch
make clean || true
make distclean || true
./autogen.sh
autoreconf --install --force
./configure
make -s -j$(nproc)
sudo make install
sudo ldconfig
sudo depmod -a
sudo modprobe zfs
sudo zpool import -a
sudo zpool import -a -d /dev
cd "${CUR_DIR}"
@Alexey-Tsarev
Copy link
Author

Alexey-Tsarev commented Oct 25, 2019

My install log on RPI3:
https://drive.google.com/file/d/1Eww3XIDoR_gbcjkGfRKIE2ecU3UM9E-G/view?usp=sharing

@Hadatko, unfortunately, I don't have a RPI4 to check from my side.

@jonwedell
Copy link

I fixed the error that @Hadatko is having (RPI4, Raspbian 10, zfs 0.8.2) by running sudo apt install raspberrypi-kernel-headers and not using the --with-config=srpm option to configure.

@clarityandobscurity
Copy link

Any way to proceed from here to creating an initramfs?

@Hadatko
Copy link

Hadatko commented Oct 28, 2019

Hi guys,
thanks for your cooperation. Unfortunatelly i can try @jonwedell solution next week, not earlier. I will let you know.

@Alexey-Tsarev
Copy link
Author

I added the following line

sudo apt-get install raspberrypi-kernel-headers

to the gist.

@Alexey-Tsarev
Copy link
Author

I am not telling people to use the master branch. My gist contains:
git checkout zfs-0.8-release

@satmandu
Copy link

satmandu commented Dec 2, 2019

Sigh. That was my poor reading comprehension. Carry on.

@Alexandero89
Copy link

Alexandero89 commented Jul 27, 2020

I have a Raspberry 3B and a Raspberry 4B, both running on the latest Raspberry Pi OS (64bit).
When i use this script i get this error:

"Building initial module for 5.4.51-v8+
configure: error:
*** Unable to build an empty module."

But when i run the configure command with --with-config=srpm it runs through.

Then i try to make the packages with make deb-dkms deb-utils or make -s -j$(nproc) and i get this error the error from this issue (#openzfs/zfs#9504):
error: File not found: /tmp/zfs-build-pi-N5H6mfE4/BUILDROOT/zfs-0.8.2-1.%{_arch}/sbin/*

So i used the mentioned workaround and set the _arch value for rpm. They use "arm". I was not sure if i have to change this to "aarch64" because i'm running 64bit and not 32bit arm and uname -a shows me:
Linux raspberrypi4 5.4.51-v8+ #1327 SMP PREEMPT Thu Jul 23 11:11:34 BST 2020 aarch64 GNU/Linux , so i tried arm first and also arm64 and aarch64, but now every time i get this error:

RPM build errors:
Binaries arch (1) not matching the package arch (2).
Binaries arch (1) not matching the package arch (2).
Binaries arch (1) not matching the package arch (2).
Binaries arch (1) not matching the package arch (2).
Binaries arch (1) not matching the package arch (2).
File must begin with "/": %{_datarootdir}/pkgconfig/libzfs.pc
File must begin with "/": %{_datarootdir}/pkgconfig/libzfs_core.pc
make[1]: *** [Makefile:1336: rpm-common] Fehler 1
make[1]: Verzeichnis „/home/pi/zfs-tmp/zfs“ wird verlassen
make: *** [Makefile:1295: rpm-utils] Fehler 2

Also tried to use the --target=aarch64-linux-gnueabihf option. But still the error above with the "arch not matching".

Could anyone help me out with this or has any hints?

EDIT:
Maybe it is of interest that the ./configure is not able to find the correct linux i'm using, because in the Makefile i see a lot of:
build = aarch64-unknown-linux-gnu

@Alexey-Tsarev
Copy link
Author

Alexey-Tsarev commented Jul 27, 2020

I tried this gist vs OPI4 32bit OS recently (about week ago). The driver was built successfully.

running on the latest Raspberry Pi OS (64bit).

I think it's because of 64 bit OS. Nonetheless, @Alexandero89, good luck.

@Alexandero89
Copy link

Hey,

yeah, im pretty sure its the 64bit raspbian (Raspberry os).
Its pretty new and raspberry is known to do a lot of things different than others or than it should be.
I will wait some time and keep you updated when i find a solution or new infos.

@msurinx
Copy link

msurinx commented Dec 5, 2020

HI I have statred only a couple of days aga with RabianPI OS. And I am now reinstalling it fot the third time, getting the same error again after trying to install ZFS. Can someone help me?

Here is the log of my installation issues.
sudo ./zfs_install.sh

  • pwd
  • CUR_PWD=/home/pi
  • dirname ./zfs_install.sh
  • cd .
  • [ ! -d zfs ]
  • sudo apt-get install -y build-essential autoconf automake libtool gawk alien fakeroot ksh
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    build-essential is already the newest version (12.6).
    fakeroot is already the newest version (1.23-1).
    fakeroot set to manually installed.
    gawk is already the newest version (1:4.2.1+dfsg-1).
    gawk set to manually installed.
    The following additional packages will be installed:
    autopoint autotools-dev binfmt-support debhelper debugedit dh-autoreconf dh-strip-nondeterminism dwz gettext intltool-debian libarchive-zip-perl libfile-stripnondeterminism-perl
    librpm8 librpmbuild8 librpmio8 librpmsign8 m4 po-debconf rpm rpm-common rpm2cpio
    Suggested packages:
    lintian autoconf-archive gnu-standards autoconf-doc dh-make rpm-i18n gettext-doc libasprintf-dev libgettextpo-dev libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc
    libmail-box-perl elfutils rpmlint rpm2html
    Recommended packages:
    libarchive-cpio-perl libltdl-dev libmail-sendmail-perl
    The following NEW packages will be installed:
    alien autoconf automake autopoint autotools-dev binfmt-support debhelper debugedit dh-autoreconf dh-strip-nondeterminism dwz gettext intltool-debian ksh libarchive-zip-perl
    libfile-stripnondeterminism-perl librpm8 librpmbuild8 librpmio8 librpmsign8 libtool m4 po-debconf rpm rpm-common rpm2cpio
    0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
    3 not fully installed or removed.
    Need to get 16.8 MB of archives.
    After this operation, 30.4 MB of additional disk space will be used.
    Get:1 http://mirror.serverius.net/raspbian/raspbian buster/main armhf autotools-dev all 20180224.1 [77.0 kB]
    Get:2 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf m4 armhf 1.4.18-2 [185 kB]
    Get:4 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf automake all 1:1.16.1-4 [771 kB]
    Get:5 http://ftp.fi.muni.cz/pub/linux/raspbian/raspbian buster/main armhf autopoint all 0.19.8.1-9 [434 kB]
    Get:7 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf dh-autoreconf all 19 [16.9 kB]
    Get:6 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf libtool all 2.4.6-9 [547 kB]
    Get:10 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf dh-strip-nondeterminism all 1.1.2-1 [13.0 kB]
    Get:9 http://mirror.inode.at/raspbian/raspbian buster/main armhf libfile-stripnondeterminism-perl all 1.1.2-1 [19.8 kB]
    Get:11 http://mirror.serverius.net/raspbian/raspbian buster/main armhf dwz armhf 0.12-3 [66.0 kB]
    Get:8 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf libarchive-zip-perl all 1.64-1 [96.8 kB]
    Get:12 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf gettext armhf 0.19.8.1-9 [1219 kB]
    Get:13 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf intltool-debian all 0.35.0+20060710.5 [26.8 kB]
    Get:3 http://mirror.dkm.cz/raspbian/raspbian buster/main armhf autoconf all 2.69-11 [341 kB]
    Get:14 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf po-debconf all 1.0.21 [248 kB]
    Get:16 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf librpmio8 armhf 4.14.2.1+dfsg1-1 [1366 kB]
    Get:18 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf librpmbuild8 armhf 4.14.2.1+dfsg1-1 [1367 kB]
    Get:19 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf librpmsign8 armhf 4.14.2.1+dfsg1-1 [1315 kB]
    Get:17 http://raspbian.trivini.no/raspbian buster/main armhf librpm8 armhf 4.14.2.1+dfsg1-1 [1449 kB]
    Get:20 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf rpm-common armhf 4.14.2.1+dfsg1-1 [1336 kB]
    Get:24 http://mirror.serverius.net/raspbian/raspbian buster/main armhf alien all 8.95 [82.3 kB]
    Get:25 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf binfmt-support armhf 2.2.0-2 [56.7 kB]
    Get:26 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf ksh armhf 93u+20120801-3.4+deb10u1 [692 kB]
    Get:21 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf rpm2cpio armhf 4.14.2.1+dfsg1-1 [1316 kB]
    Get:23 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf rpm armhf 4.14.2.1+dfsg1-1 [1425 kB]
    Get:15 http://mirror.truenetwork.ru/raspbian/raspbian buster/main armhf debhelper all 12.1.1 [1016 kB]
    Get:22 http://mirror.de.leaseweb.net/raspbian/raspbian buster/main armhf debugedit armhf 4.14.2.1+dfsg1-1 [1326 kB]
    Fetched 16.8 MB in 9s (1772 kB/s)
    Selecting previously unselected package autotools-dev.
    (Reading database ... 120763 files and directories currently installed.)
    Preparing to unpack .../00-autotools-dev_20180224.1_all.deb ...
    Unpacking autotools-dev (20180224.1) ...
    Selecting previously unselected package m4.
    Preparing to unpack .../01-m4_1.4.18-2_armhf.deb ...
    Unpacking m4 (1.4.18-2) ...
    Selecting previously unselected package autoconf.
    Preparing to unpack .../02-autoconf_2.69-11_all.deb ...
    Unpacking autoconf (2.69-11) ...
    Selecting previously unselected package automake.
    Preparing to unpack .../03-automake_1%3a1.16.1-4_all.deb ...
    Unpacking automake (1:1.16.1-4) ...
    Selecting previously unselected package autopoint.
    Preparing to unpack .../04-autopoint_0.19.8.1-9_all.deb ...
    Unpacking autopoint (0.19.8.1-9) ...
    Selecting previously unselected package libtool.
    Preparing to unpack .../05-libtool_2.4.6-9_all.deb ...
    Unpacking libtool (2.4.6-9) ...
    Selecting previously unselected package dh-autoreconf.
    Preparing to unpack .../06-dh-autoreconf_19_all.deb ...
    Unpacking dh-autoreconf (19) ...
    Selecting previously unselected package libarchive-zip-perl.
    Preparing to unpack .../07-libarchive-zip-perl_1.64-1_all.deb ...
    Unpacking libarchive-zip-perl (1.64-1) ...
    Selecting previously unselected package libfile-stripnondeterminism-perl.
    Preparing to unpack .../08-libfile-stripnondeterminism-perl_1.1.2-1_all.deb ...
    Unpacking libfile-stripnondeterminism-perl (1.1.2-1) ...
    Selecting previously unselected package dh-strip-nondeterminism.
    Preparing to unpack .../09-dh-strip-nondeterminism_1.1.2-1_all.deb ...
    Unpacking dh-strip-nondeterminism (1.1.2-1) ...
    Selecting previously unselected package dwz.
    Preparing to unpack .../10-dwz_0.12-3_armhf.deb ...
    Unpacking dwz (0.12-3) ...
    Selecting previously unselected package gettext.
    Preparing to unpack .../11-gettext_0.19.8.1-9_armhf.deb ...
    Unpacking gettext (0.19.8.1-9) ...
    Selecting previously unselected package intltool-debian.
    Preparing to unpack .../12-intltool-debian_0.35.0+20060710.5_all.deb ...
    Unpacking intltool-debian (0.35.0+20060710.5) ...
    Selecting previously unselected package po-debconf.
    Preparing to unpack .../13-po-debconf_1.0.21_all.deb ...
    Unpacking po-debconf (1.0.21) ...
    Selecting previously unselected package debhelper.
    Preparing to unpack .../14-debhelper_12.1.1_all.deb ...
    Unpacking debhelper (12.1.1) ...
    Selecting previously unselected package librpmio8.
    Preparing to unpack .../15-librpmio8_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking librpmio8 (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package librpm8.
    Preparing to unpack .../16-librpm8_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking librpm8 (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package librpmbuild8.
    Preparing to unpack .../17-librpmbuild8_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking librpmbuild8 (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package librpmsign8.
    Preparing to unpack .../18-librpmsign8_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking librpmsign8 (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package rpm-common.
    Preparing to unpack .../19-rpm-common_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking rpm-common (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package rpm2cpio.
    Preparing to unpack .../20-rpm2cpio_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking rpm2cpio (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package debugedit.
    Preparing to unpack .../21-debugedit_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking debugedit (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package rpm.
    Preparing to unpack .../22-rpm_4.14.2.1+dfsg1-1_armhf.deb ...
    Unpacking rpm (4.14.2.1+dfsg1-1) ...
    Selecting previously unselected package alien.
    Preparing to unpack .../23-alien_8.95_all.deb ...
    Unpacking alien (8.95) ...
    Selecting previously unselected package binfmt-support.
    Preparing to unpack .../24-binfmt-support_2.2.0-2_armhf.deb ...
    Unpacking binfmt-support (2.2.0-2) ...
    Selecting previously unselected package ksh.
    Preparing to unpack .../25-ksh_93u+20120801-3.4+deb10u1_armhf.deb ...
    Unpacking ksh (93u+20120801-3.4+deb10u1) ...
    Setting up librpmio8 (4.14.2.1+dfsg1-1) ...
    Setting up gettext (0.19.8.1-9) ...
    Setting up librpm8 (4.14.2.1+dfsg1-1) ...
    Setting up libarchive-zip-perl (1.64-1) ...
    Setting up m4 (1.4.18-2) ...
    Setting up rpm-common (4.14.2.1+dfsg1-1) ...
    Setting up intltool-debian (0.35.0+20060710.5) ...
    Setting up zfsutils-linux (0.8.5-2~bpo10+1) ...
    modprobe: FATAL: Module zfs not found in directory /lib/modules/5.4.79-v7l+
    zfs-import-scan.service is a disabled or a static unit, not starting it.
    Job for zfs-load-module.service failed because the control process exited with error code.
    See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
    A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
    zfs-import-scan.service is a disabled or a static unit, not starting it.
    Job for zfs-load-module.service failed because the control process exited with error code.
    See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
    A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
    Job for zfs-share.service failed because the control process exited with error code.
    See "systemctl status zfs-share.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript zfs-share, action "start" failed.
    ● zfs-share.service - ZFS file system shares
    Loaded: loaded (/lib/systemd/system/zfs-share.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2020-12-05 21:18:18 CET; 27ms ago
    Docs: man:zfs(8)
    Process: 1078 ExecStartPre=/bin/rm -f /etc/dfs/sharetab (code=exited, status=0/SUCCESS)
    Process: 1079 ExecStart=/sbin/zfs share -a (code=exited, status=1/FAILURE)
    Main PID: 1079 (code=exited, status=1/FAILURE)

Dec 05 21:18:18 rpi.umani.blue systemd[1]: Starting ZFS file system shares...
Dec 05 21:18:18 rpi.umani.blue zfs[1079]: The ZFS modules are not loaded.
Dec 05 21:18:18 rpi.umani.blue zfs[1079]: Try running '/sbin/modprobe zfs' as root to load them.
Dec 05 21:18:18 rpi.umani.blue systemd[1]: zfs-share.service: Main process exited, code=exited, status=1/FAILURE
Dec 05 21:18:18 rpi.umani.blue systemd[1]: zfs-share.service: Failed with result 'exit-code'.
Dec 05 21:18:18 rpi.umani.blue systemd[1]: Failed to start ZFS file system shares.
dpkg: error processing package zfsutils-linux (--configure):
installed zfsutils-linux package post-installation script subprocess returned error exit status 1
Setting up autotools-dev (20180224.1) ...
Setting up librpmbuild8 (4.14.2.1+dfsg1-1) ...
Setting up autopoint (0.19.8.1-9) ...
Setting up binfmt-support (2.2.0-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service.
Setting up autoconf (2.69-11) ...
Setting up librpmsign8 (4.14.2.1+dfsg1-1) ...
Setting up dwz (0.12-3) ...
Setting up ksh (93u+20120801-3.4+deb10u1) ...
update-alternatives: using /bin/ksh93 to provide /bin/ksh (ksh) in auto mode
Setting up debugedit (4.14.2.1+dfsg1-1) ...
Setting up automake (1:1.16.1-4) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
Setting up libfile-stripnondeterminism-perl (1.1.2-1) ...
Setting up libtool (2.4.6-9) ...
Setting up rpm2cpio (4.14.2.1+dfsg1-1) ...
Setting up po-debconf (1.0.21) ...
Setting up rpm (4.14.2.1+dfsg1-1) ...
dpkg: dependency problems prevent configuration of zfs-zed:
zfs-zed depends on zfsutils-linux (>= 0.8.5-2~bpo10+1); however:
Package zfsutils-linux is not configured yet.

dpkg: error processing package zfs-zed (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openmediavault-zfs:
openmediavault-zfs depends on zfs-zed; however:
Package zfs-zed is not configured yet.

dpkg: error processing package openmediavault-zfs (--configure):
dependency problems - leaving unconfigured
Setting up dh-strip-nondeterminism (1.1.2-1) ...
Setting up debhelper (12.1.1) ...
Setting up dh-autoreconf (19) ...
Setting up alien (8.95) ...
Processing triggers for install-info (6.5.0.dfsg.1-4+b1) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
zfsutils-linux
zfs-zed
openmediavault-zfs
E: Sub-process /usr/bin/dpkg returned an error code (1)

@randyoo
Copy link

randyoo commented Dec 5, 2020

HI I have statred only a couple of days aga with RabianPI OS. And I am now reinstalling it fot the third time, getting the same error again after trying to install ZFS. Can someone help me?

Can’t help you with building it, but I can suggest you install Ubuntu, where zfs packages are an apt-get away. Biggest detractor is lack of accelerated graphics, from what I remember. Not running it myself since I use my pi as a web browser kiosk as well, but every time I try to build it I encounter difficulty with the 32 bit user space on a 64 bit kernel, and can never seem to take good enough notes to figure out how to do it again with banging my head on the wall...

You might also want to have a look at https://www.nasbeery.de

@satmandu
Copy link

satmandu commented Dec 5, 2020

FYI this is what I did to get zfs 2.0.0 packages working on current ubuntu and 64 bit raspi-os, using a modified version of the ubuntu packaging: https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c (The script is at the bottom of that page.)

curl -OLf https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c/raw/eab78f77e490a9115b29de8410d92a5668567412/zfs_build && chmod +x zfs_build && ./zfs_build

@msurinx
Copy link

msurinx commented Dec 6, 2020

curl -OLf https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c/raw/eab78f77e490a9115b29de8410d92a5668567412/zfs_build && chmod +x zfs_build && ./zfs_build

I essentially got the same error as in my previous attemps. See the output hereunder:

root@rpi:/home/pi/zfsinstall# curl -OLf https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c/raw/eab78f77e490a9115b29de8410d92a5668567412/zfs_build && chmod +x zfs_build && ./zfs_build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6343 100 6343 0 0 13078 0 --:--:-- --:--:-- --:--:-- 13078

  • main
  • VER=10
  • export 'CC=ccache gcc-10'
  • CC='ccache gcc-10'
  • export 'CXX=ccache g++-10'
  • CXX='ccache g++-10'
  • export SHLIB_CXXLD=g++-10
  • SHLIB_CXXLD=g++-10
    ++ pwd
  • cdir=/home/pi/zfsinstall
    ++ uname -m
  • zfs_work=/home/pi/zfsinstall/armv7l
  • mkdir -p /home/pi/zfsinstall/armv7l
  • zfs_branch=zfs-2.0-release
  • ubuntu_branch=applied/ubuntu/devel
  • dist=groovy
  • mkdir -p /home/pi/zfsinstall/armv7l
  • [[ ! -f zfs_2_symbols.patch ]]
  • cd /home/pi/zfsinstall/armv7l
  • rm -rf zfs
  • [[ ! -d zfs ]]
  • git clone --depth=1 -b zfs-2.0-release https://github.com/openzfs/zfs.git
    Cloning into 'zfs'...
    remote: Enumerating objects: 3964, done.
    remote: Counting objects: 100% (3964/3964), done.
    remote: Compressing objects: 100% (3409/3409), done.
    remote: Total 3964 (delta 1137), reused 1261 (delta 408), pack-reused 0
    Receiving objects: 100% (3964/3964), 10.41 MiB | 4.96 MiB/s, done.
    Resolving deltas: 100% (1137/1137), done.
    ++ git -C /home/pi/zfsinstall/armv7l/zfs rev-parse --short zfs-2.0-release
  • zfsrev=dcbf847
    ++ cd /home/pi/zfsinstall/armv7l/zfs
    ++ git log -1 --pretty=%B
    ++ head -n 1
  • zfs_commitmsg='Tag 2.0.0'
    ++ grep Version /home/pi/zfsinstall/armv7l/zfs/META
    ++ awk '{print $2}'
  • ZFS_VERSION=2.0.0
  • sudo apt install -y devscripts
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    devscripts is already the newest version (2.19.5+deb10u1).
    0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
    3 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Setting up zfsutils-linux (0.8.5-2~bpo10+1) ...
    modprobe: FATAL: Module zfs not found in directory /lib/modules/5.4.79-v7l+
    zfs-import-scan.service is a disabled or a static unit, not starting it.
    Job for zfs-load-module.service failed because the control process exited with error code.
    See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
    A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
    zfs-import-scan.service is a disabled or a static unit, not starting it.
    Job for zfs-load-module.service failed because the control process exited with error code.
    See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
    A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
    Job for zfs-share.service failed because the control process exited with error code.
    See "systemctl status zfs-share.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript zfs-share, action "start" failed.
    ● zfs-share.service - ZFS file system shares
    Loaded: loaded (/lib/systemd/system/zfs-share.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2020-12-06 11:26:02 CET; 29ms ago
    Docs: man:zfs(8)
    Process: 28232 ExecStartPre=/bin/rm -f /etc/dfs/sharetab (code=exited, status=0/SUCCESS)
    Process: 28233 ExecStart=/sbin/zfs share -a (code=exited, status=1/FAILURE)
    Main PID: 28233 (code=exited, status=1/FAILURE)

Dec 06 11:26:02 rpi.umani.blue systemd[1]: Starting ZFS file system shares...
Dec 06 11:26:02 rpi.umani.blue zfs[28233]: The ZFS modules are not loaded.
Dec 06 11:26:02 rpi.umani.blue zfs[28233]: Try running '/sbin/modprobe zfs' as root to load them.
Dec 06 11:26:02 rpi.umani.blue systemd[1]: zfs-share.service: Main process exited, code=exited, status=1/FAILURE
Dec 06 11:26:02 rpi.umani.blue systemd[1]: zfs-share.service: Failed with result 'exit-code'.
Dec 06 11:26:02 rpi.umani.blue systemd[1]: Failed to start ZFS file system shares.
dpkg: error processing package zfsutils-linux (--configure):
installed zfsutils-linux package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of zfs-zed:
zfs-zed depends on zfsutils-linux (>= 0.8.5-2~bpo10+1); however:
Package zfsutils-linux is not configured yet.

dpkg: error processing package zfs-zed (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openmediavault-zfs:
openmediavault-zfs depends on zfs-zed; however:
Package zfs-zed is not configured yet.

dpkg: error processing package openmediavault-zfs (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
zfsutils-linux
zfs-zed
openmediavault-zfs
E: Sub-process /usr/bin/dpkg returned an error code (1)

  • true
  • rm -f /home/pi/zfsinstall/armv7l/bb-dependencies.sh
  • cd /home/pi/zfsinstall/armv7l
  • curl -OLf https://raw.githubusercontent.com/openzfs/zfs-buildbot/master/scripts/bb-dependencies.sh
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 7608 100 7608 0 0 60864 0 --:--:-- --:--:-- --:--:-- 60380
  • sudo bash /home/pi/zfsinstall/armv7l/bb-dependencies.sh
    Missing configuration /etc/buildslave. Assuming dependencies are
    already satisfied and this is a persistent buildslave.
  • cd /home/pi/zfsinstall/armv7l/zfs
  • ./autogen.sh
    autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I config autoreconf: configure.ac: tracing autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'. libtoolize: copying file 'config/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'. libtoolize: copying file 'config/libtool.m4' libtoolize: copying file 'config/ltoptions.m4' libtoolize: copying file 'config/ltsugar.m4' libtoolize: copying file 'config/ltversion.m4' libtoolize: copying file 'config/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:49: installing 'config/compile' configure.ac:39: installing 'config/config.guess' configure.ac:39: installing 'config/config.sub' configure.ac:42: installing 'config/install-sh' configure.ac:42: installing 'config/missing' cmd/mount_zfs/Makefile.am: installing 'config/depcomp' autoreconf: Leaving directory .'
  • cd /home/pi/zfsinstall/armv7l
  • rm -rf /home/pi/zfsinstall/armv7l/zfs-linux
  • mkdir -p /home/pi/zfsinstall/armv7l/zfs-linux
  • cd /home/pi/zfsinstall/armv7l/zfs-linux
  • git init
    Initialized empty Git repository in /home/pi/zfsinstall/armv7l/zfs-linux/.git/
  • git remote add origin https://git.launchpad.net/ubuntu/+source/zfs-linux
  • git checkout -b applied/ubuntu/devel
    Switched to a new branch 'applied/ubuntu/devel'
  • git config core.sparsecheckout true
  • echo debian/
  • git config pull.ff only
  • git pull origin applied/ubuntu/devel
    remote: Enumerating objects: 16932, done.
    remote: Counting objects: 100% (16932/16932), done.
    remote: Compressing objects: 100% (5036/5036), done.
    remote: Total 16932 (delta 12306), reused 16176 (delta 11774)
    Receiving objects: 100% (16932/16932), 12.42 MiB | 9.00 MiB/s, done.
    Resolving deltas: 100% (12306/12306), done.
    From https://git.launchpad.net/ubuntu/+source/zfs-linux
  • branch applied/ubuntu/devel -> FETCH_HEAD
  • [new branch] applied/ubuntu/devel -> origin/applied/ubuntu/devel
  • mv /home/pi/zfsinstall/armv7l/zfs-linux/debian/patches/series /home/pi/zfsinstall/armv7l/zfs-linux/debian/patches/series.old
  • mv /home/pi/zfsinstall/armv7l/zfs-linux/debian /home/pi/zfsinstall/armv7l/zfs/
  • cd /home/pi/zfsinstall/armv7l/zfs
  • sed -i 's/DO_OVERLAY_MOUNTS='''no'''/DO_OVERLAY_MOUNTS='''yes'''/g' etc/default/zfs.in
  • cd /home/pi/zfsinstall/armv7l/zfs
  • sed -i 's/usr/share/pkgconfig/lib/pkgconfig/g' debian/libzfslinux-dev.install
  • cd /home/pi/zfsinstall/armv7l/zfs
  • sed -i /zfs-load-module.service/d debian/zfsutils-linux.install
  • cd /home/pi/zfsinstall/armv7l/zfs
  • sed -i '/enum-extract.*/a \t\t'''$(CURDIR)/scripts/make_gitrev.sh''' \' debian/rules
  • zfsutilsfilesadd=(usr/share/pam-configs/zfs_key usr/share/man/man8/zstream.8 usr/share/man/man8/zfs-change-key.8 usr/share/man/man8/zpool-wait.8 usr/share/man/man8/zpoolprops.8 usr/share/man/man8/zfs-unjail.8 usr/share/man/man8/zpool-list.8 usr/share/man/man8/zpool-split.8 usr/share/man/man8/zpool-replace.8 usr/share/man/man8/zpool-set.8 usr/share/man/man8/zpool-upgrade.8 usr/share/man/man8/zfs-upgrade.8 usr/share/man/man8/zpool-history.8 usr/share/man/man8/zfs-projectspace.8 usr/share/man/man8/zpool-offline.8 usr/share/man/man8/zfs-create.8 usr/share/man/man8/zfs-snapshot.8 usr/share/man/man8/zpool-events.8 usr/share/man/man8/zfs-rollback.8 usr/share/man/man8/zfs-destroy.8 usr/share/man/man8/zpool-destroy.8 usr/share/man/man8/zpool-get.8 usr/share/man/man8/zpool-trim.8 usr/share/man/man8/zfs-diff.8 usr/share/man/man8/zfs-jail.8 usr/share/man/man8/zfs-rename.8 usr/share/man/man8/zpool-online.8 usr/share/man/man8/zfs-promote.8 usr/share/man/man8/zpool-import.8 usr/share/man/man8/zfs-get.8 usr/share/man/man8/zfs-unallow.8 usr/share/man/man8/zpool-clear.8 usr/share/man/man8/zfs-unload-key.8 usr/share/man/man8/zfs-mount.8 usr/share/man/man8/zpool-labelclear.8 usr/share/man/man8/zpool-resilver.8 usr/share/man/man8/zpool-status.8 usr/share/man/man8/zfs-share.8 usr/share/man/man8/zfs_ids_to_path.8 usr/share/man/man8/zfs-load-key.8 usr/share/man/man8/zpool-export.8 usr/share/man/man8/zfs-hold.8 usr/share/man/man8/zpool-remove.8 usr/share/man/man8/zpool-initialize.8 usr/share/man/man8/zpoolconcepts.8 usr/share/man/man8/zfsconcepts.8 usr/share/man/man8/zfs-send.8 usr/share/man/man8/zfs-userspace.8 usr/share/man/man8/zfs-release.8 usr/share/man/man8/zpool-create.8 usr/share/man/man8/zpool-reguid.8 usr/share/man/man8/zfsprops.8 usr/share/man/man8/zpool-scrub.8 usr/share/man/man8/zfs-list.8 usr/share/man/man8/zfs-set.8 usr/share/man/man8/zfs-clone.8 usr/share/man/man8/zfs-inherit.8 usr/share/man/man8/zfs-bookmark.8 usr/share/man/man8/zfs-unmount.8 usr/share/man/man8/zfs-project.8 usr/share/man/man8/zfs-groupspace.8 usr/share/man/man8/zfs-redact.8 usr/share/man/man8/zpool-attach.8 usr/share/man/man8/zpool-sync.8 usr/share/man/man8/zpool-checkpoint.8 usr/share/man/man8/zfs-allow.8 usr/share/man/man8/zpool-reopen.8 usr/share/man/man8/zfs-wait.8 usr/share/man/man8/zfs-recv.8 usr/share/man/man8/zpool-iostat.8 usr/share/man/man8/zfs-receive.8 usr/share/man/man8/zpool-add.8 usr/share/man/man8/zpool-detach.8 usr/share/man/man1/arcstat.1 lib/security/pam_zfs_key.so lib/security/pam_zfs_key.la sbin/zstream sbin/zfs_ids_to_path)
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/pam-configs/zfs_key
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zstream.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-change-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-wait.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpoolprops.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unjail.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-list.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-split.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-replace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-set.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-upgrade.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-upgrade.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-history.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-projectspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-offline.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-create.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-snapshot.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-events.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-rollback.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-destroy.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-destroy.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-get.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-trim.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-diff.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-jail.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-rename.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-online.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-promote.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-import.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-get.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unallow.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-clear.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unload-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-mount.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-labelclear.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-resilver.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-status.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-share.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs_ids_to_path.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-load-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-export.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-hold.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-remove.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-initialize.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpoolconcepts.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfsconcepts.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-send.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-userspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-release.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-create.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-reguid.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfsprops.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-scrub.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-list.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-set.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-clone.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-inherit.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-bookmark.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unmount.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-project.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-groupspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-redact.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-attach.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-sync.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-checkpoint.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-allow.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-reopen.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-wait.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-recv.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-iostat.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-receive.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-add.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-detach.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man1/arcstat.1
  • for i in "${zfsutilsfilesadd[@]}"
  • echo lib/security/pam_zfs_key.so
  • for i in "${zfsutilsfilesadd[@]}"
  • echo lib/security/pam_zfs_key.la
  • for i in "${zfsutilsfilesadd[@]}"
  • echo sbin/zstream
  • for i in "${zfsutilsfilesadd[@]}"
  • echo sbin/zfs_ids_to_path
  • libzfs2filesadd=(lib/libzfsbootenv.a lib/libzfsbootenv.so.1 lib/libzfsbootenv.so.1.0.0)
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.a
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.so.1
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.so.1.0.0
  • cd /home/pi/zfsinstall/armv7l
  • patch -p1
    patching file zfs/debian/libnvpair1linux.symbols
    patching file zfs/debian/libuutil1linux.symbols
    patching file zfs/debian/libzfs2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libuutil1linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
  • [[ ! -f /home/pi/zfsinstall/armv7l/zfs/debian/changelog ]]
  • cd /home/pi/zfsinstall/armv7l/zfs
  • dch '' --distribution groovy -b -v 2.0.0 'Tag 2.0.0'
    libdistro-info-perl is not installed, Debian release names are not known.
    libdistro-info-perl is not installed, Ubuntu release names are not known.
    dch warning: New package version is Debian native whilst previous version was not
  • mkdir -p /home/pi/zfsinstall/armv7l/logs/
  • echo 'tail -F /home/pi/zfsinstall/armv7l/logs/dcbf847.log'
    tail -F /home/pi/zfsinstall/armv7l/logs/dcbf847.log
  • nice -n 20 debuild --preserve-envvar=CC --no-tgz-check -b -uc -us
  • echo failure
    failure
  • success=1
  • tail /home/pi/zfsinstall/armv7l/logs/dcbf847.log
    dpkg-buildpackage: info: source distribution groovy
    dpkg-buildpackage: info: source changed by root root@rpi.umani.blue
    dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)
    dpkg-source --before-build .
    dpkg-buildpackage: info: host architecture armhf
    dpkg-checkbuilddeps: error: Unmet build dependencies: libaio-dev libblkid-dev libelf-dev libssl-dev | libssl1.0-dev libudev-dev python3-all-dev python3-cffi python3-sphinx uuid-dev
    dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
    dpkg-buildpackage: warning: (Use -d flag to override.)
    debuild: fatal error at line 1182:
    dpkg-buildpackage -us -uc -ui -b failed
  • [[ 1 == \0 ]]
    root@rpi:/home/pi/zfsinstall#

@satmandu
Copy link

satmandu commented Dec 6, 2020

Looks like you need to install these build dependencies: libaio-dev libblkid-dev libelf-dev libssl-dev | libssl1.0-dev libudev-dev python3-all-dev python3-cffi python3-sphinx uuid-dev

You can do a sudo apt install -y libaio-dev libblkid-dev libelf-dev libssl-dev libudev-dev python3-all-dev python3-cffi python3-sphinx uuid-dev to fix that!

@satmandu
Copy link

satmandu commented Dec 6, 2020

Updated the script again for the case where dependencies are missing:

curl -OLf https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c/raw/502e3b32a90495722d0286545d8b289b8a2dc908/zfs_build && chmod +x zfs_build && ./zfs_build

@msurinx
Copy link

msurinx commented Dec 6, 2020

I am sorry to bother you again, but the same errorhas occured again. I am wondering if this migth be due to de the fact the I installed OVM5 and installed the OPenMediaVault-ZFS-5.05 plugin?

Setting up python-babel-localedata (2.6.0+dfsg.1-1) ...
Setting up zfsutils-linux (0.8.5-2~bpo10+1) ...
modprobe: FATAL: Module zfs not found in directory /lib/modules/5.4.79-v7l+
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-load-module.service failed because the control process exited with error code.
See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-load-module.service failed because the control process exited with error code.
See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
Job for zfs-share.service failed because the control process exited with error code.
See "systemctl status zfs-share.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zfs-share, action "start" failed.
● zfs-share.service - ZFS file system shares
Loaded: loaded (/lib/systemd/system/zfs-share.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-12-06 21:44:50 CET; 28ms ago
Docs: man:zfs(8)
Process: 3755 ExecStartPre=/bin/rm -f /etc/dfs/sharetab (code=exited, status=0/SUCCESS)
Process: 3757 ExecStart=/sbin/zfs share -a (code=exited, status=1/FAILURE)
Main PID: 3757 (code=exited, status=1/FAILURE)

Dec 06 21:44:50 rpi.umani.blue systemd[1]: Starting ZFS file system shares...
Dec 06 21:44:50 rpi.umani.blue zfs[3757]: The ZFS modules are not loaded.
Dec 06 21:44:50 rpi.umani.blue zfs[3757]: Try running '/sbin/modprobe zfs' as root to load them.
Dec 06 21:44:50 rpi.umani.blue systemd[1]: zfs-share.service: Main process exited, code=exited, status=1/FAILURE
Dec 06 21:44:50 rpi.umani.blue systemd[1]: zfs-share.service: Failed with result 'exit-code'.
Dec 06 21:44:50 rpi.umani.blue systemd[1]: Failed to start ZFS file system shares.
dpkg: error processing package zfsutils-linux (--configure):
installed zfsutils-linux package post-installation script subprocess returned error exit status 1
...
Setting up python-babel-localedata (2.6.0+dfsg.1-1) ...
Setting up zfsutils-linux (0.8.5-2~bpo10+1) ...
modprobe: FATAL: Module zfs not found in directory /lib/modules/5.4.79-v7l+
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-load-module.service failed because the control process exited with error code.
See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
zfs-import-scan.service is a disabled or a static unit, not starting it.
Job for zfs-load-module.service failed because the control process exited with error code.
See "systemctl status zfs-load-module.service" and "journalctl -xe" for details.
A dependency job for zfs-import-cache.service failed. See 'journalctl -xe' for details.
Job for zfs-share.service failed because the control process exited with error code.
See "systemctl status zfs-share.service" and "journalctl -xe" for details.
invoke-rc.d: initscript zfs-share, action "start" failed.
● zfs-share.service - ZFS file system shares
Loaded: loaded (/lib/systemd/system/zfs-share.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-12-06 21:44:50 CET; 28ms ago
Docs: man:zfs(8)
Process: 3755 ExecStartPre=/bin/rm -f /etc/dfs/sharetab (code=exited, status=0/SUCCESS)
Process: 3757 ExecStart=/sbin/zfs share -a (code=exited, status=1/FAILURE)
Main PID: 3757 (code=exited, status=1/FAILURE)

Dec 06 21:44:50 rpi.umani.blue systemd[1]: Starting ZFS file system shares...
Dec 06 21:44:50 rpi.umani.blue zfs[3757]: The ZFS modules are not loaded.
Dec 06 21:44:50 rpi.umani.blue zfs[3757]: Try running '/sbin/modprobe zfs' as root to load them.
Dec 06 21:44:50 rpi.umani.blue systemd[1]: zfs-share.service: Main process exited, code=exited, status=1/FAILURE
Dec 06 21:44:50 rpi.umani.blue systemd[1]: zfs-share.service: Failed with result 'exit-code'.
Dec 06 21:44:50 rpi.umani.blue systemd[1]: Failed to start ZFS file system shares.
dpkg: error processing package zfsutils-linux (--configure):
installed zfsutils-linux package post-installation script subprocess returned error exit status 1

@msurinx
Copy link

msurinx commented Dec 6, 2020

  • [[ ! -f /home/pi/zfsinstall/armv7l/zfs/debian/changelog ]]
  • cd /home/pi/zfsinstall/armv7l/zfs
  • dch '' --distribution groovy -b -v 2.0.0 'Tag 2.0.0'
    libdistro-info-perl is not installed, Debian release names are not known.
    libdistro-info-perl is not installed, Ubuntu release names are not known.
    dch warning: New package version is Debian native whilst previous version was not
  • mkdir -p /home/pi/zfsinstall/armv7l/logs/
  • echo 'tail -F /home/pi/zfsinstall/armv7l/logs/dcbf847.log'
    tail -F /home/pi/zfsinstall/armv7l/logs/dcbf847.log
  • nice -n 20 debuild --preserve-envvar=CC --no-tgz-check -b -uc -us
  • echo failure
    failure
  • success=1
  • tail /home/pi/zfsinstall/armv7l/logs/dcbf847.log
    #define VERSION "2.0.0"

configure: exit 77
dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking --bindir=/usr/bin --sbindir=/sbin --libdir=/lib --with-udevdir=/lib/udev --with-zfsexecdir=/usr/lib/zfs-linux --enable-systemd --enable-pyzfs --with-python=python3 --with-systemdunitdir=/lib/systemd/system --with-systemdpresetdir=/lib/systemd/system-preset --with-systemdgeneratordir=/lib/systemd/system-generators --with-config=user returned exit code 77
make[1]: *** [debian/rules:48: override_dh_auto_configure] Error 2
make[1]: Leaving directory '/home/pi/zfsinstall/armv7l/zfs'
make: *** [debian/rules:34: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -b failed

  • [[ 1 == \0 ]]

@satmandu
Copy link

satmandu commented Dec 7, 2020

  • [[ ! -f /home/pi/zfsinstall/armv7l/zfs/debian/changelog ]]

arm7l!

I've only tested my setup with armv8 and x86_64 kernels.
You can set arm_64bit=1 in your /boot/config.txt to boot into 64-bit mode.

I would try the script again after you do that.

uname-m should give you aarch64

@msurinx
Copy link

msurinx commented Dec 8, 2020

I have deinstalled the OVM5 ZFS 5.05 plug-in and followed your instructions. The result is that error " modprobe: FATAL: Module zfs not found in directory /lib/modules/5.4.79-v7l+" did not occur anymore.

But still your script ended in an error. See below. Can you help me again on this?

pi@rpi:~ $ sudo apt install -y libaio-dev libblkid-dev libelf-dev libssl-dev libudev-dev python3-all-dev python3-cffi python3-sphinx uuid-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libaio-dev is already the newest version (0.3.112-3).
libblkid-dev is already the newest version (2.33.1-0.1).
libelf-dev is already the newest version (0.176-1.1).
libudev-dev is already the newest version (241-7deb10u4+rpi1).
python3-all-dev is already the newest version (3.7.3-1).
python3-cffi is already the newest version (1.12.2-1).
python3-sphinx is already the newest version (1.8.4-1).
uuid-dev is already the newest version (2.33.1-0.1).
The following additional packages will be installed:
libssl1.1
Suggested packages:
libssl-doc
The following packages will be upgraded:
libssl-dev libssl1.1
2 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
Need to get 2897 kB of archives.
After this operation, 1033 kB disk space will be freed.
Get:1 http://security.debian.org/debian-security buster/updates/main armhf libssl-dev armhf 1.1.1d-0+deb10u4 [1598 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main armhf libssl1.1 armhf 1.1.1d-0+deb10u4 [1299 kB]
Fetched 2897 kB in 1s (3984 kB/s)
apt-listchanges: Reading changelogs...
Preconfiguring packages ...
(Reading database ... 176924 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.1d-0+deb10u4_armhf.deb ...
Unpacking libssl-dev:armhf (1.1.1d-0+deb10u4) over (1.1.1d-0+deb10u3+rpt1) ...
Preparing to unpack .../libssl1.1_1.1.1d-0+deb10u4_armhf.deb ...
Unpacking libssl1.1:armhf (1.1.1d-0+deb10u4) over (1.1.1d-0+deb10u3+rpt1) ...
Setting up libssl1.1:armhf (1.1.1d-0+deb10u4) ...
Setting up libssl-dev:armhf (1.1.1d-0+deb10u4) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi@rpi:
$ uname -m
aarch64
pi@rpi:~ $ sudo apt-get update
Get:1 file:/var/cache/openmediavault/archives InRelease
Ign:1 file:/var/cache/openmediavault/archives InRelease
Get:2 file:/var/cache/openmediavault/archives Release
Ign:2 file:/var/cache/openmediavault/archives Release
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:3 file:/var/cache/openmediavault/archives Packages
Ign:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Get:3 file:/var/cache/openmediavault/archives Packages
Get:4 file:/var/cache/openmediavault/archives Translation-en
Ign:4 file:/var/cache/openmediavault/archives Translation-en
Hit:5 http://archive.raspberrypi.org/debian buster InRelease
Hit:6 http://httpredir.debian.org/debian buster-backports InRelease
Hit:7 http://security.debian.org/debian-security buster/updates InRelease
Hit:8 http://packages.openmediavault.org/public usul InRelease
Hit:9 https://openmediavault.github.io/packages usul InRelease
Hit:10 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:11 https://download.docker.com/linux/debian buster InRelease
Hit:12 https://downloads.plex.tv/repo/deb public InRelease
Ign:13 https://dl.bintray.com/openmediavault-plugin-developers/usul buster InRelease
Get:14 https://dl.bintray.com/openmediavault-plugin-developers/usul buster Release [4363 B]
Fetched 4363 B in 3s (1447 B/s)
Reading package lists... Done
pi@rpi:~ $ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libpulse0 libpulsedsp lxplug-bluetooth lxplug-cputemp lxplug-ejecter lxplug-ptbatt
lxplug-volumepulse openssl pishutdown piwiz pprompt pulseaudio pulseaudio-module-bluetooth
pulseaudio-utils rc-gui rpi-chromium-mods xserver-common xserver-xorg-core
18 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 17.5 MB of archives.
After this operation, 2048 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org/debian-security buster/updates/main armhf openssl armhf 1.1.1d-0+deb10u4 [817 kB]
Get:2 http://archive.raspberrypi.org/debian buster/main armhf rpi-chromium-mods armhf 20201207 [9416 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main armhf libpulsedsp armhf 12.2-4+deb10u1+rpi2 [45.1 kB]
Get:4 http://archive.raspberrypi.org/debian buster/main armhf pulseaudio-utils armhf 12.2-4+deb10u1+rpi2 [75.5 kB]
Get:5 http://archive.raspberrypi.org/debian buster/main armhf pulseaudio-module-bluetooth armhf 12.2-4+deb10u1+rpi2 [78.8 kB]
Get:6 http://archive.raspberrypi.org/debian buster/main armhf pulseaudio armhf 12.2-4+deb10u1+rpi2 [1036 kB]
Get:7 http://archive.raspberrypi.org/debian buster/main armhf libpulse0 armhf 12.2-4+deb10u1+rpi2 [245 kB]
Get:8 http://archive.raspberrypi.org/debian buster/main armhf lxplug-bluetooth armhf 0.18 [19.5 kB]
Get:9 http://archive.raspberrypi.org/debian buster/main armhf lxplug-cputemp armhf 0.6 [9188 B]
Get:10 http://archive.raspberrypi.org/debian buster/main armhf lxplug-ejecter armhf 0.12 [9384 B]
Get:11 http://archive.raspberrypi.org/debian buster/main armhf lxplug-ptbatt armhf 0.13 [15.6 kB]
Get:12 http://archive.raspberrypi.org/debian buster/main armhf lxplug-volumepulse armhf 0.2 [18.2 kB]
Get:13 http://archive.raspberrypi.org/debian buster/main armhf pishutdown armhf 0.15 [7220 B]
Get:14 http://archive.raspberrypi.org/debian buster/main armhf piwiz armhf 0.20 [158 kB]
Get:15 http://archive.raspberrypi.org/debian buster/main armhf pprompt all 0.18 [4272 B]
Get:16 http://archive.raspberrypi.org/debian buster/main armhf rc-gui armhf 1.45 [52.6 kB]
Get:17 http://archive.raspberrypi.org/debian buster/main armhf xserver-common all 2:1.20.4-1+rpt2+deb10u2 [2235 kB]
Get:18 http://archive.raspberrypi.org/debian buster/main armhf xserver-xorg-core armhf 2:1.20.4-1+rpt2+deb10u2 [3280 kB]
Fetched 17.5 MB in 2s (9938 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 176924 files and directories currently installed.)
Preparing to unpack .../00-rpi-chromium-mods_20201207_armhf.deb ...
Unpacking rpi-chromium-mods (20201207) over (20201113) ...
Preparing to unpack .../01-libpulsedsp_12.2-4+deb10u1+rpi2_armhf.deb ...
Unpacking libpulsedsp:armhf (12.2-4+deb10u1+rpi2) over (12.2-4+deb10u1+rpi1) ...
Preparing to unpack .../02-pulseaudio-utils_12.2-4+deb10u1+rpi2_armhf.deb ...
Unpacking pulseaudio-utils (12.2-4+deb10u1+rpi2) over (12.2-4+deb10u1+rpi1) ...
Preparing to unpack .../03-pulseaudio-module-bluetooth_12.2-4+deb10u1+rpi2_armhf.deb ...
Unpacking pulseaudio-module-bluetooth (12.2-4+deb10u1+rpi2) over (12.2-4+deb10u1+rpi1) ...
Preparing to unpack .../04-pulseaudio_12.2-4+deb10u1+rpi2_armhf.deb ...
Unpacking pulseaudio (12.2-4+deb10u1+rpi2) over (12.2-4+deb10u1+rpi1) ...
Preparing to unpack .../05-libpulse0_12.2-4+deb10u1+rpi2_armhf.deb ...
Unpacking libpulse0:armhf (12.2-4+deb10u1+rpi2) over (12.2-4+deb10u1+rpi1) ...
Preparing to unpack .../06-lxplug-bluetooth_0.18_armhf.deb ...
Unpacking lxplug-bluetooth (0.18) over (0.17) ...
Preparing to unpack .../07-lxplug-cputemp_0.6_armhf.deb ...
Unpacking lxplug-cputemp (0.6) over (0.5) ...
Preparing to unpack .../08-lxplug-ejecter_0.12_armhf.deb ...
Unpacking lxplug-ejecter (0.12) over (0.11) ...
Preparing to unpack .../09-lxplug-ptbatt_0.13_armhf.deb ...
Unpacking lxplug-ptbatt (0.13) over (0.12) ...
Preparing to unpack .../10-lxplug-volumepulse_0.2_armhf.deb ...
Unpacking lxplug-volumepulse (0.2) over (0.1) ...
Preparing to unpack .../11-openssl_1.1.1d-0+deb10u4_armhf.deb ...
Unpacking openssl (1.1.1d-0+deb10u4) over (1.1.1d-0+deb10u3+rpt1) ...
Preparing to unpack .../12-pishutdown_0.15_armhf.deb ...
Leaving 'diversion of /usr/bin/lxde-pi-shutdown-helper to /usr/bin/lxde-pi-shutdown-helper.old by pishutdown'
Unpacking pishutdown (0.15) over (0.14) ...
Preparing to unpack .../13-piwiz_0.20_armhf.deb ...
Unpacking piwiz (0.20) over (0.19) ...
Preparing to unpack .../14-pprompt_0.18_all.deb ...
Unpacking pprompt (0.18) over (0.17) ...
Preparing to unpack .../15-rc-gui_1.45_armhf.deb ...
Unpacking rc-gui (1.45) over (1.44) ...
Preparing to unpack .../16-xserver-common_2%3a1.20.4-1+rpt2+deb10u2_all.deb ...
Unpacking xserver-common (2:1.20.4-1+rpt2+deb10u2) over (2:1.20.4-1+rpt2+deb10u1) ...
Preparing to unpack .../17-xserver-xorg-core_2%3a1.20.4-1+rpt2+deb10u2_armhf.deb ...
Unpacking xserver-xorg-core (2:1.20.4-1+rpt2+deb10u2) over (2:1.20.4-1+rpt2+deb10u1) ...
Setting up rpi-chromium-mods (20201207) ...
Setting up lxplug-ejecter (0.12) ...
Setting up libpulse0:armhf (12.2-4+deb10u1+rpi2) ...
Setting up lxplug-ptbatt (0.13) ...
Setting up libpulsedsp:armhf (12.2-4+deb10u1+rpi2) ...
Setting up pprompt (0.18) ...
Setting up lxplug-bluetooth (0.18) ...
Setting up pulseaudio-utils (12.2-4+deb10u1+rpi2) ...
Setting up piwiz (0.20) ...
Setting up pishutdown (0.15) ...
Setting up lxplug-cputemp (0.6) ...
Setting up xserver-common (2:1.20.4-1+rpt2+deb10u2) ...
Setting up openssl (1.1.1d-0+deb10u4) ...
Setting up rc-gui (1.45) ...
Setting up xserver-xorg-core (2:1.20.4-1+rpt2+deb10u2) ...
Setting up pulseaudio (12.2-4+deb10u1+rpi2) ...
Setting up pulseaudio-module-bluetooth (12.2-4+deb10u1+rpi2) ...
Setting up lxplug-volumepulse (0.2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.20-0+deb10u1) ...
Processing triggers for desktop-file-utils (0.23-4) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi@rpi:~ $ curl -OLf https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c/raw/502e3b32a90495722d0286545d8b289b8a2dc908/zfs_build && chmod +x zfs_build && ./zfs_build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6454 100 6454 0 0 15703 0 --:--:-- --:--:-- --:--:-- 29879

  • main
  • VER=10
  • export 'CC=ccache gcc-10'
  • CC='ccache gcc-10'
  • export 'CXX=ccache g++-10'
  • CXX='ccache g++-10'
  • export SHLIB_CXXLD=g++-10
  • SHLIB_CXXLD=g++-10
    ++ pwd
  • cdir=/home/pi
    ++ uname -m
  • zfs_work=/home/pi/aarch64
  • mkdir -p /home/pi/aarch64
  • zfs_branch=zfs-2.0-release
  • ubuntu_branch=applied/ubuntu/devel
  • dist=groovy
  • mkdir -p /home/pi/aarch64
  • [[ ! -f zfs_2_symbols.patch ]]
  • cd /home/pi/aarch64
  • rm -rf zfs
  • [[ ! -d zfs ]]
  • git clone --depth=1 -b zfs-2.0-release https://github.com/openzfs/zfs.git
    Cloning into 'zfs'...
    remote: Enumerating objects: 3964, done.
    remote: Counting objects: 100% (3964/3964), done.
    remote: Compressing objects: 100% (3409/3409), done.
    remote: Total 3964 (delta 1137), reused 1261 (delta 408), pack-reused 0
    Receiving objects: 100% (3964/3964), 10.41 MiB | 6.96 MiB/s, done.
    Resolving deltas: 100% (1137/1137), done.
    ++ git -C /home/pi/aarch64/zfs rev-parse --short zfs-2.0-release
  • zfsrev=dcbf847
    ++ cd /home/pi/aarch64/zfs
    ++ git log -1 --pretty=%B
    ++ head -n 1
  • zfs_commitmsg='Tag 2.0.0'
    ++ grep Version /home/pi/aarch64/zfs/META
    ++ awk '{print $2}'
  • ZFS_VERSION=2.0.0
  • sudo apt install -y devscripts libaio-dev libblkid-dev libelf-dev libssl-dev libudev-dev python3-all-dev python3-cffi python3-sphinx uuid-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    devscripts is already the newest version (2.19.5+deb10u1).
    libaio-dev is already the newest version (0.3.112-3).
    libblkid-dev is already the newest version (2.33.1-0.1).
    libelf-dev is already the newest version (0.176-1.1).
    libudev-dev is already the newest version (241-7~deb10u4+rpi1).
    python3-all-dev is already the newest version (3.7.3-1).
    python3-cffi is already the newest version (1.12.2-1).
    python3-sphinx is already the newest version (1.8.4-1).
    uuid-dev is already the newest version (2.33.1-0.1).
    libssl-dev is already the newest version (1.1.1d-0+deb10u4).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • rm -f /home/pi/aarch64/bb-dependencies.sh
  • cd /home/pi/aarch64
  • curl -OLf https://raw.githubusercontent.com/openzfs/zfs-buildbot/master/scripts/bb-dependencies.sh
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 7883 100 7883 0 0 25025 0 --:--:-- --:--:-- --:--:-- 25025
  • sudo bash /home/pi/aarch64/bb-dependencies.sh
    Missing configuration /etc/buildslave. Assuming dependencies are
    already satisfied and this is a persistent buildslave.
  • cd /home/pi/aarch64/zfs
  • ./autogen.sh
    autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I config autoreconf: configure.ac: tracing autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'. libtoolize: copying file 'config/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'. libtoolize: copying file 'config/libtool.m4' libtoolize: copying file 'config/ltoptions.m4' libtoolize: copying file 'config/ltsugar.m4' libtoolize: copying file 'config/ltversion.m4' libtoolize: copying file 'config/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:49: installing 'config/compile' configure.ac:39: installing 'config/config.guess' configure.ac:39: installing 'config/config.sub' configure.ac:42: installing 'config/install-sh' configure.ac:42: installing 'config/missing' cmd/mount_zfs/Makefile.am: installing 'config/depcomp' autoreconf: Leaving directory .'
  • cd /home/pi/aarch64
  • rm -rf /home/pi/aarch64/zfs-linux
  • mkdir -p /home/pi/aarch64/zfs-linux
  • cd /home/pi/aarch64/zfs-linux
  • git init
    Initialized empty Git repository in /home/pi/aarch64/zfs-linux/.git/
  • git remote add origin https://git.launchpad.net/ubuntu/+source/zfs-linux
  • git checkout -b applied/ubuntu/devel
    Switched to a new branch 'applied/ubuntu/devel'
  • git config core.sparsecheckout true
  • echo debian/
  • git config pull.ff only
  • git pull origin applied/ubuntu/devel
    remote: Enumerating objects: 16932, done.
    remote: Counting objects: 100% (16932/16932), done.
    remote: Compressing objects: 100% (5036/5036), done.
    Receiving objects: 100% (16932/16932), 12.42 MiB | 6.13 MiB/s, done.
    remote: Total 16932 (delta 12304), reused 16176 (delta 11774)
    Resolving deltas: 100% (12304/12304), done.
    From https://git.launchpad.net/ubuntu/+source/zfs-linux
  • branch applied/ubuntu/devel -> FETCH_HEAD
  • [new branch] applied/ubuntu/devel -> origin/applied/ubuntu/devel
  • mv /home/pi/aarch64/zfs-linux/debian/patches/series /home/pi/aarch64/zfs-linux/debian/patches/series.old
  • mv /home/pi/aarch64/zfs-linux/debian /home/pi/aarch64/zfs/
  • cd /home/pi/aarch64/zfs
  • sed -i 's/DO_OVERLAY_MOUNTS='''no'''/DO_OVERLAY_MOUNTS='''yes'''/g' etc/default/zfs.in
  • cd /home/pi/aarch64/zfs
  • sed -i 's/usr/share/pkgconfig/lib/pkgconfig/g' debian/libzfslinux-dev.install
  • cd /home/pi/aarch64/zfs
  • sed -i /zfs-load-module.service/d debian/zfsutils-linux.install
  • cd /home/pi/aarch64/zfs
  • sed -i '/enum-extract.*/a \t\t'''$(CURDIR)/scripts/make_gitrev.sh''' \' debian/rules
  • zfsutilsfilesadd=(usr/share/pam-configs/zfs_key usr/share/man/man8/zstream.8 usr/share/man/man8/zfs-change-key.8 usr/share/man/man8/zpool-wait.8 usr/share/man/man8/zpoolprops.8 usr/share/man/man8/zfs-unjail.8 usr/share/man/man8/zpool-list.8 usr/share/man/man8/zpool-split.8 usr/share/man/man8/zpool-replace.8 usr/share/man/man8/zpool-set.8 usr/share/man/man8/zpool-upgrade.8 usr/share/man/man8/zfs-upgrade.8 usr/share/man/man8/zpool-history.8 usr/share/man/man8/zfs-projectspace.8 usr/share/man/man8/zpool-offline.8 usr/share/man/man8/zfs-create.8 usr/share/man/man8/zfs-snapshot.8 usr/share/man/man8/zpool-events.8 usr/share/man/man8/zfs-rollback.8 usr/share/man/man8/zfs-destroy.8 usr/share/man/man8/zpool-destroy.8 usr/share/man/man8/zpool-get.8 usr/share/man/man8/zpool-trim.8 usr/share/man/man8/zfs-diff.8 usr/share/man/man8/zfs-jail.8 usr/share/man/man8/zfs-rename.8 usr/share/man/man8/zpool-online.8 usr/share/man/man8/zfs-promote.8 usr/share/man/man8/zpool-import.8 usr/share/man/man8/zfs-get.8 usr/share/man/man8/zfs-unallow.8 usr/share/man/man8/zpool-clear.8 usr/share/man/man8/zfs-unload-key.8 usr/share/man/man8/zfs-mount.8 usr/share/man/man8/zpool-labelclear.8 usr/share/man/man8/zpool-resilver.8 usr/share/man/man8/zpool-status.8 usr/share/man/man8/zfs-share.8 usr/share/man/man8/zfs_ids_to_path.8 usr/share/man/man8/zfs-load-key.8 usr/share/man/man8/zpool-export.8 usr/share/man/man8/zfs-hold.8 usr/share/man/man8/zpool-remove.8 usr/share/man/man8/zpool-initialize.8 usr/share/man/man8/zpoolconcepts.8 usr/share/man/man8/zfsconcepts.8 usr/share/man/man8/zfs-send.8 usr/share/man/man8/zfs-userspace.8 usr/share/man/man8/zfs-release.8 usr/share/man/man8/zpool-create.8 usr/share/man/man8/zpool-reguid.8 usr/share/man/man8/zfsprops.8 usr/share/man/man8/zpool-scrub.8 usr/share/man/man8/zfs-list.8 usr/share/man/man8/zfs-set.8 usr/share/man/man8/zfs-clone.8 usr/share/man/man8/zfs-inherit.8 usr/share/man/man8/zfs-bookmark.8 usr/share/man/man8/zfs-unmount.8 usr/share/man/man8/zfs-project.8 usr/share/man/man8/zfs-groupspace.8 usr/share/man/man8/zfs-redact.8 usr/share/man/man8/zpool-attach.8 usr/share/man/man8/zpool-sync.8 usr/share/man/man8/zpool-checkpoint.8 usr/share/man/man8/zfs-allow.8 usr/share/man/man8/zpool-reopen.8 usr/share/man/man8/zfs-wait.8 usr/share/man/man8/zfs-recv.8 usr/share/man/man8/zpool-iostat.8 usr/share/man/man8/zfs-receive.8 usr/share/man/man8/zpool-add.8 usr/share/man/man8/zpool-detach.8 usr/share/man/man1/arcstat.1 lib/security/pam_zfs_key.so lib/security/pam_zfs_key.la sbin/zstream sbin/zfs_ids_to_path)
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/pam-configs/zfs_key
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zstream.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-change-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-wait.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpoolprops.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unjail.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-list.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-split.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-replace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-set.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-upgrade.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-upgrade.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-history.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-projectspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-offline.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-create.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-snapshot.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-events.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-rollback.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-destroy.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-destroy.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-get.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-trim.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-diff.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-jail.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-rename.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-online.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-promote.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-import.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-get.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unallow.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-clear.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unload-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-mount.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-labelclear.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-resilver.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-status.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-share.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs_ids_to_path.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-load-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-export.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-hold.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-remove.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-initialize.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpoolconcepts.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfsconcepts.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-send.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-userspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-release.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-create.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-reguid.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfsprops.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-scrub.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-list.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-set.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-clone.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-inherit.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-bookmark.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unmount.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-project.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-groupspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-redact.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-attach.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-sync.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-checkpoint.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-allow.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-reopen.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-wait.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-recv.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-iostat.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-receive.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-add.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-detach.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man1/arcstat.1
  • for i in "${zfsutilsfilesadd[@]}"
  • echo lib/security/pam_zfs_key.so
  • for i in "${zfsutilsfilesadd[@]}"
  • echo lib/security/pam_zfs_key.la
  • for i in "${zfsutilsfilesadd[@]}"
  • echo sbin/zstream
  • for i in "${zfsutilsfilesadd[@]}"
  • echo sbin/zfs_ids_to_path
  • libzfs2filesadd=(lib/libzfsbootenv.a lib/libzfsbootenv.so.1 lib/libzfsbootenv.so.1.0.0)
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.a
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.so.1
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.so.1.0.0
  • cd /home/pi/aarch64
  • patch -p1
    patching file zfs/debian/libnvpair1linux.symbols
    patching file zfs/debian/libuutil1linux.symbols
    patching file zfs/debian/libzfs2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libuutil1linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
  • [[ ! -f /home/pi/aarch64/zfs/debian/changelog ]]
  • cd /home/pi/aarch64/zfs
  • dch '' --distribution groovy -b -v 2.0.0 'Tag 2.0.0'
    libdistro-info-perl is not installed, Debian release names are not known.
    libdistro-info-perl is not installed, Ubuntu release names are not known.
    dch warning: New package version is Debian native whilst previous version was not
  • mkdir -p /home/pi/aarch64/logs/
  • echo 'tail -F /home/pi/aarch64/logs/dcbf847.log'
    tail -F /home/pi/aarch64/logs/dcbf847.log
  • nice -n 20 debuild --preserve-envvar=CC --no-tgz-check -b -uc -us
  • echo failure
    failure
  • success=1
  • tail /home/pi/aarch64/logs/dcbf847.log
    dpkg-buildpackage: info: source distribution groovy
    dpkg-buildpackage: info: source changed by pi@rpi.umani.blue
    dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)
    dpkg-source --before-build .
    dpkg-buildpackage: info: host architecture armhf
    dpkg-checkbuilddeps: error: Unmet build dependencies: dkms (>> 2.1.1.2-5)
    dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
    dpkg-buildpackage: warning: (Use -d flag to override.)
    debuild: fatal error at line 1182:
    dpkg-buildpackage -us -uc -ui -b failed

@satmandu
Copy link

satmandu commented Dec 9, 2020 via email

@msurinx
Copy link

msurinx commented Dec 9, 2020

Same result. See below. I am asking myself if I should install Unbuntu 20.04 which includes ZFS instead of trying this on a semi 64/32 bit Debian environment? What do you propose?

pi@rpi:~ $ sudo apt install dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version (2.6.1-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@rpi:~ $ uname -r
5.4.81-v8+
pi@rpi:~ $ sudo su
root@rpi:/home/pi# curl -OLf https://gist.github.com/satmandu/3aebcd7d26cdc588b40af29f1be6009c/raw/502e3b32a90495722d0286545d8b289b8a2dc908/zfs_build && chmod +x zfs_build && ./zfs_build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 6454 100 6454 0 0 15403 0 --:--:-- --:--:-- --:--:-- 15403

  • main
  • VER=10
  • export 'CC=ccache gcc-10'
  • CC='ccache gcc-10'
  • export 'CXX=ccache g++-10'
  • CXX='ccache g++-10'
  • export SHLIB_CXXLD=g++-10
  • SHLIB_CXXLD=g++-10
    ++ pwd
  • cdir=/home/pi
    ++ uname -m
  • zfs_work=/home/pi/aarch64
  • mkdir -p /home/pi/aarch64
  • zfs_branch=zfs-2.0-release
  • ubuntu_branch=applied/ubuntu/devel
  • dist=groovy
  • mkdir -p /home/pi/aarch64
  • [[ ! -f zfs_2_symbols.patch ]]
  • cd /home/pi/aarch64
  • rm -rf zfs
  • [[ ! -d zfs ]]
  • git clone --depth=1 -b zfs-2.0-release https://github.com/openzfs/zfs.git
    Cloning into 'zfs'...
    remote: Enumerating objects: 3964, done.
    remote: Counting objects: 100% (3964/3964), done.
    remote: Compressing objects: 100% (3409/3409), done.
    remote: Total 3964 (delta 1137), reused 1261 (delta 408), pack-reused 0
    Receiving objects: 100% (3964/3964), 10.41 MiB | 5.44 MiB/s, done.
    Resolving deltas: 100% (1137/1137), done.
    ++ git -C /home/pi/aarch64/zfs rev-parse --short zfs-2.0-release
  • zfsrev=dcbf847
    ++ cd /home/pi/aarch64/zfs
    ++ git log -1 --pretty=%B
    ++ head -n 1
  • zfs_commitmsg='Tag 2.0.0'
    ++ grep Version /home/pi/aarch64/zfs/META
    ++ awk '{print $2}'
  • ZFS_VERSION=2.0.0
  • sudo apt install -y devscripts libaio-dev libblkid-dev libelf-dev libssl-dev libudev-dev python3-all-dev python3-cffi python3-sphinx uuid-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    devscripts is already the newest version (2.19.5+deb10u1).
    libaio-dev is already the newest version (0.3.112-3).
    libblkid-dev is already the newest version (2.33.1-0.1).
    libelf-dev is already the newest version (0.176-1.1).
    libudev-dev is already the newest version (241-7~deb10u4+rpi1).
    python3-all-dev is already the newest version (3.7.3-1).
    python3-cffi is already the newest version (1.12.2-1).
    python3-sphinx is already the newest version (1.8.4-1).
    uuid-dev is already the newest version (2.33.1-0.1).
    libssl-dev is already the newest version (1.1.1d-0+deb10u4+rpt1).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • rm -f /home/pi/aarch64/bb-dependencies.sh
  • cd /home/pi/aarch64
  • curl -OLf https://raw.githubusercontent.com/openzfs/zfs-buildbot/master/scripts/bb-dependencies.sh
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 7883 100 7883 0 0 29973 0 --:--:-- --:--:-- --:--:-- 30087
  • sudo bash /home/pi/aarch64/bb-dependencies.sh
    Missing configuration /etc/buildslave. Assuming dependencies are
    already satisfied and this is a persistent buildslave.
  • cd /home/pi/aarch64/zfs
  • ./autogen.sh
    autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I config autoreconf: configure.ac: tracing autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'. libtoolize: copying file 'config/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'. libtoolize: copying file 'config/libtool.m4' libtoolize: copying file 'config/ltoptions.m4' libtoolize: copying file 'config/ltsugar.m4' libtoolize: copying file 'config/ltversion.m4' libtoolize: copying file 'config/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:49: installing 'config/compile' configure.ac:39: installing 'config/config.guess' configure.ac:39: installing 'config/config.sub' configure.ac:42: installing 'config/install-sh' configure.ac:42: installing 'config/missing' cmd/mount_zfs/Makefile.am: installing 'config/depcomp' autoreconf: Leaving directory .'
  • cd /home/pi/aarch64
  • rm -rf /home/pi/aarch64/zfs-linux
  • mkdir -p /home/pi/aarch64/zfs-linux
  • cd /home/pi/aarch64/zfs-linux
  • git init
    Initialized empty Git repository in /home/pi/aarch64/zfs-linux/.git/
  • git remote add origin https://git.launchpad.net/ubuntu/+source/zfs-linux
  • git checkout -b applied/ubuntu/devel
    Switched to a new branch 'applied/ubuntu/devel'
  • git config core.sparsecheckout true
  • echo debian/
  • git config pull.ff only
  • git pull origin applied/ubuntu/devel
    remote: Enumerating objects: 16932, done.
    remote: Counting objects: 100% (16932/16932), done.
    remote: Compressing objects: 100% (5036/5036), done.
    remote: Total 16932 (delta 12303), reused 16177 (delta 11774)
    Receiving objects: 100% (16932/16932), 12.44 MiB | 5.64 MiB/s, done.
    Resolving deltas: 100% (12303/12303), done.
    From https://git.launchpad.net/ubuntu/+source/zfs-linux
  • branch applied/ubuntu/devel -> FETCH_HEAD
  • [new branch] applied/ubuntu/devel -> origin/applied/ubuntu/devel
  • mv /home/pi/aarch64/zfs-linux/debian/patches/series /home/pi/aarch64/zfs-linux/debian/patches/series.old
  • mv /home/pi/aarch64/zfs-linux/debian /home/pi/aarch64/zfs/
  • cd /home/pi/aarch64/zfs
  • sed -i 's/DO_OVERLAY_MOUNTS='''no'''/DO_OVERLAY_MOUNTS='''yes'''/g' etc/default/zfs.in
  • cd /home/pi/aarch64/zfs
  • sed -i 's/usr/share/pkgconfig/lib/pkgconfig/g' debian/libzfslinux-dev.install
  • cd /home/pi/aarch64/zfs
  • sed -i /zfs-load-module.service/d debian/zfsutils-linux.install
  • cd /home/pi/aarch64/zfs
  • sed -i '/enum-extract.*/a \t\t'''$(CURDIR)/scripts/make_gitrev.sh''' \' debian/rules
  • zfsutilsfilesadd=(usr/share/pam-configs/zfs_key usr/share/man/man8/zstream.8 usr/share/man/man8/zfs-change-key.8 usr/share/man/man8/zpool-wait.8 usr/share/man/man8/zpoolprops.8 usr/share/man/man8/zfs-unjail.8 usr/share/man/man8/zpool-list.8 usr/share/man/man8/zpool-split.8 usr/share/man/man8/zpool-replace.8 usr/share/man/man8/zpool-set.8 usr/share/man/man8/zpool-upgrade.8 usr/share/man/man8/zfs-upgrade.8 usr/share/man/man8/zpool-history.8 usr/share/man/man8/zfs-projectspace.8 usr/share/man/man8/zpool-offline.8 usr/share/man/man8/zfs-create.8 usr/share/man/man8/zfs-snapshot.8 usr/share/man/man8/zpool-events.8 usr/share/man/man8/zfs-rollback.8 usr/share/man/man8/zfs-destroy.8 usr/share/man/man8/zpool-destroy.8 usr/share/man/man8/zpool-get.8 usr/share/man/man8/zpool-trim.8 usr/share/man/man8/zfs-diff.8 usr/share/man/man8/zfs-jail.8 usr/share/man/man8/zfs-rename.8 usr/share/man/man8/zpool-online.8 usr/share/man/man8/zfs-promote.8 usr/share/man/man8/zpool-import.8 usr/share/man/man8/zfs-get.8 usr/share/man/man8/zfs-unallow.8 usr/share/man/man8/zpool-clear.8 usr/share/man/man8/zfs-unload-key.8 usr/share/man/man8/zfs-mount.8 usr/share/man/man8/zpool-labelclear.8 usr/share/man/man8/zpool-resilver.8 usr/share/man/man8/zpool-status.8 usr/share/man/man8/zfs-share.8 usr/share/man/man8/zfs_ids_to_path.8 usr/share/man/man8/zfs-load-key.8 usr/share/man/man8/zpool-export.8 usr/share/man/man8/zfs-hold.8 usr/share/man/man8/zpool-remove.8 usr/share/man/man8/zpool-initialize.8 usr/share/man/man8/zpoolconcepts.8 usr/share/man/man8/zfsconcepts.8 usr/share/man/man8/zfs-send.8 usr/share/man/man8/zfs-userspace.8 usr/share/man/man8/zfs-release.8 usr/share/man/man8/zpool-create.8 usr/share/man/man8/zpool-reguid.8 usr/share/man/man8/zfsprops.8 usr/share/man/man8/zpool-scrub.8 usr/share/man/man8/zfs-list.8 usr/share/man/man8/zfs-set.8 usr/share/man/man8/zfs-clone.8 usr/share/man/man8/zfs-inherit.8 usr/share/man/man8/zfs-bookmark.8 usr/share/man/man8/zfs-unmount.8 usr/share/man/man8/zfs-project.8 usr/share/man/man8/zfs-groupspace.8 usr/share/man/man8/zfs-redact.8 usr/share/man/man8/zpool-attach.8 usr/share/man/man8/zpool-sync.8 usr/share/man/man8/zpool-checkpoint.8 usr/share/man/man8/zfs-allow.8 usr/share/man/man8/zpool-reopen.8 usr/share/man/man8/zfs-wait.8 usr/share/man/man8/zfs-recv.8 usr/share/man/man8/zpool-iostat.8 usr/share/man/man8/zfs-receive.8 usr/share/man/man8/zpool-add.8 usr/share/man/man8/zpool-detach.8 usr/share/man/man1/arcstat.1 lib/security/pam_zfs_key.so lib/security/pam_zfs_key.la sbin/zstream sbin/zfs_ids_to_path)
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/pam-configs/zfs_key
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zstream.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-change-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-wait.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpoolprops.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unjail.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-list.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-split.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-replace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-set.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-upgrade.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-upgrade.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-history.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-projectspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-offline.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-create.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-snapshot.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-events.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-rollback.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-destroy.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-destroy.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-get.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-trim.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-diff.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-jail.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-rename.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-online.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-promote.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-import.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-get.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unallow.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-clear.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unload-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-mount.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-labelclear.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-resilver.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-status.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-share.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs_ids_to_path.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-load-key.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-export.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-hold.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-remove.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-initialize.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpoolconcepts.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfsconcepts.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-send.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-userspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-release.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-create.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-reguid.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfsprops.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-scrub.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-list.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-set.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-clone.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-inherit.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-bookmark.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-unmount.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-project.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-groupspace.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-redact.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-attach.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-sync.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-checkpoint.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-allow.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-reopen.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-wait.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-recv.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-iostat.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zfs-receive.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-add.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man8/zpool-detach.8
  • for i in "${zfsutilsfilesadd[@]}"
  • echo usr/share/man/man1/arcstat.1
  • for i in "${zfsutilsfilesadd[@]}"
  • echo lib/security/pam_zfs_key.so
  • for i in "${zfsutilsfilesadd[@]}"
  • echo lib/security/pam_zfs_key.la
  • for i in "${zfsutilsfilesadd[@]}"
  • echo sbin/zstream
  • for i in "${zfsutilsfilesadd[@]}"
  • echo sbin/zfs_ids_to_path
  • libzfs2filesadd=(lib/libzfsbootenv.a lib/libzfsbootenv.so.1 lib/libzfsbootenv.so.1.0.0)
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.a
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.so.1
  • for i in "${libzfs2filesadd[@]}"
  • echo lib/libzfsbootenv.so.1.0.0
  • cd /home/pi/aarch64
  • patch -p1
    patching file zfs/debian/libnvpair1linux.symbols
    patching file zfs/debian/libuutil1linux.symbols
    patching file zfs/debian/libzfs2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
    patching file zfs/debian/libuutil1linux.symbols
    patching file zfs/debian/libzpool2linux.symbols
  • [[ ! -f /home/pi/aarch64/zfs/debian/changelog ]]
  • cd /home/pi/aarch64/zfs
  • dch '' --distribution groovy -b -v 2.0.0 'Tag 2.0.0'
    libdistro-info-perl is not installed, Debian release names are not known.
    libdistro-info-perl is not installed, Ubuntu release names are not known.
    dch warning: New package version is Debian native whilst previous version was not
  • mkdir -p /home/pi/aarch64/logs/
  • echo 'tail -F /home/pi/aarch64/logs/dcbf847.log'
    tail -F /home/pi/aarch64/logs/dcbf847.log
  • nice -n 20 debuild --preserve-envvar=CC --no-tgz-check -b -uc -us
  • echo failure
    failure
  • success=1
  • tail /home/pi/aarch64/logs/dcbf847.log
    #define VERSION "2.0.0"

configure: exit 77
dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking --bindir=/usr/bin --sbindir=/sbin --libdir=/lib --with-udevdir=/lib/udev --with-zfsexecdir=/usr/lib/zfs-linux --enable-systemd --enable-pyzfs --with-python=python3 --with-systemdunitdir=/lib/systemd/system --with-systemdpresetdir=/lib/systemd/system-preset --with-systemdgeneratordir=/lib/systemd/system-generators --with-config=user returned exit code 77
make[1]: *** [debian/rules:48: override_dh_auto_configure] Error 2
make[1]: Leaving directory '/home/pi/aarch64/zfs'
make: *** [debian/rules:34: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -b failed

  • [[ 1 == \0 ]]
    root@rpi:/home/pi#

@freddieventura
Copy link

Hi ,
First of all thanks for your script , I'm looking forward using it.
I tried to install it though on my Raspberry Pi 3 Model B+ , on a fresh installation of 2020-12-02-raspios-buster-armhf-lite I've got the following error

depmod: ERROR: could not open directory /lib/modules/5.4.79-v7+: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

I've been trying to do some of the stuff the other contributors had shared , but I haven't had luck so far

I would appreciate if someone can guide me with this.

Thanks

Full installation log on the link (didn't fit on the comment)

https://termbin.com/dj9b

@freddieventura
Copy link

My problem can be fixed by doing

sudo umount /boot
sudo mount /dev/mmcblk0p1 /boot
sudo apt install --reinstall raspberrypi-bootloader
sudo reboot

Thanks for the resource !

@roland-orange
Copy link

Hi Alexey, and again, thank you for the script. I have used this successfully many times, and this way have found ZFS to be sufficiently reliable under the regular 32bit RPiOS to be used in production machines across several kernel updates.

However the script errors out under the recently-released kernel 5.10.11 updates, returning the following. Any guidance as to how I might fix this would be appreciated!

Making all in zcp
Making all in module
/home/pi/Downloads/zfs/zfs/module/zfs/vdev_disk.c: In function ‘vdev_blkg_tryget’:
/home/pi/Downloads/zfs/zfs/module/zfs/vdev_disk.c:506:37: error: ‘struct percpu_ref’ has no member named ‘count’
rc = atomic_long_inc_not_zero(&ref->count);
^~
make[5]: *** [scripts/Makefile.build:279: /home/pi/Downloads/zfs/zfs/module/zfs/vdev_disk.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [scripts/Makefile.build:496: /home/pi/Downloads/zfs/zfs/module/zfs] Error 2
make[3]: *** [Makefile:1808: /home/pi/Downloads/zfs/zfs/module] Error 2
make[2]: *** [Makefile:30: modules] Error 2
make[1]: *** [Makefile:843: all-recursive] Error 1
make: *** [Makefile:712: all] Error 2

@satmandu
Copy link

FYI the 2.0.x zfs-dkms and related packages in the upcoming ubuntu 21.04 support linux 5.10.x

@roland-orange
Copy link

Thank you. So realistically nothing can be done (other than downgrading the kernel) until the updated zfs-dkms also appear in the RPiOS repos? Or could I try building zfs-dkms from source and then retrying the script above?

@jimmont
Copy link

jimmont commented Mar 2, 2021

@satmandu what's the best way currently to install the 2.0.x zfs-dkms (and related) on 5.10.x (raspberrypi os)?

@satmandu
Copy link

satmandu commented Mar 2, 2021

@jimmont Easiest way would be to upgrade to bullseye, as zfs 2.0.x is already there: https://packages.debian.org/bullseye/zfs-dkms

(The only pain in upgrading to bullseye was that IIRC I had to upgrade to gcc-9 and remove some gcc8 library package which I no longer needed which was holding up other package upgrades.)

@satmandu
Copy link

satmandu commented Mar 2, 2021

(This is assuming that you are on the 64 bit Raspi-OS of course.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment