Build-Instructions for spl and zfs?

107 views
Skip to first unread message

Bjoern Kahl

unread,
Mar 7, 2013, 1:11:26 PM3/7/13
to maczfs...@googlegroups.com

Dear all,

I am looking for build instructions for the spl and zfs code.

When I try to build in a fresh git checkout from a few minutes ago,
I get the following errors:

$ ./autogen.sh
./autogen.sh: line 4: libtoolize: command not found
configure.ac:40: warning: AM_INIT_AUTOMAKE: two- and three-arguments
forms are deprecated. For more info, see:
configure.ac:40:
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation
configure.ac:37: installing 'config/config.guess'
configure.ac:37: installing 'config/config.sub'
configure.ac:40: installing 'config/install-sh'
configure.ac:48: error: required file 'config/ltmain.sh' not found
configure.ac:40: installing 'config/missing'
cmd/mount_zfs/Makefile.am: installing 'config/depcomp'


I have macport installed, using this versions:

MacPorts: Version: 2.1.3

Relevant packages:
autoconf @2.69_0
autoconf213 @2.13_1
automake @1.13.1_0
libtool @2.4.2_3
m4 @1.4.16_0


Best regards

Björn

--
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++ www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |

Bjoern Kahl

unread,
Mar 7, 2013, 4:30:40 PM3/7/13
to maczfs...@googlegroups.com

Ok, forget the autogen.sh problem, that was caused by a failed
"git pull".

Now I have another problem:

Am 07.03.13 19:11, schrieb Bjoern Kahl:
>
> Dear all,
>
> I am looking for build instructions for the spl and zfs code.
>
> When I try to build in a fresh git checkout from a few minutes ago,
> I get the following errors:
>
> $ ./autogen.sh
> ./autogen.sh: line 4: libtoolize: command not found
> configure.ac:40: warning: AM_INIT_AUTOMAKE: two- and three-arguments
> forms are deprecated. For more info, see:
> configure.ac:40:
> http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation
> configure.ac:37: installing 'config/config.guess'
> configure.ac:37: installing 'config/config.sub'
> configure.ac:40: installing 'config/install-sh'
> configure.ac:48: error: required file 'config/ltmain.sh' not found
> configure.ac:40: installing 'config/missing'
> cmd/mount_zfs/Makefile.am: installing 'config/depcomp'

(forget above.)

compiling fails now in dsl_scan.c:

