/lib/libnvpair.so.2: Undefined symbol "aok" Symbol aok is provided by lbzfs.so (and libzpool.so as well). aok variable modifies behavior of assfail() function and ASSERT*() macros provided for illumos contributed code. ASSERT() is used in sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c file which shared by both the kernel nvlist / nvpair code and the userland library. Given that lbzfs.so and libzpool.so both depend on libnvpair.so, but the latter depends on neither, it might make sense to collapse 'aok' definition and move it to libnvpair. More elegant solution would be to introduce a library like "libillumos_compat" that would have illumos compatibility definitions that are not specific to any specialized library.
Created attachment 158043 [details] preliminary patch Attached is a patch based on a patch obtained from bapt@FreeBSD.org that I am currently testing.
A commit references this bug: Author: avg Date: Mon Sep 28 15:25:37 UTC 2015 New revision: 288340 URL: https://svnweb.freebsd.org/changeset/base/288340 Log: define aok in libnvpair which is linked to all zfs libraries that need aok This removes the circular dependency of libnvpair on libzfs / libzpool. PR: 199811 Obtained from: bapt MFC after: 23 days Changes: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c head/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c
base r289805 base r289806
A commit references this bug: Author: ngie Date: Wed Dec 23 04:36:16 UTC 2015 New revision: 292643 URL: https://svnweb.freebsd.org/changeset/base/292643 Log: MFC r282122,r285339,r288340: r282122 (by avg): nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized To do: upstream (https://www.illumos.org/issues/5778) r285339 (by oshogbo): Rename zfs nvpair files to not colidate with our nvlist. PR: 201356 Approved by: pjd (mentor) r288340 (by avg): define aok in libnvpair which is linked to all zfs libraries that need aok This removes the circular dependency of libnvpair on libzfs / libzpool. PR: 199811 Obtained from: bapt Changes: _U user/ngie/stable-10-libnv/ user/ngie/stable-10-libnv/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c user/ngie/stable-10-libnv/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c user/ngie/stable-10-libnv/cddl/lib/libnvpair/Makefile user/ngie/stable-10-libnv/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c user/ngie/stable-10-libnv/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c user/ngie/stable-10-libnv/sys/cddl/contrib/opensolaris/common/nvpair/nvpair_alloc_fixed.c user/ngie/stable-10-libnv/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c user/ngie/stable-10-libnv/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c user/ngie/stable-10-libnv/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair_alloc_fixed.c user/ngie/stable-10-libnv/sys/conf/files user/ngie/stable-10-libnv/sys/modules/zfs/Makefile