building o3x on aarch64/monterey

Developer discussions.

building o3x on aarch64/monterey

Postby cml » Sun Apr 03, 2022 1:52 pm

Hi folks,

I installed the 2.1.0 arm64 package and for the most part it worked great on my m1 mac running Monterey. I set up a 4x2TB nvme over tb3 external array, along with a cache partition on the internal m1 storage. It was very stable, benchmarked well, and didn't see to have any stability problems, but I ran into an issue when sharing via NFS -- I got a "stale file handle" error on the remote (linux) system for any file creation. Some research here suggested a fix existed in 2.1.99. Unfortunately, I wasn't able to get the 2.1.99 packages from viewtopic.php?f=20&t=3677 to work on m1/monterey (maybe not compiled for aarch64?) so I tried to build my own.

The instructions on the wiki appear to be deprecated, and for a very old version, so I tried to work it out for I did the following:

cloned the repo
./configure CPPFLAGS="-I/opt/homebrew/Cellar/gettext/0.21/include -I/opt/homebrew/Cellar/openssl@1.1/1.1.1n/include" LDFLAGS="-L/opt/homebrew/Cellar/gettext/0.21/lib -L/opt/homebrew/Cellar/openssl@1.1/1.1.1n/lib" CFLAGS="-g -O0" --sysconfdir=/etc --localstatedir=/var --prefix=/usr/local --sbindir=/usr/local/bin

make install

It compiled successfully, but the zfs.kext causes a boot loop:

panic(cpu 0 caller 0xfffffe00227392b0): timed out waiting for child callback, inchild: 1
Debugger message: panic
Kernel Extensions in backtrace:

last started kext at 305875259: 1 (addr 0xfffffe0022ac0e40, size 1943)

I'm guessing some aspect of my build process is incorrect. If the build process looks reasonable, please consider me willing and able to troubleshoot this further for m1/Monterey, and let me know what other info I can provide. I only provided an abridged crash report since I'm assuming the problem is in my build process right now. :-) I installed the debugging kernel extensions and can provide further detail as needed.

Thanks for your efforts!

Posts: 2
Joined: Sun Apr 03, 2022 10:46 am

Re: building o3x on aarch64/monterey

Postby cml » Tue Apr 05, 2022 5:35 pm

I've tried a variety of things since my original post:

- tried compiling the 2.1.99 tag in the openzfs repo (compile failed)
- tried compiling the 2.1.0 release branch in the openzfs repo (compile failed)
- tried reinstalling MacOS Monterey (ended up at 12.3.1)
- tried purging every aspect of openzfs from the system and reinstalling both compiled and the original big sur arm64 version that originally worked (on 12.2.1)

All failed either with compile time or make errors, if it did build/install I got the boot loop I referred to before.

I enabled boot-args "-v keepsyms=1" but this apparently does nothing on m1/monterey, so I have no further debug info. Info on debugging kexts on M1/Monterey seems to not be documented in any meaningful way yet either, as the usual methods appear to do absolutely nothing. I haven't even been able to get a verbose boot to work.

I even went as far as to attempt to install Big Sur and an older version of Monterey (12.2.1) but unfortunately the installers would not work to go to an older version on the m1. I attempted to install Big Sur and Monterey 12.2.1 on a Parallels VM but evidently those options don't work either.

Since the 2.1.0-arm64 Big Sur package worked on 12.2.1 but -not- 12.3.1, it seems there's some breaking change there. Until I can get an older version of MacOS running on M1, or understand how to enable further debugging, I'm not sure how to continue troubleshooting this.

Any input on my build process would be appreciated, as I still feel like it's the main issue, but I'll keep pecking away at this and see if I can make any further progress.

Posts: 2
Joined: Sun Apr 03, 2022 10:46 am

Re: building o3x on aarch64/monterey

Postby Yze » Fri May 27, 2022 12:13 am

having the same results. Did checkout latest GIT on 12.3.1 and 12.4, compiled it per above description.
After granting permissions in the Security settings for kernel author "zfs" and rebooting the MacBook Pro M1 (2021) it infinite loops.
I had to shutdown, Hold Power and change security settings revoking the module to get it started again.

So right now it appears there is no ZFS for latest M1 Mac's at this time running Monterey with 12.3.1 or 12.4.
Posts: 1
Joined: Thu May 26, 2022 11:53 pm

Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 4 guests