openzfsonosx / zfs

OpenZFS on OS X
https://openzfsonosx.org/
Other
824 stars 72 forks source link

Big Sur support #771

Open yurikoles opened 4 years ago

yurikoles commented 4 years ago

When I try to use O3X installed in Catalina before upgrade:

Failed to load ZFS module stack.
Load the module manually by running '/sbin/kextload /Library/Extensions/zfs.kext' as root.
The /dev/zfs device is missing and must be created.
Try running 'udevadm trigger' as root to create it.
$ sudo kextload /Library/Extensions/zfs.kext
Executing: /usr/bin/kmutil load -p /Library/Extensions/zfs.kext
Error: Error Domain=KMErrorDomain Code=1 "Error occurred while building cache: in '/Library/StagedExtensions/Library/Extensions/spl.kext/Contents/PlugIns/KernelExports.kext/KernelExports' missing __TEXT segment" UserInfo={NSLocalizedDescription=Error occurred while building cache: in '/Library/StagedExtensions/Library/Extensions/spl.kext/Contents/PlugIns/KernelExports.kext/KernelExports' missing __TEXT segment}

Building spl with new SDK:

$ make      
/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 -O2 -MT kextsymboltool.o -MD -MP -MF $depbase.Tpo -c -o kextsymboltool.o kextsymboltool.c &&\
    mv -f $depbase.Tpo $depbase.Po
/bin/sh ../../../libtool  --tag=CC --silent  --mode=link clang -Wall -Wshadow -Wstrict-prototypes -fno-strict-aliasing  -g -O2 -lstdc++  -o kextsymboltool kextsymboltool.o  
/usr/bin/nm -B -gj /System/Library/Kernels/kernel > allsymbols
./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

building zfs with new SDK:

Making all in zsysctl
  CC       zsysctl.o
zsysctl.c:125:27: error: expected '}'
struct ctlname hwname[] = CTL_HW_NAMES;
                          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/sysctl.h:612:2: note: expanded from macro 'CTL_HW_NAMES'
        { "target", CTLTYPE_STRING }, \
        ^
zsysctl.c:125:27: note: to match this '{'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/sysctl.h:585:22: note: expanded from macro 'CTL_HW_NAMES'
#define CTL_HW_NAMES { \
                     ^
1 error generated.
make[3]: *** [zsysctl.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
lundman commented 4 years ago

Yes, worse than that - the Plugins/ codeless kext no longer appear to work, or at least they've changed it so much the Catalina kextsymboltool.c no longer produce valid output for Big Sur.

Currently exploring dynamically loading the modules needed, which is just about there, except for the symbols you listed.

Keep an eye on https://github.com/openzfsonosx/openzfs/issues/8

as that is now where development is happening.

Noctem commented 4 years ago

@lundman Do you have an estimate for when that will become the recommended project for use in production? And there will be some sort of announcement when that day comes, right?