kiss-community / community

Officially unofficial KISS community repository, mirror of https://codeberg.org/kiss-community/community

Home Page:https://kisscommunity.org

Repository from Github https://github.comkiss-community/communityRepository from Github https://github.comkiss-community/community

ntfs-3g fails to build when fuse is installed

noocsharp opened this issue · comments

It may be because I have fuse installed, and it tries to pick up the system dependency even though the headers are in a different place than it expects.

Tried building fuse (from community) then rebuilding ntfs-3g. Then tried removing both, building fuse, then building ntfs-3g. Can't reproduce any errors/conflicts. ntfs-3g doesn't even gain a dynamic dependency on it.

I'm afraid you'll have to dispense with those precious and valuable build logs 🔫

hmm, seems to fail regardless of whether community/fuse is installed or not: https://nihaljere.xyz/files/ntfs-3g-2021-12-31-13:17-10381

Odd that this is the only error...

ntfs-3g.c:30:10: fatal error: fuse.h: No such file or directory
   30 | #include <fuse.h>
      |          ^~~~~~~~
compilation terminated.
make[2]: *** [Makefile:650: ntfs_3g-ntfs-3g.o] Error 1
make[2]: Leaving directory '/home/nihal/.cache/kiss/proc/10381/build/ntfs-3g/src'
make[1]: *** [Makefile:504: all-recursive] Error 1
make[1]: Leaving directory '/home/nihal/.cache/kiss/proc/10381/build/ntfs-3g'
make: *** [Makefile:415: all] Error 2

What happens if you add --with-fuse=internal to the configure step?

As a side-note, ntfs-3g has a make dep on linux-headers.

Yeah, that fixes it. I changed it to do that in my personal repo.

That's strange. The default is to use the internal fuse.

Here's a diff of a (sorted) list of what configure does for me versus you:

--- ntfs-3g-2021-12-31-17:02-11033	2021-12-31 17:03:23.878614717 -0500
+++ ntfs-3g-2021-12-31-13_17-10381	2021-12-31 17:01:54.925603663 -0500
@@ -1,4 +1,4 @@
-checking Solaris OS... no
+./configure: 13360: test: x: unexpected operator
 checking Windows OS... no
 checking build system type... x86_64-pc-linux-musl
 checking byteswap.h presence... yes
@@ -32,6 +32,7 @@
 checking for an ANSI C-conforming const... yes
 checking for archiver @FILE support... @
 checking for atexit... yes
+checking for awk... awk
 checking for basename... yes
 checking for byteswap.h... yes
 checking for cc option to accept ISO C89... (cached) none needed
@@ -41,7 +42,7 @@
 checking for ctype.h... yes
 checking for daemon... yes
 checking for dlfcn.h... yes
-checking for dlltool... dlltool
+checking for dlltool... no
 checking for dlopen in -lc... yes
 checking for dup2... yes
 checking for egrep... /usr/bin/grep -E
@@ -87,7 +88,7 @@
 checking for mntent.h... yes
 checking for mt... no
 checking for mv... /usr/bin/mv
-checking for nawk... nawk
+checking for nawk... no
 checking for objdir... .libs
 checking for objdump... objdump
 checking for off_t... yes
@@ -94,5 +95,4 @@
-checking for pkg-config... no
-checking for pthread_create in -lpthread... yes
+checking for pkg-config... /usr/bin/pkg-config
 checking for pwd.h... yes
 checking for random... yes
 checking for ranlib... ranlib
@@ -159,7 +159,9 @@
 checking for utime.h... (cached) yes
 checking for utime.h... yes
 checking for utimensat... yes
-checking for uuid/uuid.h... no
+checking for uuid/uuid.h... yes
+checking for uuid_generate in -luuid... yes
+checking for uuid_generate... no
 checking for vprintf... yes
 checking for wchar.h... yes
 checking for windows.h... no
@@ -166,5 +168,4 @@
 checking for working memcmp... yes
-checking fuse compatibility... internal
 checking getopt.h presence... yes
 checking getopt.h usability... yes
 checking hd.h presence... no
@@ -171,6 +172,6 @@
 checking hd.h usability... no
 checking host system type... x86_64-pc-linux-musl
-checking how to associate runtime and link libraries... print -r --
+checking how to associate runtime and link libraries... printf %s\n
 checking how to convert x86_64-pc-linux-musl file names to toolchain format... func_convert_file_noop
 checking how to convert x86_64-pc-linux-musl file names to x86_64-pc-linux-musl format... func_convert_file_noop
 checking how to hardcode library paths into programs... immediate
@@ -177,4 +178,4 @@
-checking how to print strings... print -r
+checking how to print strings... printf
 checking how to recognize dependent libraries... pass_all
 checking how to run the C preprocessor... cc -E
 checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
@@ -183,7 +184,7 @@
 checking if cc static flag -static works... yes
 checking if cc supports -c -o file.o... (cached) yes
 checking if cc supports -c -o file.o... yes
-checking if cc supports -fno-rtti -fno-exceptions... yes
+checking if cc supports -fno-rtti -fno-exceptions... no
 checking if libtool supports shared libraries... yes
 checking if the linker (/usr/bin/ld) is GNU ld... yes
 checking libgen.h presence... yes
@@ -210,6 +211,7 @@
 checking minix/config.h usability... no
 checking mntent.h presence... yes
 checking mntent.h usability... yes
+checking pkg-config is at least version 0.9.0... yes
 checking pwd.h presence... yes
 checking pwd.h usability... yes
 checking regex.h presence... yes
@@ -250,8 +252,8 @@
 checking time.h usability... yes
 checking utime.h presence... yes
 checking utime.h usability... yes
-checking uuid/uuid.h presence... no
-checking uuid/uuid.h usability... no
+checking uuid/uuid.h presence... yes
+checking uuid/uuid.h usability... yes
 checking wchar.h presence... yes
 checking wchar.h usability... yes
 checking whether -lc should be explicitly linked in... no
@@ -272,7 +274,7 @@
 checking whether stripping libraries is possible... yes
 checking whether sys/types.h defines makedev... no
 checking whether the C compiler works... yes
-checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
+checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
 checking whether to build shared libraries... yes
 checking whether to build static libraries... yes
 checking whether to enable maintainer-specific portions of Makefiles... no
@@ -317,6 +319,5 @@
 config.status: creating src/ntfs-3g.probe.8
 config.status: executing depfiles commands
 config.status: executing libtool commands
-configure: WARNING: ntfsprogs DCE compliant UUID generation code requires the uuid library.
 configure: WARNING: ntfsprogs Windows compliant geometry code requires the hd library.
 configure: creating ./config.status

Notice that yours is lacking a check to use internal fuse.
Try uninstalling pkgconf...

Could it be because you have util-linux installed? 🤔

When I build with util-linux I encounter no errors either. Infact ntfs-3g links with libuuid to provide UUID support.

I figured it out, from this line:

+./configure: 13360: test: x: unexpected operator

Line 13360 has the test for checking which fuse to use:

elif test "x${with_fuse}" == "x"; then

My /bin/sh is dash which apparently doesn't implement ==. I rebuilt with oksh as my /bin/sh and it builds fine.

Apologies for misdiagnosing the issue.

I looked at the POSIX sh spec and == doesn't seem to be defined... does this mean that autoconf doesn't generate POSIX compliant configure scripts?

Indeed it would.

I remember when I first learnt about this little POSIX sh quirk. Guess it's a memento of the times when C was not the one language where everyone got their base syntax from.