sahlberg / libnfs

NFS client library
Other
513 stars 200 forks source link

fails to build from source #373

Closed voncloft closed 2 years ago

voncloft commented 2 years ago

Tried compiling got this:

nfs_v3.c: In function 'nfs3_chdir_continue_internal': nfs_v3.c:4986:9: error: implicit declaration of function 'nfs_mt_mutex_lock' [-Werror=implicit-function-declaration] 4986 | nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex); | ^~~~~~~~~~~~~~~~~ nfs_v3.c:4986:36: error: 'struct rpc_context' has no member named 'rpc_mutex' 4986 | nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex); | ^~ nfs_v4.c: In function 'nfs4_chdir_1_cb': nfs_v4.c:1690:9: error: implicit declaration of function 'nfs_mt_mutex_lock' [-Werror=implicit-function-declaration] 1690 | nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex); | ^~~~~~~~~~~~~~~~~ nfs_v4.c:1690:36: error: 'struct rpc_context' has no member named 'rpc_mutex' 1690 | nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex); | ^~ nfs_v3.c:4989:9: error: implicit declaration of function 'nfs_mt_mutex_unlock' [-Werror=implicit-function-declaration] 4989 | nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex); | ^~~~~~~~~~~~~~~~~~~ nfs_v3.c:4989:38: error: 'struct rpc_context' has no member named 'rpc_mutex' 4989 | nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex); | ^~ nfs_v4.c:1693:9: error: implicit declaration of function 'nfs_mt_mutex_unlock' [-Werror=implicit-function-declaration] 1693 | nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex); | ^~~~~~~~~~~~~~~~~~~ nfs_v4.c:1693:38: error: 'struct rpc_context' has no member named 'rpc_mutex' 1693 | nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex); | ^~ mv -f .deps/libnfs_la-multithreading.Tpo .deps/libnfs_la-multithreading.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-socket.lo -MD -MP -MF .deps/libnfs_la-socket.Tpo -c -o libnfs_la-socket.lotest -f 'socket.c' || echo './'socket.c cc1: all warnings being treated as errors make[2]: *** [Makefile:548: libnfs_la-nfs_v3.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... At top level: nfs_v4.c:647:1: error: 'nfs4_op_release_lockowner' defined but not used [-Werror=unused-function] 647 | nfs4_op_release_lockowner(struct nfs_context *nfs, nfs_argop4 *op, struct nfsfh *fh) | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:555: libnfs_la-nfs_v4.lo] Error 1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-libnfs-zdr.lo -MD -MP -MF .deps/libnfs_la-libnfs-zdr.Tpo -c libnfs-zdr.c -o libnfs_la-libnfs-zdr.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-init.lo -MD -MP -MF .deps/libnfs_la-init.Tpo -c init.c -o libnfs_la-init.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-pdu.lo -MD -MP -MF .deps/libnfs_la-pdu.Tpo -c pdu.c -o libnfs_la-pdu.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-socket.lo -MD -MP -MF .deps/libnfs_la-socket.Tpo -c socket.c -fPIC -DPIC -o .libs/libnfs_la-socket.o mv -f .deps/libnfs_la-libnfs-zdr.Tpo .deps/libnfs_la-libnfs-zdr.Plo mv -f .deps/libnfs_la-init.Tpo .deps/libnfs_la-init.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-socket.lo -MD -MP -MF .deps/libnfs_la-socket.Tpo -c socket.c -o libnfs_la-socket.o >/dev/null 2>&1 mv -f .deps/libnfs_la-pdu.Tpo .deps/libnfs_la-pdu.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-libnfs-sync.lo -MD -MP -MF .deps/libnfs_la-libnfs-sync.Tpo -c libnfs-sync.c -o libnfs_la-libnfs-sync.o >/dev/null 2>&1 libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/include/nfsc -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/mount -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nfs4 -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nlm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/nsm -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/portmap -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/rquota -I/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/win32 "-D_U_=__attribute__((unused))" -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -O2 -march=x86-64 -pipe -MT libnfs_la-libnfs.lo -MD -MP -MF .deps/libnfs_la-libnfs.Tpo -c libnfs.c -o libnfs_la-libnfs.o >/dev/null 2>&1 mv -f .deps/libnfs_la-socket.Tpo .deps/libnfs_la-socket.Plo mv -f .deps/libnfs_la-libnfs-sync.Tpo .deps/libnfs_la-libnfs-sync.Plo mv -f .deps/libnfs_la-libnfs.Tpo .deps/libnfs_la-libnfs.Plo make[2]: Leaving directory '/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0/lib' make[1]: *** [Makefile:467: all-recursive] Error 1 make[1]: Leaving directory '/var/cache/scratchpkg/work/libnfs/src/libnfs-libnfs-5.0.0' make: *** [Makefile:376: all] Error 2 ==> ERROR: Build failed: libnfs-5.0.0-4

