openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.43k stars 1.73k forks source link

Can't compile "zfs" in Debian 7.11 with kernel 3.16.x from debian-backports (sparc64 arch) #5531

Closed kosuodhmwa closed 7 years ago

kosuodhmwa commented 7 years ago

System information

Type Version/Name
Distribution Name Debian
Distribution Version 7.11 - sparc64 version has a 64 bit kernel (original is 3.2.x) and 32 bit user-land
Linux Kernel 3.16.x-sparc64-smp from debian-backports
Architecture sparc64-smp, UltraSPARC IIIi, SparcV9
ZFS Version Current version ("master branch"?) from git (2016-12-26) -> https://github.com/zfsonlinux/zfs
SPL Version Current version ("master-branch"?) from git (2016-12-26) -> https://github.com/zfsonlinux/spl

Hello

I've tried to start a build process as described at this page here: https://github.com/zfsonlinux/zfs/wiki/Building-ZFS

I can't build the current "zfs" from git (2016-12-26). The build process for "spl" (before building "zfs") works without any problems.

In the "zfs" directory, i also can execute "sh autogen.sh" and "./configure". But at the last step, the building process with "make", stops with an error:

.............................................
Making all in async_destroy
Making all in large_dnode
Making all in grow_pool
Making all in grow_replicas
Making all in history
Making all in inheritance
Making all in inuse
Making all in large_files
Making all in largest_pool
Making all in link_count
Making all in migration
Making all in mmap
Making all in mount
Making all in mv_files
Making all in nestedfs
Making all in no_space
Making all in nopwrite
Making all in online_offline
Making all in pool_names
Making all in poolversion
Making all in privilege
Making all in quota
Making all in raidz
Making all in redundancy
Making all in refquota
Making all in refreserv
Making all in rename_dirs
Making all in replacement
Making all in reservation
Making all in rootpool
Making all in rsend
Making all in scrub_mirror
Making all in slog
Making all in snapshot
Making all in snapused
Making all in sparse
Making all in threadsappend
Making all in tmpfile
  CC     tmpfile_test.o
  CC     tmpfile_001_pos.o
  CC     tmpfile_002_pos.o
  CC     tmpfile_003_pos.o
  CCLD   tmpfile_test
  CCLD   tmpfile_001_pos
  CCLD   tmpfile_003_pos
  CCLD   tmpfile_002_pos
Making all in truncate
Making all in upgrade
Making all in userquota
Making all in vdev_zaps
Making all in write_dirs
Making all in xattr
Making all in zvol
Making all in zvol_ENOSPC
Making all in zvol_cli
Making all in zvol_misc
Making all in zvol_swap
Making all in perf
Making all in fio
Making all in regression
Making all in scripts
Making all in stress
Making all in cmd
Making all in zfs
  CC     zfs_iter.o
  CC     zfs_main.o
  CCLD   zfs
../../lib/libzpool/.libs/libzpool.so: undefined reference to `sha1_consts'
collect2: error: ld returned 1 exit status
make[3]: *** [zfs] Fehler 1
make[2]: *** [all-recursive] Fehler 1
make[1]: *** [all-recursive] Fehler 1
make: *** [all] Fehler 2

Thank you for your feedbacks!

Best regards, Jan

gmelikov commented 7 years ago

except the kernel headers for kernel 3.16.x - they are from "debian-backports" which is correct in my opinion...?

IIRC kernel headers come in the same repository with kernel package, maybe that's the problem?

kosuodhmwa commented 7 years ago

What are the "IIRC kernel headers"...? Don't understand what you mean with that... Regards, Jan

gmelikov commented 7 years ago

I mean - are your kernel headers equal to installed kernel?

kosuodhmwa commented 7 years ago

Yes, i've downloaded the headers for the backport-kernel 3.16.x:

root@debian:/usr/src# ls linux-headers-3.16.0-0.bpo.4-common linux-kbuild-3.16 linux-headers-3.16.0-0.bpo.4-sparc64-smp root@debian:/usr/src#

Regards, Jan

kosuodhmwa commented 7 years ago

P.S.: "sh autogen.sh" & "./configure" works, and i don't need to specify any additional paths to run it successful. (https://github.com/zfsonlinux/zfs/wiki/Building-ZFS-> "tip: --with-spl=PATH and --with-spl-obj=PATH can be passed to configure if it is unable to locate the SPL.") Regards, Jan

behlendorf commented 7 years ago

@jas14 it sounds like you may have just need to to generate the ./configure script. If you're tracking master you may need to run sh autogen.sh from time to time as functionality is added. Is this still an issue?

kosuodhmwa commented 7 years ago

i've done all steps again from a-z as described here: https://github.com/zfsonlinux/zfs/wiki/Building-ZFS

sh autogen.sh was always working for both "spl" AND "zfs", i've always done that step before "make -s -j$(nproc)"

gmelikov commented 7 years ago

@jmar83 it looks like compiler can't appropriately reference some files. I don't know how can i help for now.

Please, try with latest master codebase. It doesn't have any problems with builds for me on debian jessie x86_64.

kosuodhmwa commented 7 years ago

I've done all steps again from beginning, including re-downloading the newest master source from github.

However, thank you... problem is now "solved" by using XFS for Linux SW RAID1, that does what it need to do ;)