Open krytarowski opened 7 years ago
I can't reproduce this. What version of NetBSD is it?
Back in 2017 it was probably pre-NetBSD-8.
NetBSD/src/lib/librefuse/fuse_lowlevel.h int fuse_parse_cmdline(struct fuse_args *args, struct fuse_cmdline_opts *opts);
fuseprivate.c fuse_parse_cmdline(&args, NULL, NULL, NULL);
Great, thanks! I'll look into it.
On NetBSD 8.1, I have fuse-2.9.3 installed with pkgin, and everything Just Works™️. The header you mentioned (which lives in /usr/include/fuse_lowlevel.h) doesn't include fuse_lowlevel_new
, so it's odd that configure found it. It's really barely a stub, I don't know if any real lowlevel FUSE FS can compile against that.
Any more clues to reproducing this?
I checked squashfuse-0.1.103 and the problem is resolved in this version.
Opps. It still builds but still breaks in runtime.
--- squashfuse_extract-extract.o ---
extract.c: In function 'sqfs_stat':
extract.c:51:17: warning: implicit declaration of function 'sqfs_makedev'; did you mean 'sqfs_mode'? [-Wimplicit-function-declaration]
st->st_rdev = sqfs_makedev(inode->xtra.dev.major,
^~~~~~~~~~~~
sqfs_mode
--- libsquashfuse_la-table.lo ---
CC libsquashfuse_la-table.lo
--- libfuseprivate_la-fuseprivate.lo ---
fuseprivate.c: In function 'sqfs_usage':
fuseprivate.c:105:3: warning: implicit declaration of function 'fuse_parse_cmdline'; did you mean 'fuse_daemonize'? [-Wimplicit-function-declaration]
fuse_parse_cmdline(&args, NULL, NULL, NULL);
^~~~~~~~~~~~~~~~~~
fuse_daemonize
--- libsquashfuse_la-dir.lo ---
(No debugging symbols found in squashfuse)
(gdb) r
Starting program: /usr/pkg/bin/squashfuse
squashfuse 0.1.103 (c) 2012 Dave Vasilevsky
Usage: /usr/pkg/bin/squashfuse [options] ARCHIVE MOUNTPOINT
Program received signal SIGSEGV, Segmentation fault.
fuse_parse_cmdline (args=0x7f7fffffe4f0, opts=0x0) at /usr/src/lib/librefuse/refuse_lowlevel.c:125
125 memset(opts, 0, sizeof(*opts));
(gdb) bt
#0 fuse_parse_cmdline (args=0x7f7fffffe4f0, opts=0x0) at /usr/src/lib/librefuse/refuse_lowlevel.c:125
#1 0x00007f7ff7400c16 in sqfs_usage () from /usr/pkg/lib/libfuseprivate.so.0
#2 0x0000000000401c4c in ?? ()
#3 0x000000000040143b in ?? ()
#4 0x00007f7ff7c0c178 in ?? () from /usr/libexec/ld.elf_so
#5 0x0000000000000001 in ?? ()
#6 0x00007f7fffffed00 in ?? ()
#7 0x0000000000000000 in ?? ()
NetBSD chieftec 9.99.46 NetBSD 9.99.46 (GENERIC) #2: Wed Feb 12 11:41:14 CET 2020 root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
Oooh nice, more data! Can you send the config.log
please?
The bug is obvious that there is mismatch in function prototypes.
If you already have 8.1, you can try to debug it yourself.
Like I said, I have 8.1 and I can't reproduce that. I see these results using squashfuse master:
fuse
installed via pkgin, the configure script detects that. The fuse package includes a header with the expected fuse_parse_cmdline
. Everything builds and runs fine with git clean -fxd :/ && ./autogen.sh && ./configure && make && mkdir mnt && sudo ./squashfuse_ll ../test.squashfs mnt
fuse
installed via pkgin, no FUSE library is detected. There's no libfuse.so
anywhere on my filesystem.So clearly there's something else going on in your case. Did you provide arguments to configure
? Did you get libfuse from somewhere else? Is there some installation set that contains libfuse?
I have packaged it as fuse-squashfuse
in pkgsrc-wip.
https://github.com/NetBSD/pkgsrc-wip/tree/master/fuse-squashfuse
I got a similar error on Ubuntu 20 following these instructions https://engineering.fb.com/2018/07/13/data-infrastructure/xars-a-more-efficient-open-source-system-for-self-contained-executables/
warning: implicit declaration of function ‘sqfs_makedev’; did you mean ‘sqfs_mode’? [-Wimplicit-function-declaration]
Oddly enough, running ./autogen.sh
before ./configure
fixed it.
I'm getting crashes with squashfuse on NetBSD. I narrowed it down to prototype mismatch between fuse_parse_cmdline() in this package and in system.
During build:
Backtrace
Browsing libfuse examples they confirm that the function prototype is different out there - with two arguments.