Unable to load zfs.kext: Dependency problem

313 views
Skip to first unread message

Bjoern Kahl

unread,
Jun 30, 2013, 6:36:01 PM6/30/13
to MacZFS-Devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Dear All,

for some reason, I am not able to load the zfs.kext. Any hints
welcome.

System is a MacOSX 10.6.4 with XCode 3.2.4 and Macport 1.9.2

spl, zfs.kext and its plugin KernelExports.kext are compiled on that
box using the llvm compiler.

spl and zfs are installed using "sudo make install" in their
respective repositories.


spl load without complains.

The KernelExports.kext also loads. kextstat reports:

...
105 0 0xffffff7f80a03000 0x6000 0x6000 net.lundman.spl
(1.0.0) <7 5 4 3 1>
106 0 0 0 0
net.lundman.kernel.dependecies (12.0.0)


In this situation, kextutil says:

$ kextutil -verbose 3 -no-load /System/Library/Extensions/zfs.kext
No kernel file specified; using running kernel for linking.
/System/Library/Extensions/zfs.kext - no dependency found for
net.lundman.kernel.dependecies.
/System/Library/Extensions/zfs.kext - no dependency found for
net.lundman.kernel.dependecies.
/System/Library/Extensions/zfs.kext has problems:
Dependency Resolution Failures:
No kexts found for these libraries:
net.lundman.kernel.dependecies


What am I missing?


Best regards

Björn

- --
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++ www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQCVAgUBUdCyz1sDv2ib9OLFAQLb5wP/Re1JP4ef5+L6OUm9paPJ+cX4/R1CgP91
R2zqZqss6yhhGF10Uimfg2d5IfA4JW1j7+YwH5L0EJ5CXwY0O/qVndbrhQE0cCBl
lkBRkDJKkTiocc/hooQACVayOdVNUf2/AeqqaerfNuMNFr4D+Y3TFlRGS54hoHku
k/7t1IbpgbM=
=U84h
-----END PGP SIGNATURE-----

lun...@lundman.net

unread,
Jun 30, 2013, 6:49:18 PM6/30/13
to maczfs...@googlegroups.com
 In this situation, kextutil says: 

 $ kextutil -verbose 3 -no-load /System/Library/Extensions/zfs.kext
No kernel file specified; using running kernel for linking.
/System/Library/Extensions/zfs.kext - no dependency found for
net.lundman.kernel.dependecies.
/System/Library/Extensions/zfs.kext - no dependency found for
net.lundman.kernel.dependecies.
/System/Library/Extensions/zfs.kext has problems:
Dependency Resolution Failures:
    No kexts found for these libraries:
        net.lundman.kernel.dependecies



I have never personally done a "make install" but load things from the source directory. (Make install comes after stable :) )  Copying module/zfs/zfs.kext/ to /tmp with the root:wheel, and loading it.
"Kernel dependencies" is the little linking wrapper in zfs.kext/Contents/Plugins/ - did that get missed with make install maybe? 

```
tail -f /var/log/system.log &
rsync -ar spl/module/spl/spl.kext /tmp/
rsync -ar zfs/module/zfs/zfs.kext /tmp/
chown -R root:wheel /tmp/spl.kext /tmp/zfs.kext

kextload -v /tmp/spl.kext
kextload -vd /tmp/spl.kext /tmp/zfs.kext
```


 

Bjoern Kahl

unread,
Jul 7, 2013, 5:13:49 PM7/7/13
to maczfs...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 01.07.13 00:49, schrieb lun...@lundman.net:
> In this situation, kextutil says:
>
>>
>> $ kextutil -verbose 3 -no-load
>> /System/Library/Extensions/zfs.kext No kernel file specified;
>> using running kernel for linking.
>> /System/Library/Extensions/zfs.kext - no dependency found for
>> net.lundman.kernel.dependecies.
>> /System/Library/Extensions/zfs.kext - no dependency found for
>> net.lundman.kernel.dependecies.
>> /System/Library/Extensions/zfs.kext has problems: Dependency
>> Resolution Failures: No kexts found for these libraries:
>> net.lundman.kernel.dependecies
>>
>>
>>
> I have never personally done a "make install" but load things from
> the source directory. (Make install comes after stable :) ) Copying
> module/zfs/zfs.kext/ to /tmp with the root:wheel, and loading it.
> "Kernel dependencies" is the little linking wrapper in
> zfs.kext/Contents/Plugins/ - did that get missed with make install
> maybe?

Almost the right guess. :-)


