Personal tools
You are here: Home Issue tracker Source tarball download incomplete [was: 0.6.9 Source does not build with update day Ubuntu 10.04 LTS - the Lucid Lynx]

#57 — Source tarball download incomplete [was: 0.6.9 Source does not build with update day Ubuntu 10.04 LTS - the Lucid Lynx]

State Resolved
Version: 0.6.9
Area Functionality
Issue type Bug
Severity Medium
Submitted by (anonymous)
Submitted on Jun 10, 2010
Responsible Seth Heeren
Target release: 0.6.9
Return to tracker
Last modified on Jun 10, 2010 by Seth Heeren
The source code does not built on up te date Ubuntu 10.04 LTS x64

P.s. https://launchpad.net/[…]/zfs-fuse_0.6.9-5_amd64.deb package does not work on Lucid Lynx.

NOTE 1: the resolution has been to rename the download so the file gets downloaded as 'zfs-fuse-0.6.9.tar.bz2'
 
   -- this make the relevant links in this issue broken links (http://zfs-fuse.net/releases/0.6.9/source-tar-ball no longer exists)

NOTE 2: the ubuntu package has been fixed, zfs-fuse_0.6.9-6 is now available in the repo
Steps to reproduce:
1) download the source code : http://zfs-fuse.net/releases/0.6.9/source-tar-ball

2) extract code with 7z

2) install components:
sudo apt-get install libaio-dev libattr1-dev libacl1-dev libz-dev libz-dev libfuse-dev libfuse2 scons libssl-dev

3) compile
xxxxx/src$ scons debug=2
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
Retrieved `cmd/stat/common/timestamp.o' from cache
Retrieved `cmd/zdb/ptrace.o' from cache
gcc -o cmd/zdb/zdb.o -c -pipe -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\"zfs-fuse\" -ggdb -DDEBUG -DLINUX_AIO -Ilib/libavl/include -Ilib/libnvpair/include -Ilib/libumem/include -Ilib/libzfscommon/include -Ilib/libzpool/include -Ilib/libsolcompat/include -Ilib/libzfs/include cmd/zdb/zdb.c
In file included from cmd/zdb/zdb.c:30:
lib/libzpool/include/sys/zfs_context.h:321: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'kmem_cache_t'
cmd/zdb/zdb.c: In function 'dump_packed_nvlist':
cmd/zdb/zdb.c:185: warning: implicit declaration of function 'umem_alloc'
cmd/zdb/zdb.c:185: error: 'UMEM_NOFAIL' undeclared (first use in this function)
cmd/zdb/zdb.c:185: error: (Each undeclared identifier is reported only once
cmd/zdb/zdb.c:185: error: for each function it appears in.)
cmd/zdb/zdb.c:191: warning: implicit declaration of function 'umem_free'
cmd/zdb/zdb.c: In function 'dump_zap':
cmd/zdb/zdb.c:334: warning: implicit declaration of function 'umem_zalloc'
cmd/zdb/zdb.c:335: error: 'UMEM_NOFAIL' undeclared (first use in this function)
cmd/zdb/zdb.c: In function 'dump_uberblock':
cmd/zdb/zdb.c:1486: warning: format not a string literal and no format arguments
cmd/zdb/zdb.c:1498: warning: format not a string literal and no format arguments
cmd/zdb/zdb.c: In function 'zdb_ddt_add_cb':
cmd/zdb/zdb.c:2204: error: 'UMEM_NOFAIL' undeclared (first use in this function)
cmd/zdb/zdb.c: In function 'zdb_read_block':
cmd/zdb/zdb.c:2553: error: 'UMEM_NOFAIL' undeclared (first use in this function)
cmd/zdb/zdb.c: In function 'find_zpool':
cmd/zdb/zdb.c:2742: error: 'UMEM_NOFAIL' undeclared (first use in this function)
cmd/zdb/zdb.c: In function 'main':
cmd/zdb/zdb.c:2804: error: 'UMEM_NOFAIL' undeclared (first use in this function)
scons: *** [cmd/zdb/zdb.o] Error 1
scons: building terminated because of errors.
xxx:~/source/zfs-fuse-0.6.9/src$



xxx:~$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Added by Seth Heeren on Jun 10, 2010 10:26 AM
Responsible manager: (UNASSIGNED)sgheeren
Ok... more than just a little surprised. I develop on Lucid. It sure works here!

