Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOMERGE] Zfs 0.8.0 #11994

Merged
merged 2 commits into from Jun 12, 2019

Conversation

@Vaelatern
Copy link
Member

commented May 28, 2019

DKMS fails to build, so the package is useless.

Otherwise, it's pretty good to go. I did not split out pyzfs, because it is not useful without all of zfs installed, and it's distributed with zfs.

@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented May 28, 2019

Cross build fails with /usr/lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/ld: ../../../../lib/libzfs_core/.libs/libzfs_core.so: undefined reference to 'strlcpy' so that's a new one to me.

@Vaelatern Vaelatern force-pushed the Vaelatern:zfs080 branch from d86a722 to a8192e3 May 28, 2019
@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented May 28, 2019

DKMS works now. Test pools were OK, testing further.

But cross build needs fixing. Looks like just some stupidity when invoking the linker.

@jnbr

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

I looked into the cross builds and found this:

[pid 14943] openat(AT_FDCWD, "/usr/aarch64-linux-gnu/builddir/zfs-0.8.0/lib/libnvpair/.libs/libuutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 14943] openat(AT_FDCWD, "/usr/aarch64-linux-gnu/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

The linker doesn't check for the correct /builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so.1 which explains the undefined reference to strlcpy, provided by libuutil.so.1.

I haven't figured out how to fix this though.

@pullmoll

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

Perhaps try to set a linker flag LDFLAGS="-Wl,-rpath,${wrksrc}/lib/libuutil/.libs" for cross builds?

@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

Giving that a go

@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

Same error as before. It's a shame the make system doesn't just say what it's using to build things.... off to find out what CCLD is.

@jnbr

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

It's a shame the make system doesn't just say what it's using to build things....

make V=1 helps

@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

Thanks, jnbr.

/bin/sh ../../../../libtool  --tag=CC --silent  --mode=link armv7l-linux-gnueabihf-gcc -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-omit-frame-pointer    -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard   -I/usr/armv7l-linux-gnueabihf/usr/include -I/usr/armv7l-linux-gnueabihf/usr/include/tirpc/   -Wl,-z,relro -Wl,-z,now -Wl,--as-needed    -L/usr/armv7l-linux-gnueabihf/usr/lib-Wl,-rpath,/builddir/zfs-0.8.0/lib/libuutil/.libs -o nvlist_to_lua nvlist_to_lua.o ../../../../lib/libnvpair/libnvpair.la ../../../../lib/libzfs_core/libzfs_core.la -luuid -lz
/usr/lib/gcc/armv7l-linux-gnueabihf/8.3.0/../../../../armv7l-linux-gnueabihf/bin/ld: warning: libuutil.so.1, needed by ../../../../lib/libzfs_core/.libs/libzfs_core.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/armv7l-linux-gnueabihf/8.3.0/../../../../armv7l-linux-gnueabihf/bin/ld: ../../../../lib/libzfs_core/.libs/libzfs_core.so: undefined reference to `strlcpy'
└» file masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/*
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.a:        current ar archive
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.la:       symbolic link to ../libuutil.la
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.lai:      libtool library file, ASCII text
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so:       symbolic link to libuutil.so.1.0.1
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so.1:     symbolic link to libuutil.so.1.0.1
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so.1.0.1: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=82fe607df10c842c5879babc958ac9d35c08e63a, not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_alloc.o:        ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_avl.o:          ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_dprintf.o:      ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_ident.o:        ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_list.o:         ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_misc.o:         ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_open.o:         ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_pname.o:        ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/uu_string.o:       ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

But it is worth noting that strings masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so.1.0.1 | grep strcpy shows nothing, so it's not in there...
EDIT: Forgot the l, it's in there.

@jnbr

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

Got it working by running autoreconf -fi in pre_configure to generate a less broken libtool.

@jnbr

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

But it is worth noting that strings masterdir/builddir/zfs-0.8.0/lib/libuutil/.libs/libuutil.so.1.0.1 | grep strcpy shows nothing, so it's not in there...

typo, check for strlcpy

@Vaelatern Vaelatern force-pushed the Vaelatern:zfs080 branch from a8192e3 to c27c30e Jun 5, 2019
@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

Ok, I'm satisfied that it works on native builds, it cross builds, and that the native and cross builds do not look different enough for me to see if this will not work on arm.
Does someone have a Void Linux ARM machine to test the cross build of ZFS? I just want to know that pools created with current ZFS, say straight, mirror, and raidz2, also work when ZFS is upgraded to 0.8.0. I'm extra cautious because this is a large release, and I did run those tests for native myself, and on my production ZFS pool.

@emacsomancer

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

@Vaelatern I have a Rpi I could install Void on to test, if that's helpful.

@the-maldridge

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

@emacsomancer please test and report your findings here.

@emacsomancer

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2019

@Vaelatern I ran into a snag: the (0.7.13) ZFS DKMS modules don't work against rpi-kernel, and I didn't have any luck in getting it to boot off of a 'vanilla' kernel (having removed the rpi-kernel pkg). I'm not sure what the procedure of installing a plain, non-rpi (say) aarch64 void build to a rpi would be.

@kapcom01

This comment has been minimized.

Copy link

commented Jun 10, 2019

Hello. I have a Raspberry Pi 3 with the void-rpi2-PLATFORMFS-20181111 image installed.

The package was built successfully following the guide on the wiki but when I tried to install it with xi zfs it failed to build dkms just like zfs 0.7.13.

# xi zfs
....
....
zfs-0.8.0_1: configuring ...                                                       
Added DKMS module 'zfs-0.8.0'.                                                     
Skipping kernel-4.14.79_1. kernel-headers package not installed...                 
Building DKMS module 'zfs-0.8.0' for kernel-4.19.46_1... FAILED!                   
DKMS module 'zfs-0.8.0' failed to build, please check /var/lib/dkms                
for errors in the log file.                                                        
Building DKMS module 'zfs-0.8.0' for kernel-4.19.49_1... FAILED!                   
DKMS module 'zfs-0.8.0' failed to build, please check /var/lib/dkms      
for errors in the log file.                                                        
zfs-0.8.0_1: installed successfully.                                               
                                                                                                                                                                      
0 downloaded, 26 installed, 0 updated, 26 configured, 0 removed.                                                                                                      

Here is the build log: /var/lib/dkms/zfs/0.8.0/build/config.log

Then I tried to build the missing scripts, but they failed too:

# cd /usr/src/rpi-kernel-headers-4.19.46_1/
# make scripts
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
drivers/ras/Kconfig:33: can't open file "arch/x86/ras/Kconfig"
make[2]: *** [scripts/kconfig/Makefile:69: syncconfig] Error 1
make[1]: *** [Makefile:539: syncconfig] Error 2
make: *** [Makefile:638: include/config/auto.conf.cmd] Error 2
make: *** [include/config/auto.conf.cmd] Deleting file 'include/config/tristate.conf'

EDIT: I forgot to mention that I have installed rpi-kernel-headers from my previous attempt to install zfs 0.7.13.

@Hoshpak

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

Building kernel modules for cross-compiled architectures was fixed some time ago but only for the vanilla kernels. The rpi kernel packages probably need modifications similar to #8546. If anyone got time for this (I currently don't unfortunately), you could give it a try and create a PR.

@Vaelatern

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

ok, if it's currently broken for arm, nobody is using ZFS for arm so far. I can be satisfied this will not break users, then.

I think this is mergable. @Gottox, would you like a say? I don't think this will break users, but it's more risky than I'd like, but this is also holding up other, very reasonable changes.

@Gottox

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

I think it's good to go.

@Vaelatern Vaelatern merged commit 994a0fa into void-linux:master Jun 12, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.