zfsrogue / zfs-crypto

ZFS On Linux with crypto patches
Other
39 stars 7 forks source link

Can't build packages #50

Open FransUrbo opened 10 years ago

FransUrbo commented 10 years ago

A normal make works just fine, but make deb fails (!!).

[....]
make[5]: Entering directory `/tmp/zfs-build-root-BOBAUazK/BUILD/zfs-0.6.3_linuxtracepoints_crypt/cmd/zed'
  CC     zed.o
  CC     zed_conf.o
  CC     zed_event.o
  CC     zed_exec.o
  CC     zed_file.o
  CC     zed_log.o
  CC     zed_strings.o
  CCLD   zed
../../lib/libzfs/.libs/libzfs.so: undefined reference to `pkcs11_read_data'
../../lib/libzfs/.libs/libzfs.so: undefined reference to `crypto_pass2key'
../../lib/libzfs/.libs/libzfs.so: undefined reference to `zio_crypt_table'
collect2: error: ld returned 1 exit status
[....]

Changing the place of libzfs.la and libspl.la fixes the first two failures:

diff --git a/cmd/zed/Makefile.am b/cmd/zed/Makefile.am
index f1404de..0857de9 100644
--- a/cmd/zed/Makefile.am
+++ b/cmd/zed/Makefile.am
@@ -25,8 +25,8 @@ zed_SOURCES = \
 zed_LDADD = \
        $(top_builddir)/lib/libavl/libavl.la \
        $(top_builddir)/lib/libnvpair/libnvpair.la \
-       $(top_builddir)/lib/libspl/libspl.la \
-       $(top_builddir)/lib/libzfs/libzfs.la
+       $(top_builddir)/lib/libzfs/libzfs.la \
+       $(top_builddir)/lib/libspl/libspl.la

 zedconfdir = $(sysconfdir)/zfs/zed.d

But I don't know how to fix the third. zio_crypt_table is defined in module/zcommon/zcrypt_common.c, but we can't link that into libzfs.a!

PS. I'm using spl/master and zfs/upstream-20140607.

FransUrbo commented 10 years ago

Well, quick, (very!) dirty fix is just to copy the define in module/zcommon/zcrypt_common.c to lib/libzfs/libzfs_crypto.c.