> ``` tail -f /var/log/system.log & rsync -ar
> spl/module/spl/spl.kext /tmp/ rsync -ar zfs/module/zfs/zfs.kext
> /tmp/ chown -R root:wheel /tmp/spl.kext /tmp/zfs.kext
>
> kextload -v /tmp/spl.kext kextload -vd /tmp/spl.kext /tmp/zfs.kext
> ```

It turned out that the KernelExports.kext *inside* the zfs.kext is
found by kextload, kextutil et.al. But if I make the KernExports.kext
into a full kext in its own right, then everything loads. (Well, after
resolving some unrelated problems.)


Best

Björn

- --
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++ www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQCVAgUBUdnaClsDv2ib9OLFAQIYOQP/Xy/kYsmfVYJzkJMgStCwvRoq4bERb9O6
cayc2hc880CA1HWFvpGk6Y5zyFwBiQ4yYldIzUlWXKMMxTxqorHtXP01NcYaYQEX
h6ZS30lgaE02NcEUPGMMXAPcNgLnyYUo1O0PMO6ilZxL8QCupTT+34+yq1hhnMVx
4TkQLOCac4c=
=Ep9U
-----END PGP SIGNATURE-----

Bjoern Kahl

unread,
Jul 9, 2013, 4:01:26 PM7/9/13
to MacZFS-Devel, Jason Belec
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi Jason,

hope you don't mind that I answer back on the mailing list to your mail
sent directly to me.

Am 09.07.13 20:53, schrieb Jason Belec:
> OK I'm getting build errors as well. On OS X Mavericks.

can you (and anyone else getting build or load errors) please report
the exact errors here (please copy&paste)? Please also include the
exact version of your OS, XCode and Macports (if installed).

It might help us to better understand the root causes.


Checklist:
- the actual error message
- output of: uname -a
- output of: xcodebuild -version
- first line of: autoconf --version
- (in the SPL checkout) output of: git describe --dirty --long --always
- (in the ZFS checkout) output of: git describe --dirty --long --always
- (in the SPL checkout) output of: grep -e '^C[CX]\+ = ' Makefile
- (in the ZFS checkout) output of: grep -e '^C[CX]\+ = ' Makefile
- (if macports is installed) output of: port version

Additional checklist in case of load errors:
- kextutil -v 4 -A -r /path/to/folder/with/zfs.kext/and/spl.kext
/path/to/zfs.kext

Thanks alot

> Going to try getting things running under OS X 10.8.4 next.
>
> Looking at the text available for install/build, seems to be
> unclear, especially concerning dependencies, or am I missing
> something obvious getting this new stuff working?

Yes, the text could be a bit more detailed. Any suggestion or
questions welcome.


Björn


> On 2013-07-07, at 5:13 PM, Bjoern Kahl <googl...@bjoern-kahl.de>
- --
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++ www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQCVAgUBUdxsE1sDv2ib9OLFAQLpNQP+M/5Hl+g535TvmbZV75kL7dug4JDwjmPN
1hn+x05smUF6DCcOLhmqjpd+gUhc4FlbMezebZQbHWTF4VHTvf7jNM4QkbIRSBu9
zVqrwStd8yPK56z//O68oiuO/+fECA04PUjk5ZxcsykblnafQDxyiTG7Hy7D/XuR
Des4dfVz1TA=
=Dwz7
-----END PGP SIGNATURE-----

jasonbelec

unread,
Jul 12, 2013, 12:24:06 PM7/12/13
to maczfs...@googlegroups.com
OK getting places. Homebrew allowed libtoolze install, so ./autogen.sh ran.

Now
./configure CC=clang CXX=clang++
 or
 # ./configure CC=llvm-gcc CXX=llvm-g++
fails, either.....

checking kernel module prefix... /System/Library/Extensions

checking kernel header directory... Not found




in spl folder:

Darwin Jasons-iMac-3.local 13.0.0 Darwin Kernel Version 13.0.0: Tue Jul  2 15:57:48 PDT 2013; root:xnu-2422.1.35~2/RELEASE_X86_64 x86_64


Xcode 5.0


autoconf (GNU Autoconf) 2.69


grep -e '^C[CX]\+ = ' Makefile

grep: Makefile: No such file or directory

lun...@lundman.net

unread,
Jul 12, 2013, 7:47:28 PM7/12/13
to maczfs...@googlegroups.com

Someone mentioned that the staple /System/Library/Frameworks has moved, possible inside the XCode bundle.  Maybe something like
/Applications/Xcode.app/Contents//Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework
so, the path in config/spl-build.m4 needs to be updated, and we need to make it handle either location.



jasonbelec

