Re: Errors of compiling NM-0.8.2-beta1



On Fri, 2010-10-08 at 17:21 +0800, cee1 wrote:
> Hi all,
> 
> 
> I've checked out a source of 0.8.2-beta1, try to compile it, and
> encounter several problems. They can be classified as follows:
>       * Related to build system:
>              1. To use "isblank" (src/nm-policy-hosts.c,
>                 src/nm-policy.c), needs to enable C99. (see "man
>                 blank")
>              2. To use
>                 "isascii" (libnm-util/nm-setting-wireless-security.c, ...), needs to define _BSD_SOURCE. (see "man isascii")
>              3. To use "kill" (src/nm-device.c, ...), needs to
>                 define _POSIX_SOURCE. (see "man 2 kill")
>         So (one way) to build 0.8.2-beta1 successfully, I
>         need(before ./configure):
>               * export CFLAGS='-std=c99'
>               * export CPPFLAGS='-D_BSD_SOURCE -D_POSIX_SOURCE'

I believe all these should get covered by _GNU_SOURCE which
in /usr/include/features.h defines _POSIX_SOURCE, _BSD_SOURCE, and
_ISOC99_SOURCE.  At least if you're using gcc...  but what I found out
was that we weren't including <config.h> in files that used kill(),
which means those files wouldn't have _GNU_SOURCE defined.  I've pushed
a patch to do so.  Does that fix these 3 issues for you?

>       * Related to source code:
>              1. To use "strcasecmp" (libnm-util/crypto.c), should
>                 include <strings.h>. (see "man strcasecmp")
>              2. To use "struct
>                 ether_addr" (libnm-util/nm-setting-wireless.c), should
>                 include <net/ethernet.h>. (see "man ether_aton_r")
>         Apply "fix-headers.patch" in attachment will fix missed
>         headers.

Applied and pushed to  master and NM_0_8, thanks!

Dan

>       * Related to source code but has been fixed in master:
>         In src/dhcp-manager/nm-dhcp-dhclient.c, log_domain may have an
>         undefined value.
>       * Related to libnl:
>         If the compiler tells you "/usr/include/netlink/object.h:58:
>         error: inline function ‘nl_object_priv’ declared but never
>         defined", then need to replace "extern inline void *
>          nl_object_priv(struct nl_object *obj);" in object.h with the
>         following (according to newer version of libnl):
>                 static inline void *            nl_object_priv(struct
>                 nl_object *obj)
>                 {
>                         return obj;
>                 }
> 
> 
> -- 
> Regards,
> 
> - cee1
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]