Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problem cross building NetBSD under Mac OS X Snow Leopard



On Wed 11 Nov 2009 at 21:56:07 +0000, Matthias Scheler wrote:
> On Wed, Nov 11, 2009 at 09:01:58PM +0100, Rhialto wrote:
> > Yes, that is likely the explanation. It seems that if one of the compat
> > functions is needed, the whole set is needed, otherwise the mixture
> > might not play well together.
> 
> Yes, indeed.
> 
> > Try reverting src/tools/compat/compat_defs.h back to version 1.72,
> > as mentioned in
> > http://mail-index.netbsd.org/current-users/2009/11/05/msg011042.html .
> > It worked for me.
> 
> I've reverted most of revision 1.73, tested that it fixes the build
> under Mac OS X and committed the fix. Can you please verify whether
> that fixes your build problem as well?

Now I get this:

    compile  binstall/getid.lo
/tank/vol-fourquid-1/olafs/netbsd-git/cvs/src/tools/binstall/../../usr.bin/xinstall/xinstall.c:
 In function 'main':
/tank/vol-fourquid-1/olafs/netbsd-git/cvs/src/tools/binstall/../../usr.bin/xinstall/xinstall.c:315:
 warning: passing argument 2 of '__nbcompat_gid_from_group' from incompatible 
pointer type
/tank/vol-fourquid-1/olafs/netbsd-git/cvs/src/tools/binstall/../../usr.bin/xinstall/xinstall.c:320:
 warning: passing argument 2 of '__nbcompat_uid_from_user' from incompatible 
pointer type

Argument 2 is the id_t * argument. I suspect this is because a bit below
the #defines of the compat functions, there are still the individual
function declarations:

#if !HAVE_DECL_GID_FROM_GROUP
int gid_from_group(const char *, gid_t *);
#endif

and HAVE_DECL_GID_FROM_GROUP seems unset since configure tells me

checking for group_from_gid... yes
checking for gid_from_group... no
...
checking for pwcache_userdb... no
checking for pwcache_groupdb... no
...
checking for user_from_uid... yes
checking for uid_from_user... no
...
checking whether user_from_uid is declared... yes
checking whether uid_from_user is declared... no
checking whether pwcache_userdb is declared... no
checking whether group_from_gid is declared... yes
checking whether gid_from_group is declared... no
checking whether pwcache_groupdb is declared... no

Now I notice a discrepancy: the argument used in the prototypes are
gid_t and uid_t, while in the call they're both id_t. Apparently those
are not the same.

Line 91 of src/usr.bin/xinstall/xinstall.c:

id_t    uid = -1, gid = -1;

and configure:

checking for id_t... yes

it's a bit of a swamp....

> Matthias Scheler                                  http://zhadum.org.uk/
Thanks,
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert    -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl      -- Cetero censeo "authored" delendum esse.


Home | Main Index | Thread Index | Old Index