phdeniel/nfs-ganesha — Issue #44: Cannot compile 7fcf2a517d without enabling NLM
Author: mmakc
Created: 2012-02-10 00:35:16+00:00
State: open

$ ./configure --with-fsal=XFS
....
$ make
.....
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../incl
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -D_REENTRANT -Wal
In file included from ../include/nfs_core.h:53,
from cache_inode_rdwr.c:54:
../include/sal_data.h:351: error: expected ')' before '*' token
make[1]: *** [cache_inode_rdwr.lo] Error 1
make[1]: Leaving directory `/home/makc/src/nfs/ganesha/src/Cache_inode'
make: *** [all-recursive] Error 1
$

Moving definition typedef block_data_to_fsal_context_t down a bit

diff --git a/src/include/sal_data.h b/src/include/sal_data.h
index f871fc2..d0f25ce 100644
--- a/src/include/sal_data.h
+++ b/src/include/sal_data.h
@@ -348,9 +348,6 @@ typedef state_status_t (*granted_callback_t)(cache_entry_t
cache_inode_client_t * pclient,
state_status_t * pstatus);

-typedef bool_t (*block_data_to_fsal_context_t)(state_block_data_t * block_data,
- fsal_op_context_t * fsal_contex
-
#ifdef _USE_BLOCKING_LOCKS
typedef struct state_nlm_block_data_t
{
@@ -397,6 +394,9 @@ struct state_block_data_t
typedef void state_block_data_t;
#endif

+typedef bool_t (*block_data_to_fsal_context_t)(state_block_data_t * block_data,
+ fsal_op_context_t * fsal_contex
+
struct state_lock_entry_t
{
struct glist_head sle_list;

gets me a bit further but still breaks:

make[1]: Entering directory `/home/makc/src/nfs/ganesha/src/SAL'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -D_REENTRANT -Wall -Wimplicit -Wformat -Wmissing-braces -Wno-pointer-sign -I/usr/include/tirpc -MT state_lock.lo -MD -MP -MF .deps/state_lock.Tpo -c -o state_lock.lo state_lock.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -D_REENTRANT -Wall -Wimplicit -Wformat -Wmissing-braces -Wno-pointer-sign -I/usr/include/tirpc -MT state_lock.lo -MD -MP -MF .deps/state_lock.Tpo -c state_lock.c -fPIC -DPIC -o .libs/state_lock.o
state_lock.c: In function 'state_lock_init':
state_lock.c:144: warning: implicit declaration of function 'state_async_init'
state_lock.c: In function 'LogBlockedList':
state_lock.c:337: error: request for member 'sbd_list' in something not a structure or union
state_lock.c:337: warning: type defaults to 'int' in declaration of '__mptr'
state_lock.c:337: warning: initialization from incompatible pointer type
state_lock.c:337: error: request for member 'sbd_list' in something not a structure or union
state_lock.c:338: warning: dereferencing 'void *' pointer
state_lock.c:338: error: request for member 'sbd_lock_entry' in something not a structure or union
state_lock.c: In function 'state_lock':
state_lock.c:2236: warning: dereferencing 'void *' pointer
state_lock.c:2236: error: request for member 'sbd_lock_entry' in something not a structure or union
state_lock.c:2245: error: 'blocked_locks_mutex' undeclared (first use in this function)
state_lock.c:2245: error: (Each undeclared identifier is reported only once
state_lock.c:2245: error: for each function it appears in.)
state_lock.c:2247: error: 'state_blocked_locks' undeclared (first use in this function)
state_lock.c:2247: warning: dereferencing 'void *' pointer
state_lock.c:2247: error: request for member 'sbd_list' in something not a structure or union
make[1]: *** [state_lock.lo] Error 1
make[1]: Leaving directory `/home/makc/src/nfs/ganesha/src/SAL'
make: *** [all-recursive] Error 1