gcc -DHAVE_CONFIG_H -include ../../zfs_config.h -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_GNU_SOURCE
-D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-DTEXT_DOMAIN=\"zfs-linux-user\" -Wall -nostdinc -mkernel -D_KERNEL
-DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT
-DNAMEDSTREAMS=1 -DHAVE_SPL=1 -DZFS_META_VERSION=\"0.6.0\"
-DZFS_META_RELEASE=\"rc12\" -I../../include
-I/Users/bj/Projekte/mac-zfs/spl-osx/include
-I/System/Library/Frameworks/Kernel.framework/PrivateHeaders
-I/System/Library/Frameworks/Kernel.framework/Headers -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_GNU_SOURCE
-D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-DTEXT_DOMAIN=\"zfs-linux-user\" -g -MT zfs-dsl_scan.o -MD -MP -MF
.deps/zfs-dsl_scan.Tpo -c -o zfs-dsl_scan.o `test -f 'dsl_scan.c' ||
echo './'`dsl_scan.c
dsl_scan.c: In function ‘dsl_scan_visitbp’:
dsl_scan.c:712: error: ‘always_inline’ function could not be inlined in
call to ‘dsl_scan_visitdnode’: function not considered for inlining
dsl_scan.c:668: error: called from here
dsl_scan.c:712: error: ‘always_inline’ function could not be inlined in
call to ‘dsl_scan_visitdnode’: function not considered for inlining
dsl_scan.c:686: error: called from here
dsl_scan.c:712: error: ‘always_inline’ function could not be inlined in
call to ‘dsl_scan_visitdnode’: function not considered for inlining
dsl_scan.c:696: error: called from here
dsl_scan.c:712: error: ‘always_inline’ function could not be inlined in
call to ‘dsl_scan_visitdnode’: function not considered for inlining
dsl_scan.c:699: error: called from here
make[3]: *** [zfs-dsl_scan.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This can be fixed by commenting out the "always inline" attribute.

Then compiling completes, but the linker step fails:

/bin/sh ../../libtool --tag=CC --silent --mode=link gcc -Wall
-Wstrict-prototypes -fno-strict-aliasing -D_GNU_SOURCE
-D__EXTENSIONS__ -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-DTEXT_DOMAIN=\"zfs-linux-user\" -g -Xlinker -kext -nostdlib -lkmodc++
-lkmod -lcc_kext -o zfs zfs-arc.o zfs-bplist.o zfs-bpobj.o zfs-bptree.o
zfs-dbuf.o zfs-ddt.o zfs-ddt_zap.o zfs-dmu.o zfs-dmu_diff.o
zfs-dmu_object.o zfs-dmu_objset.o zfs-dmu_send.o zfs-dmu_traverse.o
zfs-dmu_tx.o zfs-dmu_zfetch.o zfs-dnode.o zfs-dnode_sync.o
zfs-dsl_dataset.o zfs-dsl_deadlist.o zfs-dsl_deleg.o zfs-dsl_dir.o
zfs-dsl_pool.o zfs-dsl_prop.o zfs-dsl_scan.o zfs-dsl_synctask.o zfs-fm.o
zfs-gzip.o zfs-lzjb.o zfs-metaslab.o zfs-refcount.o zfs-rrwlock.o
zfs-sa.o zfs-sha256.o zfs-spa.o zfs-spa_boot.o zfs-spa_config.o
zfs-spa_errlog.o zfs-spa_history.o zfs-spa_misc.o zfs-space_map.o
zfs-txg.o zfs-uberblock.o zfs-unique.o zfs-vdev.o zfs-vdev_cache.o
zfs-vdev_disk.o zfs-vdev_file.o zfs-vdev_label.o zfs-vdev_mirror.o
zfs-vdev_missing.o zfs-vdev_queue.o zfs-vdev_raidz.o zfs-vdev_root.o
zfs-zap.o zfs-zap_leaf.o zfs-zap_micro.o zfs-zfeature.o
zfs-zfeature_common.o zfs-zfs_acl.o zfs-zfs_byteswap.o zfs-zfs_debug.o
zfs-zfs_dir.o zfs-zfs_fm.o zfs-zfs_fuid.o zfs-zfs_ioctl.o zfs-zfs_log.o
zfs-zfs_onexit.o zfs-zfs_osx.o zfs-zfs_rlock.o zfs-zfs_vfsops.o
zfs-zfs_vnops.o zfs-zfs_znode.o zfs-zil.o zfs-zio.o zfs-zio_checksum.o
zfs-zio_compress.o zfs-zio_inject.o zfs-zle.o zfs-zrlock.o zfs-zvol.o
zfs-avl.o zfs-fnvpair.o zfs-nvpair.o zfs-nvpair_alloc_fixed.o
zfs-nvpair_alloc_spl.o zfs-u8_textprep.o zfs-uconv.o zfs-zfs_comutil.o
zfs-zfs_deleg.o zfs-zfs_fletcher.o zfs-zfs_namecheck.o zfs-zfs_prop.o
zfs-zpool_prop.o zfs-zprop_common.o -lz -lz -lz
ld: warning: unexpected dylib (/opt/local/lib/libz.dylib) on link line
ld: can't find ordinal for imported symbol _deflate from
/opt/local/lib/libz.dylib
collect2: ld returned 1 exit status
make[3]: *** [zfs] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Note that it tries to link in libz three times "... -lz -lz -lz".

Running the libtool line in the right folder "module/zfs" without the
three "-lz" works.

I have no idea why it tries to link libz three times, when zero would
be correct. Unfortunately, I have basically no clue of autoconf /
automake, so I am a bit lost here.


My system & macports config:

> I have macport installed, using this versions:
>
> MacPorts: Version: 2.1.3
>
> Relevant packages:
> autoconf @2.69_0
> autoconf213 @2.13_1
> automake @1.13.1_0
> libtool @2.4.2_3
> m4 @1.4.16_0

system is a Macbook Pro with Snow Leopard, fully updated. Xcode is
version "Xcode 3.2.6 / Component versions: DevToolsCore-1809.0;
DevToolsSupport-1806.0 / BuildVersion: 10M2518" and gcc is 4.2

lun...@lundman.net

unread,
Mar 8, 2013, 1:36:51 AM3/8/13
to maczfs...@googlegroups.com

The always inline is a 10.6 (or at least older than 10.8) issue. You can just comment out that "compiler suggestion".

inline __attribute__((always_inline)) static void dsl_scan_visitdnode(

inline /*__attribute__((always_inline))*/ static void dsl_scan_visitdnode(


jasonbelec

unread,
Aug 30, 2013, 4:37:13 PM8/30/13
to maczfs...@googlegroups.com
well I can't seem to get things to go past line 43

AM_INIT_AUTOMAKE: two- and three-arguments 
> forms are deprecated.  For more info, see: 

just jumps out right after here.
Reply all
Reply to author
Forward
0 new messages