Bug 6945 - Failed to build openchange on OpenSolaris
Failed to build openchange on OpenSolaris
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Build
unspecified
Sparc Solaris
: P3 normal
: ---
Assigned To: Jelmer Vernooij
samba4-qa@samba.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-01 03:13 UTC by Brian Lu (mail address dead)
Modified: 2013-02-18 13:29 UTC (History)
0 users

See Also:


Attachments
patch (722 bytes, patch)
2009-12-01 03:14 UTC, Brian Lu (mail address dead)
bjacke: review-
Details
patch based on comments (824 bytes, patch)
2009-12-14 00:41 UTC, Brian Lu (mail address dead)
brian.lu: review? (metze)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Lu (mail address dead) 2009-12-01 03:13:21 UTC
When compiling latest openchange trunk code (r1565), The build failed.
The error report says that "comparison_fn_t" is not defined in ndr.h

On solaris, this type is not defined.
Comment 1 Brian Lu (mail address dead) 2009-12-01 03:14:18 UTC
Created attachment 5029 [details]
patch
Comment 2 Björn Jacke 2009-12-01 04:13:28 UTC
an "ifdef __SOMEOPERATINGSYSTEM" should only be used in rare cases. A missing typedef is nothing os specific. In this case a configure test would be better and doing the typedef depending on the result of the configure test.
Comment 3 Brian Lu (mail address dead) 2009-12-01 04:22:20 UTC
(In reply to comment #2)
> an "ifdef __SOMEOPERATINGSYSTEM" should only be used in rare cases. A missing
> typedef is nothing os specific. In this case a configure test would be better
> and doing the typedef depending on the result of the configure test.
> 
Yes, I agree. But the problem occurs in openchange instead of samba4 itself.

i.e. the ndr.h is installed to the solaris but it contains  a type comparison_fn_t
which is not defined by the system. configure test has little help on this situation.  Do you have a better solution?
Comment 4 Stefan Metzmacher 2009-12-01 04:44:51 UTC
We can avoid comparison_fn_t completely.

enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list,
                const void *key, uint32_t *v,
                int (*_cmp_fn)(const void *, const void *),
                bool _remove_tok);

Comment 5 Brian Lu (mail address dead) 2009-12-01 23:04:24 UTC
(In reply to comment #4)
> We can avoid comparison_fn_t completely.
> 
> enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list **list,
>                 const void *key, uint32_t *v,
>                 int (*_cmp_fn)(const void *, const void *),
>                 bool _remove_tok);
> 
Yes, I tested it. It works.  Can we make such change in the trunk code?  Thanks
Comment 6 Brian Lu (mail address dead) 2009-12-14 00:41:14 UTC
Created attachment 5086 [details]
patch based on comments
Comment 7 Matthias Dieter Wallnöfer 2009-12-14 08:23:39 UTC
Thanks for your work, Brian!
Comment 8 Stefan Metzmacher 2009-12-15 04:15:32 UTC
Thanks! Fixed by a3b7e84a65e3ddc94edc36fd1b4641849b9ee0be in master