fuse4bsd that is included in portage tree is very old. I could not compile on FreeBSD 9.1. Please update to the latest version. Reproducible: Always Steps to Reproduce: 1. cd /usr/portage/sys-fs/fuse4bsd 2. ebuild fuse4bsd-0.3.0.ebuild compile 3. Actual Results: * fuse4bsd-0.3.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * freebsd-sbin-6.2.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking fuse4bsd-0.3.0.tar.gz to /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work >>> Unpacking freebsd-sbin-6.2.tar.bz2 to /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work * Applying fuse4bsd-0.3.0-gcc4.patch ... [ ok ] * Applying fuse4bsd-0.3.0-ports.patch ... [ ok ] >>> Source unpacked in /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work >>> Compiling source in /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work/fuse4bsd-0.3.0 ... ===> fuse_module (all) Warning: Object directory not changed from original /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work/fuse4bsd-0.3.0/fuse_module @ -> /usr/src/sys-9.1_rc2 machine -> /usr/src/sys-9.1_rc2/amd64/include x86 -> /usr/src/sys-9.1_rc2/x86/include awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h x86_64-gentoo-freebsd9.1-gcc -O2 -pipe -mtune=generic -fno-strict-aliasing -O1 -Wno-error -D_KERNEL -D__FreeBSD_cc_version=900001 -DKLD_MODULE -nostdinc -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-include-dirs -fdiagnostics-show-option -c fuse.c fuse.c: In function 'fuse_vnode_init_misc': fuse.c:1837:2: error: 'struct vnode' has no member named 'v_dd' fuse.c: At top level: fuse.c:1886:1: error: conflicting types for 'fuse_mount' fuse.c:1658:20: note: previous declaration of 'fuse_mount' was here fuse.c: In function 'fuse_mount': fuse.c:1976:2: warning: passing argument 3 of 'vfs_flagopt' from incompatible pointer type [enabled by default] @/sys/mount.h:764:5: note: expected 'uint64_t *' but argument is of type 'int *' fuse.c:1978:14: warning: passing argument 3 of 'vfs_flagopt' from incompatible pointer type [enabled by default] @/sys/mount.h:764:5: note: expected 'uint64_t *' but argument is of type 'int *' fuse.c:1980:14: warning: passing argument 3 of 'vfs_flagopt' from incompatible pointer type [enabled by default] @/sys/mount.h:764:5: note: expected 'uint64_t *' but argument is of type 'int *' fuse.c:1982:14: warning: passing argument 3 of 'vfs_flagopt' from incompatible pointer type [enabled by default] @/sys/mount.h:764:5: note: expected 'uint64_t *' but argument is of type 'int *' fuse.c:1984:14: warning: passing argument 3 of 'vfs_flagopt' from incompatible pointer type [enabled by default] @/sys/mount.h:764:5: note: expected 'uint64_t *' but argument is of type 'int *' fuse.c:1988:2: warning: implicit declaration of function 'suser' [-Wimplicit-function-declaration] fuse.c:1988:2: warning: nested extern declaration of 'suser' [-Wnested-externs] fuse.c: At top level: fuse.c:2158:1: error: conflicting types for 'fuse_unmount' fuse.c:1659:22: note: previous declaration of 'fuse_unmount' was here fuse.c:2249:1: error: conflicting types for 'fuse_root' fuse.c:1660:19: note: previous declaration of 'fuse_root' was here fuse.c: In function 'fuse_root': fuse.c:2275:34: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:2275:2: error: 'vn_lock' undeclared (first use in this function) fuse.c:2275:2: note: each undeclared identifier is reported only once for each function it appears in fuse.c:2279:3: error: too many arguments to function 'VOP_GETATTR' ./vnode_if.h:298:21: note: declared here fuse.c: At top level: fuse.c:2290:1: error: conflicting types for 'fuse_statfs' fuse.c:1661:21: note: previous declaration of 'fuse_statfs' was here fuse.c: In function 'fuse_vget_i': fuse.c:2423:39: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:2423:3: error: 'vn_lock' undeclared (first use in this function) fuse.c: In function 'fuse_getattr': fuse.c:2794:24: error: 'struct vop_getattr_args' has no member named 'a_td' fuse.c: In function 'fuse_access': fuse.c:2845:29: error: 'struct vop_access_args' has no member named 'a_mode' fuse.c: In function 'fuse_access_i': fuse.c:2909:4: error: too many arguments to function 'VOP_GETATTR' ./vnode_if.h:298:21: note: declared here fuse.c:2926:10: warning: implicit declaration of function 'suser_cred' [-Wimplicit-function-declaration] fuse.c:2926:10: warning: nested extern declaration of 'suser_cred' [-Wnested-externs] fuse.c:2926:33: error: 'SUSER_ALLOWJAIL' undeclared (first use in this function) fuse.c: In function 'fuse_lookup': fuse.c:3076:3: error: 'struct vnode' has no member named 'v_dd' fuse.c:3173:5: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c:3244:5: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c:3276:5: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c:3284:4: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c:3285:42: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:3285:10: error: 'vn_lock' undeclared (first use in this function) fuse.c:3287:44: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:3298:5: error: 'struct vnode' has no member named 'v_dd' fuse.c: In function 'create_filehandle': fuse.c:3527:5: error: 'struct fuse_open_in' has no member named 'mode' fuse.c:3574:2: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c: In function 'fuse_open': fuse.c:3785:16: error: 'struct vop_open_args' has no member named 'a_fdidx' fuse.c:3843:3: warning: passing argument 3 of 'vinvalbuf' makes integer from pointer without a cast [enabled by default] @/sys/vnode.h:639:5: note: expected 'int' but argument is of type 'struct thread *' fuse.c:3843:3: error: too many arguments to function 'vinvalbuf' @/sys/vnode.h:639:5: note: declared here fuse.c: In function 'fuse_close_f': fuse.c:3953:41: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:3953:2: error: 'vn_lock' undeclared (first use in this function) fuse.c:3946:26: warning: variable 'fvdat' set but not used [-Wunused-but-set-variable] fuse.c: In function 'fuse_io_file': fuse.c:4079:41: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:4079:2: error: 'vn_lock' undeclared (first use in this function) fuse.c:4091:3: error: too many arguments to function 'VOP_GETATTR' ./vnode_if.h:298:21: note: declared here fuse.c:4106:2: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c: In function 'fuse_read_biobackend': fuse.c:4156:2: error: too many arguments to function 'VOP_GETATTR' ./vnode_if.h:298:21: note: declared here fuse.c: In function 'fuse_create': fuse.c:4690:61: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:4690:13: error: 'vn_lock' undeclared (first use in this function) fuse.c: In function 'fuse_rename': fuse.c:4924:48: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:4924:8: error: 'vn_lock' undeclared (first use in this function) fuse.c:4935:4: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c:4952:2: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c:4976:3: error: 'struct vnode' has no member named 'v_dd' fuse.c:5000:45: error: macro "vn_lock" passed 3 arguments, but takes just 2 fuse.c:5001:5: error: 'struct vnode' has no member named 'v_dd' fuse.c:5004:5: error: too many arguments to function 'VOP_UNLOCK' ./vnode_if.h:873:21: note: declared here fuse.c: In function 'fuse_setattr': fuse.c:5081:24: error: 'struct vop_setattr_args' has no member named 'a_td' fuse.c: In function 'fuse_write_biobackend': fuse.c:5602:4: warning: implicit declaration of function 'vfs_bio_set_validclean' [-Wimplicit-function-declaration] fuse.c:5602:4: warning: nested extern declaration of 'vfs_bio_set_validclean' [-Wnested-externs] fuse.c: In function 'fuse_bufstrategy': fuse.c:5882:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable] fuse.c: In function 'fusedev_clone': fuse.c:5959:3: warning: implicit declaration of function 'unit2minor' [-Wimplicit-function-declaration] fuse.c:5959:3: warning: nested extern declaration of 'unit2minor' [-Wnested-externs] fuse.c: At top level: fuse.c:1658:20: warning: 'fuse_mount' used but never defined [enabled by default] fuse.c:1659:22: warning: 'fuse_unmount' used but never defined [enabled by default] fuse.c:1660:19: warning: 'fuse_root' used but never defined [enabled by default] fuse.c:1661:21: warning: 'fuse_statfs' used but never defined [enabled by default] fuse.c:1886:1: warning: 'fuse_mount' defined but not used [-Wunused-function] fuse.c:2158:1: warning: 'fuse_unmount' defined but not used [-Wunused-function] fuse.c:2249:1: warning: 'fuse_root' defined but not used [-Wunused-function] fuse.c:2290:1: warning: 'fuse_statfs' defined but not used [-Wunused-function] fuse.c: In function 'fuse_access': fuse.c:2846:1: warning: control reaches end of non-void function [-Wreturn-type] *** [fuse.o] Error code 1 Stop in /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work/fuse4bsd-0.3.0/fuse_module. *** [all] Error code 1 Stop in /var/tmp/portage/sys-fs/fuse4bsd-0.3.0/work/fuse4bsd-0.3.0. FYI, FUSE support has been added to FreeBSD's head. Because of plan of MFC, this package should become unnecessary FreeBSD 9.2 or 10.0. http://lists.freebsd.org/pipermail/svn-src-head/2012-October/041064.html
Created attachment 329196 [details, diff] files/fuse4bsd-0.3.9_pre1-ports.patch Taken from FreeBSD ports all patch-* files.
Created attachment 329198 [details, diff] files/fuse4bsd-0.3.9_pre1-fbsd91.patch Taken from FreeBSD ports extra-patch-fuse_module__fuse_vnops.c
Created attachment 329200 [details, diff] sample patch for fuse4bsd-0.3.0.ebuild new ebuild filename is fuse4bsd-0.3.9_pre1.ebuild I confirmed compile on FreeBSD 9.1_rc3 amd64. And I confirmed the that the module can be loaded. # kldload fuse # dmesg | tail -n1 fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.19 # mount_fusefs mount_fusefs: missing special and/or mountpoint I have not checked whether it can mount....
Created attachment 331848 [details, diff] ebuild patch I've reviewed the patch >--- fuse4bsd-0.3.0.ebuild 2007-03-02 21:44:36.000000000 +0900 >+++ fuse4bsd-0.3.9_pre1.ebuild 2012-11-11 21:18:33.000000000 +0900 >@@ -8,15 +8,16 @@ > HOMEPAGE="http://fuse4bsd.creo.hu/" > # -sbin is needed for getmntopts.c, hardcoding 6.2 is nasty but can't think of > # any better solution right now >-SRC_URI="http://fuse4bsd.creo.hu/downloads/${P}.tar.gz >- mirror://gentoo/freebsd-sbin-6.2.tar.bz2" >+SRC_URI="http://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/fuse4bsd/498acaef33b0.tar.gz >+ mirror://gentoo/freebsd-sbin-9.1_rc3.tar.bz2" >+S="${WORKDIR}/fuse4bsd-498acaef33b0" > > LICENSE="BSD" > SLOT="0" > KEYWORDS="~x86-fbsd" > IUSE="" > >-DEPEND=">=sys-freebsd/freebsd-sources-6.2 >+DEPEND=">=sys-freebsd/freebsd-sources-9.1_rc3 > virtual/pmake" > RDEPEND="sys-fs/fuse" > I was able to build with mirror://gentoo/freebsd-sbin-9.0.tar.bz2 and DEPEND=">=sys-freebsd/freebsd-sources-9.0" on G/FreeBSD-9.0. Since 9.1-* is still RC and even after when it is released, the current DEPEND seems to be too strict. If there are no problem with using -9.0, I'd prefer using it instead. >@@ -25,8 +26,8 @@ > cd "${S}" > cp /usr/include/fuse/fuse_kernel.h fuse_module/ > cp "${WORKDIR}/sbin/mount/getmntopts.c" mount_fusefs/ >- epatch "${FILESDIR}"/${P}-gcc4.patch > epatch "${FILESDIR}"/${P}-ports.patch >+ epatch "${FILESDIR}"/${P}-fbsd91.patch > } fine. LDFLAGS="$(raw-ldflags)" wors on fuse_module (it calls ld), but not on mount_fusefs (it calls ${CC}). I've split the make process to deal with it. src_compile() { tc-export CC + cd "${S}"/fuse_module $(get_bmake) \ KMODDIR=/boot/modules BINDIR=/usr/sbin MANDIR=/usr/share/man/man \ MOUNT="${WORKDIR}/sbin/mount" LDFLAGS="$(raw-ldflags)" \ || die "$(get_bmake) failed" + + cd "${S}"/mount_fusefs + $(get_bmake) \ + KMODDIR=/boot/modules BINDIR=/usr/sbin MANDIR=/usr/share/man/man \ + MOUNT="${WORKDIR}/sbin/mount" \ + || die "$(get_bmake) failed" You might notice this QA, which should be fixed. * QA Notice: file does not exist: * * dodoc: doc/./plaintext_out/* does not exist * dodoc: doc/./html_chunked_out/* does not exist We need following lines to build doc files, but it now require ruby-deplate which does not exist in the portage tree. I'll fill a bug for adding it and make it a blocker for this bug. + if use doc; then + cd "${S}"/doc + $(get_bamek) all || die "$(get_bmake) failed" + fi } my complete patch attached.
I've bumped the package.