Also, it apparently works on the build servers of canonical (launchpad). This is the 'gold standard' (automatically built on virtual clean chroot environments).

I can see some potential for error in the build instruction for libumem. Could you provide the output of

   sudo updatedb
   sudo mlocate umem.h

Can you shed some more light on your system? What version of the build tools are used?
Can you explain what it means when you say "zfs-fuse_0.6.9-5_amd64.deb does not work"? Does it sit on the couch? Sorry to be so obnoxious, but what is obvious to you is (obviously) not obvious to others.
Added by Seth Heeren on Jun 10, 2010 10:28 AM
ok, sry gcc is 4.4.3-4ubuntu5 (thx)
Added by Seth Heeren on Jun 10, 2010 03:11 PM
Issue state: unconfirmedopen
Target release: None0.6.9
I found a bug in the init script by trying to reproduce your setup. This bug affects both the i386 and amd64 builds of the package.
The init-script tries to find the zfs-fuse binary in the wrong location. This got introduced in the very change to make the debian package up-to-date. I must not have noticed since
(a) I already had a daemon running
(b) /etc/init.d/zfs-fuse start|stop|restart|... silently skips execution if the binary seems missing
(c) so the daemon seemed happily running - but it was the daemon from before the upgrade only

Apologies for my mistake: fixed, package uploaded (should be available soon as zfs-fuse_0.6.9-6)

For the record, (b) is the debian way of dealing with uninstalled pacakges (because the init-scripts and configs stay around unless packages are explicitely purged).

Thanks for reporting this

-------------------------------------------
Just to be certain I went and

(a) downloaded http://releases.ubuntu.com/[…]/ubuntu-10.04-server-amd64.iso
(b) installed a brandnew system (selecting only the OpenSSH server task)
(c) rebooted into the fresh system
(d) sudo apt-get update && sudo apt-get dist-upgrade (because you mentioned 'on up-to-date Lucid')
(e) rebooted into the new kernel

(f) sudo apt-get install python-software-properties
(g) sudo add-apt-repository ppa:bugs-sehe/zfs-fuse
(h) sudo apt-get update
(i) sudo apt-get install zfs-fuse
Added by Seth Heeren on Jun 10, 2010 04:09 PM
After rolling back the machine to pristine state, dist-upgrading again, I could not reproduce the reported build failure

$ sudo apt-get install libaio-dev libattr1-dev libacl1-dev libz-dev libz-dev libfuse-dev libfuse2 scons libssl-dev
$ wget -c -O - http://zfs-fuse.net/releases/0.6.9/source-tar-ball | tar xj
$ cd zfs-fuse-0.6.9/src/
$ scons debug=2

I got the intuition that maybe your system date is off - causing the build system to not re-configure libumem. I tried setting the system date in the past, but that makes the configure be triggered and fail with an explicit file timestamp check.

Can you verify that 'cd lib/libumem && ./configure' is in the scons output when doing a complete build? Perhaps try scons --no-cache to avoid confusion[1]

E.g.

mkdir /tmp/work
cd /tmp/work
wget -c -O - http://zfs-fuse.net/releases/0.6.9/source-tar-ball | tar xj
cd zfs-fuse-0.6.9/src/
scons debug=2 --no-cache 2>&1 | grep -C 10 configure
    

[1] although scons is actually very good and strict about using the cache only in idempotent situations

Added by (anonymous) on Jun 10, 2010 04:51 PM
I just put by backup back (clean install of 10.04 LTS).
reproduced the exact steps and this seems to work.

By debugging I noticed it has to do with the manual downloading the tarball and extracting it with 7zip.
I noticed that by default Ubuntu was not able to extract the downloaded tarball with the archive manager. That is why I used 7zip.

By using your instructions to download and extract it, it works perfect.
Added by Seth Heeren on Jun 10, 2010 04:55 PM
Issue state: openresolved
Ok, I'm closing this bug then and filing a new one

PS. be sure to check out the new and fixed debian/ubuntu package
I just tested it (sic!) on Debian Squeeze and Ubuntu Lucid in both 32-bit and 64 bit.

-----

The real issue here is that the download http://zfs-fuse.net/releases/0.6.9/source-tar-ball gets an improper name.

I have tried to circumvent this but haven't found the cause to date.

Once you rename the file zfs-fuse-0.6.9.tar.bz2 or similar, tar nor 7z should have much trouble extracting it.