Samba build failures on MacOS X

Steve French smfrench at gmail.com
Sun Jun 29 17:10:49 MDT 2014


FYI - Noticed current Samba master doesn't build on MacOS X

./configure --without-acl-support
make

Ended up with the readline compile failure:

[1978/3885] Compiling libcli/smbreadline/smbreadline.c

../libcli/smbreadline/smbreadline.c:139:38: error: use of undeclared
identifier 'CPPFunction'

                rl_attempted_completion_function = RL_COMPLETION_CAST
completion_fn;

                                                   ^

../lib/replace/system/readline.h:47:31: note: expanded from macro
'RL_COMPLETION_CAST'

#  define RL_COMPLETION_CAST (CPPFunction *)

                              ^

../libcli/smbreadline/smbreadline.c:139:38: error: expected expression

../lib/replace/system/readline.h:47:44: note: expanded from macro
'RL_COMPLETION_CAST'

#  define RL_COMPLETION_CAST (CPPFunction *)

That is easy enough to workaround by forcing the cast to rl_completion_func_t in

rl_attempted_completion_function = (rl_completion_func_t *)   completion_fn;

but the various problems with socket header definitions look harder to
work around

[1986/3885] Compiling lib/socket_wrapper/socket_wrapper.c

../lib/socket_wrapper/socket_wrapper.c:3172:8: error: use of
undeclared identifier 'SO_PROTOCOL'

                case SO_PROTOCOL:

                     ^

../lib/socket_wrapper/socket_wrapper.c:3336:2: error: NO_CMSG_ALIGN

#error NO_CMSG_ALIGN

 ^

../lib/socket_wrapper/socket_wrapper.c:3537:31: warning: implicit
declaration of function 'CMSG_ALIGN' is invalid in C99
[-Wimplicit-function-declaration]

                CMSG_SPACE(cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)));

                                            ^

/usr/include/sys/socket.h:517:85: note: expanded from macro 'CMSG_SPACE'

#define CMSG_SPACE(l)           (__DARWIN_ALIGN32(sizeof(struct
cmsghdr)) + __DARWIN_ALIGN32(l))


                      ^

/usr/include/i386/_param.h:43:86: note: expanded from macro '__DARWIN_ALIGN32'

#define       __DARWIN_ALIGN32(p)       ((__darwin_size_t)((char
*)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~
__DARWIN_ALIGNBYTES32)













-- 
Thanks,

Steve


More information about the samba-technical mailing list