unread,
Jul 15, 2013, 9:32:50 AM7/15/13
to maczfs...@googlegroups.com
Well good idea, changing that has not resulted in advancement. Still looking....

jasonbelec

unread,
Jul 18, 2013, 1:26:32 PM7/18/13
to maczfs...@googlegroups.com
OK, think I was missing something obvious. I think its really looking for

 /Headers/IOKit

which should be in the headers path.

jasonbelec

unread,
Aug 20, 2013, 10:52:05 AM8/20/13
to maczfs...@googlegroups.com
OK, this is now resolved, my bad. Too many development structure setups, now I have yet another machine in use. ;)  OS X 9 latest build and command line tools now work and compile as expected, it was me, that is a bug avoiding a fix for over 45 yrs. Moving forward-ish.....

jasonbelec

unread,
Aug 22, 2013, 3:35:57 PM8/22/13
to maczfs...@googlegroups.com
OK can someone explain why this isn't working....

patched this /Applications/Xcode.app/Contents//Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Kernel.framework into spl.

tried compiling
./configure CC=clang CXX=clang++ --with-spl=module/spl
the --with just gets ignored, tried following the --help, but I seem to be obtuse these days.

Totally different issue but will affect us,  code signing is proving interesting.

jasonbelec

unread,
Aug 22, 2013, 3:50:38 PM8/22/13
to maczfs...@googlegroups.com
Also for the record the current version of MacZFS stable has been running fine on this machine as I prepare to test this highly awesome version.... assuming I can figure out what these darn errors are.

I take it I'm the only victim? So lonely.....

jasonbelec

unread,
Aug 22, 2013, 9:12:07 PM8/22/13
to maczfs...@googlegroups.com
OK, changed line 125 of stropts.h, memchr to memrchr and now I can make spl.kext. However trying to load it provides the following error

sudo kextload -r /tmp/ -v /tmp/spl.kext

Requesting load of /tmp/spl.kext.

/tmp/spl.kext failed to load - (libkern/kext) different version/uuid already loaded; check the system/kernel logs for errors or try kextutil(8).


I'm still not able to get --with-spl=  to work with configure. Lots of warnings still.

Oh well, off for 4 days of camping with my bears, maybe I'll be clear headed next week. ;)

lun...@lundman.net

unread,
Aug 22, 2013, 10:00:09 PM8/22/13
to maczfs...@googlegroups.com
Not entirely sure what you are trying to do, maybe pop onto IRC so we can assist you directly.

"different version/uuid already loaded"  it already has SPL loaded, check "kextstat".

The -v version of kextload is to load zfs, ie

"kextload -r /tmp/ -v /tmp/spl.kext /tmp/zfs,kext".

- Try to load zfs.kext, using the direct path to spl.kext.

otherwise it will not resolve zfs.kext, since it knows not about spl.kext. If you copy it to /System/Library/Extensions it is
automatic, but I don't want to "install" the kexts while we are still in beta.

jasonbelec

unread,
Aug 27, 2013, 4:27:28 PM8/27/13
to maczfs...@googlegroups.com
Well it seems to have sorted itself out even though it gave errors. so I'm working through that to provide useful info. Seems to be recognizing your signature. :) ) )

Jasons-iMac-3:spl developer$ kextstat | grep spl

  140    1 0xffffff7f825d9000 0xc000     0xc000     net.lundman.spl (1.0.0) <7 5 4 3 1>

Jasons-iMac-3:spl developer$ kextstat | grep zfs

  122    0 0xffffff7f824ec000 0x69000    0x69000    org.maczfs.zfs.fs (74.3.0) <7 5 4 1>

  142    0 0xffffff7f825e5000 0x1ee000   0x1ee000   net.lundman.zfs (1.0.0) <141 140 15 7 5 4 3 1>


Running through all the possible zfs commands and cloning a live pool to play with if possible. Will have to reinstall IRC, oh bother....

Graham Perrin

unread,
Aug 30, 2013, 3:43:51 AM8/30/13
to maczfs...@googlegroups.com
On Tuesday, 27 August 2013 21:27:28 UTC+1, jasonbelec wrote:

 … 

Jasons-iMac-3:spl developer$ kextstat | grep zfs

  122    0 0xffffff7f824ec000 0x69000    0x69000    org.maczfs.zfs.fs (74.3.0) <7 5 4 1>

  142    0 0xffffff7f825e5000 0x1ee000   0x1ee000   net.lundman.zfs (1.0.0) <141 140 15 7 5 4 3 1>


For MacZFS prototype, I should not expect to find both together. 

My own test environment is without org.maczfs.zfs.fs
Reply all
Reply to author
Forward
0 new messages