Opened 14 years ago

Closed 14 years ago

#511 closed defect (fixed)

Omega fails compile on MacOS X - different getgrouplist signature

Reported by: Richard Boulton Owned by: Olly Betts
Priority: normal Milestone: 1.2.4
Component: Omega Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Mac OS X

Description

The macos buildbot is failing to compile omega's unixperm.cc module, complaining that:

g++ -DHAVE_CONFIG_H -I. -I./common -DCONFIGFILE_SYSTEM=\"/usr/local/etc/omega.conf\" -DPKGLIBBINDIR=\"/usr/local/lib/xapian-omega/bin\"  -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Wundef -Wshadow -Wstrict-null-sentinel -Wstrict-overflow=1 -fvisibility=hidden -Werror -I/Users/buildbot/slave/xapian_head_update_macos/build/xapian-core/include -g -O2 -MT unixperm.o -MD -MP -MF .deps/unixperm.Tpo -c -o unixperm.o unixperm.cc
unixperm.cc: In function 'void apply_unix_permissions(Xapian::Query&, const char*)':
unixperm.cc:56: error: invalid conversion from 'gid_t*' to 'int*'
unixperm.cc:56: error:   initializing argument 3 of 'int getgrouplist(const char*, int, int*, int*)'
make[3]: *** [unixperm.o] Error 1

The signature of getgrouplist differs between OSX and Linux: OSX expects

int getgrouplist(const char *name, int basegid, int *groups, int *ngroups);

See http://www.unix.com/man-page/osx/3/getgrouplist/

I suspect we need a configure test along the lines of the one here: http://code.google.com/p/shellinabox/source/diff?spec=svn233&r=233&format=side&path=/trunk/configure.ac&old_path=/trunk/configure.ac&old=232

Change History (1)

comment:1 by Olly Betts, 14 years ago

Milestone: 1.2.4
Resolution: fixed
Status: newclosed

r15108 should fix this, and Richard confirms that at least the affected file has compiled successfully now.

Note: See TracTickets for help on using tickets.