fuzzard commented 2 years ago

have seen this failure building for osx as well. this was built with the following configure command

./configure --disable-shared --disable-utils --disable-examples --disable-werror

nfs_v3.c:4986:9: error: implicit declaration of function 'nfs_mt_mutex_lock' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex);
        ^
nfs_v3.c:4986:38: error: no member named 'rpc_mutex' in 'struct rpc_context'
        nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex);
                           ~~~~~~~~  ^
nfs_v3.c:4989:9: error: implicit declaration of function 'nfs_mt_mutex_unlock' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex);
        ^
nfs_v3.c:4989:9: note: did you mean 'nfs_mt_mutex_lock'?
nfs_v3.c:4986:9: note: 'nfs_mt_mutex_lock' declared here
        nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex);
        ^
nfs_v3.c:4989:40: error: no member named 'rpc_mutex' in 'struct rpc_context'
        nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex);
                             ~~~~~~~~  ^
4 errors generated.
make[3]: *** [libnfs_la-nfs_v3.lo] Error 1

Happy to provide any other context/info you need. Just let me know

sahlberg commented 2 years ago

Can you try this with the current master branch.

On Mon, Jan 31, 2022 at 10:15 AM fuzzard @.***> wrote:

have seen this failure building for osx as well. this was built with the following configure command

./configure --disable-shared --disable-utils --disable-examples --disable-werror

nfs_v3.c:4986:9: error: implicit declaration of function 'nfs_mt_mutex_lock' is invalid in C99 [-Werror,-Wimplicit-function-declaration] nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex); ^ nfs_v3.c:4986:38: error: no member named 'rpc_mutex' in 'struct rpc_context' nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex);


nfs_v3.c:4989:9: error: implicit declaration of function 'nfs_mt_mutex_unlock' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex);
        ^
nfs_v3.c:4989:9: note: did you mean 'nfs_mt_mutex_lock'?
nfs_v3.c:4986:9: note: 'nfs_mt_mutex_lock' declared here
        nfs_mt_mutex_lock(&nfs->rpc->rpc_mutex);
        ^
nfs_v3.c:4989:40: error: no member named 'rpc_mutex' in 'struct rpc_context'
        nfs_mt_mutex_unlock(&nfs->rpc->rpc_mutex);
                             ~~~~~~~~  ^
4 errors generated.
make[3]: *** [libnfs_la-nfs_v3.lo] Error 1

—
Reply to this email directly, view it on GitHub
<https://github.com/sahlberg/libnfs/issues/373#issuecomment-1025269175>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADY3ECGSHGQFDQUNM7NAPLUYXIBRANCNFSM5NEN3D7A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.

You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
fuzzard commented 2 years ago

was just told there were some patches in master by a colleague. I'll have a look. Any chance of a quick turn around on a point release if it does resolve? No rush, just a query.

sahlberg commented 2 years ago

If it solves it I can do a point release tomorrow.

fuzzard commented 2 years ago

i'll test this evening against our platforms

fuzzard commented 2 years ago

Has successfully built against platforms Kodi uses - ios/tvos/macos x86_64/android arm/aarch64/ linux x86/arm/aarch64 using autoconf make

sahlberg commented 2 years ago

closing since it successfully built