Error Compiling OpenZFS on BigSur

All your general support questions for OpenZFS on OS X.

Error Compiling OpenZFS on BigSur

Postby Eladio » Tue Aug 24, 2021 8:49 am

Hi all,
I'm trying to compile OpenZFS following instruction at https://openzfsonosx.org/wiki/Install. The machine I've using is a VM hosted on VMWare Fusion:

1. Boot from ISO to recovery, in terminal execute:
Code: Select all
nvram boot-args="-v keepsyms=1"
csrutil disable
spctl kext-consent disable

2. Reboot machine to main disk, and in terminal:
Code: Select all
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install automake libtool gawk coreutils
mkdir -p ~/Developer ~/bin
chmod 700 ~/Developer ~/bin
chmod +a "group:everyone deny delete" ~/Developer ~/bin
echo 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
cd ~/Developer/
git clone https://gist.github.com/7713854.git zfsadm-repo
cp zfsadm-repo/zfsadm ~/bin/

3. Then from Developer folder in Terminal, run zfsadm that ends with an error:
Code: Select all
config.status: executing libtool commands
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in scripts
make[2]: Nothing to be done for `all'.
Making all in module
Making all in spl
Making all in KernelExports
depbase=`echo kextsymboltool.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
   clang -DHAVE_CONFIG_H -include ../../../spl_config.h    -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing  -g -Os -Wno-tautological-constant-out-of-range-compare -MT kextsymboltool.o -MD -MP -MF $depbase.Tpo -c -o kextsymboltool.o kextsymboltool.c &&\
   mv -f $depbase.Tpo $depbase.Po
/usr/bin/nm -B -gj /System/Library/Kernels/kernel > allsymbols
/bin/sh ../../../libtool  --tag=CC --silent  --mode=link clang -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing  -g -Os -Wno-tautological-constant-out-of-range-compare -lstdc++  -o kextsymboltool kextsymboltool.o 
./kextsymboltool -arch x86_64 -import allsymbols -export zfs.exports -output KernelExports_64
exported name not in import list: _fo_read
exported name not in import list: _fo_write
exported name not in import list: _fp_drop
exported name not in import list: _fp_drop_written
exported name not in import list: _fp_lookup
make[4]: *** [KernelExports] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Please help!
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm

Re: Error Compiling OpenZFS on BigSur

Postby lundman » Tue Aug 24, 2021 1:57 pm

zfsadm is trying to build the old 1.9.4 version, which is not maintained for new macOS versions. I don't know
if zfsadm has been updated in a while.

The wiki instructions do need to be updated. You should get the OpenZFS repo, go with either "development" branch for latest, or the zfs-macOS-2.1.0-release if you want the release;

./autoggen.sh
./configure CPPFLAGS="-I/usr/local/opt/gettext/include -I/usr/local/opt/openssl@1.1/include" LDFLAGS="-L/usr/local/opt/gettext/lib/ -L/usr/local/opt/openssl@1.1/lib" CFLAGS="-g -O0" --sysconfdir=/etc --localstatedir=/var --prefix=/usr/local --sbindir=/usr/local/bin
make
make install
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Error Compiling OpenZFS on BigSur

Postby Eladio » Thu Aug 26, 2021 9:14 am

Thanks lundman. I got openzfs repo:
Code: Select all
git clone https://github.com/openzfs/zfs


And list all branches:
Code: Select all
zfs % git branch -r
  origin/HEAD -> origin/master
  origin/master
  origin/top
  origin/zfs-0.6.3-stable
  origin/zfs-0.6.4-release
  origin/zfs-0.6.5-release
  origin/zfs-0.7-release
  origin/zfs-0.8-release
  origin/zfs-0.8.7-staging
  origin/zfs-2.0-release
  origin/zfs-2.0.3-staging
  origin/zfs-2.0.4-staging
  origin/zfs-2.0.5-staging
  origin/zfs-2.0.6-staging
  origin/zfs-2.1-release
  origin/zfs-2.1.1-staging


May be I'm not getting the correct repo... Can't locate "zfs-macOS-2.1.0-release" or "Development" branches.
Thanks in advance!
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm

Re: Error Compiling OpenZFS on BigSur

Postby lundman » Sun Aug 29, 2021 1:15 am

User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Error Compiling OpenZFS on BigSur

Postby Eladio » Tue Aug 31, 2021 12:05 am

Thanks!
Eladio
 
Posts: 17
Joined: Fri Feb 05, 2021 11:52 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 24 guests