- edited description
Compilation error on Centos 6.5
Hello I have tried to compile xllmnrd under centos 6.5 x86_64 with following results:
checking linux/rtnetlink.h usability... no
checking linux/rtnetlink.h presence... yes
configure: WARNING: linux/rtnetlink.h: present but cannot be compiled
configure: WARNING: linux/rtnetlink.h: check for missing prerequisite headers?
configure: WARNING: linux/rtnetlink.h: see the Autoconf documentation
configure: WARNING: linux/rtnetlink.h: section "Present But Cannot Be Compiled"
configure: WARNING: linux/rtnetlink.h: proceeding with the compiler's result
configure: WARNING: ## ----------------------------------------------------------- ##
configure: WARNING: ## Report this to https://bitbucket.org/kazssym/xllmnrd/issues ##
configure: WARNING: ## ----------------------------------------------------------- ##
checking for linux/rtnetlink.h... no
after that I get compilation error:
...
ifaddr.c: In function ‘open_rtnetlink’:
ifaddr.c:86: error: ‘NETLINK_ROUTE’ undeclared (first use in this function)
ifaddr.c:86: error: (Each undeclared identifier is reported only once
ifaddr.c:86: error: for each function it appears in.)
ifaddr.c:89: error: variable ‘addr’ has initializer but incomplete type
ifaddr.c:90: error: unknown field ‘nl_family’ specified in initializer
ifaddr.c:90: warning: excess elements in struct initializer
ifaddr.c:90: warning: (near initialization for ‘addr’)
ifaddr.c:91: error: unknown field ‘nl_groups’ specified in initializer
ifaddr.c:91: error: ‘RTMGRP_IPV4_IFADDR’ undeclared (first use in this function)
ifaddr.c:91: error: ‘RTMGRP_IPV6_IFADDR’ undeclared (first use in this function)
ifaddr.c:91: warning: excess elements in struct initializer
ifaddr.c:91: warning: (near initialization for ‘addr’)
ifaddr.c:89: error: storage size of ‘addr’ isn’t known
ifaddr.c: At top level:
ifaddr.c:198: warning: ‘struct nlmsghdr’ declared inside parameter list
ifaddr.c:198: warning: its scope is only this definition or declaration, which is probably not what you want
ifaddr.c:204: warning: ‘struct nlmsghdr’ declared inside parameter list
ifaddr.c:214: warning: ‘struct rtattr’ declared inside parameter list
ifaddr.c:224: warning: ‘struct rtattr’ declared inside parameter list
ifaddr.c: In function ‘ifaddr_run’:
ifaddr.c:594: warning: passing argument 1 of ‘ifaddr_decode_nlmsg’ from incompatible pointer type
ifaddr.c:198: note: expected ‘const struct nlmsghdr *’ but argument is of type ‘const struct nlmsghdr *’
ifaddr.c: At top level:
ifaddr.c:605: warning: ‘struct nlmsghdr’ declared inside parameter list
ifaddr.c:605: error: conflicting types for ‘ifaddr_decode_nlmsg’
ifaddr.c:198: note: previous declaration of ‘ifaddr_decode_nlmsg’ was here
ifaddr.c: In function ‘ifaddr_decode_nlmsg’:
ifaddr.c:606: warning: implicit declaration of function ‘NLMSG_OK’
ifaddr.c:609: error: dereferencing pointer to incomplete type
ifaddr.c:610: error: ‘NLMSG_NOOP’ undeclared (first use in this function)
ifaddr.c:613: error: ‘NLMSG_ERROR’ undeclared (first use in this function)
ifaddr.c:615: warning: implicit declaration of function ‘NLMSG_DATA’
ifaddr.c:615: warning: initialization makes pointer from integer without a cast
ifaddr.c:616: error: dereferencing pointer to incomplete type
ifaddr.c:616: warning: implicit declaration of function ‘NLMSG_LENGTH’
ifaddr.c:616: error: dereferencing pointer to incomplete type
ifaddr.c:618: error: dereferencing pointer to incomplete type
ifaddr.c:622: error: ‘NLMSG_DONE’ undeclared (first use in this function)
ifaddr.c:626: error: ‘RTM_NEWADDR’ undeclared (first use in this function)
ifaddr.c:627: error: ‘RTM_DELADDR’ undeclared (first use in this function)
ifaddr.c:628: warning: passing argument 1 of ‘ifaddr_handle_ifaddrmsg’ from incompatible pointer type
ifaddr.c:204: note: expected ‘const struct nlmsghdr *’ but argument is of type ‘const struct nlmsghdr *’
...
from config.log:
configure:7831: checking linux/rtnetlink.h usability
configure:7831: gcc -std=gnu99 -c -g -O2 conftest.c >&5
In file included from /usr/include/linux/rtnetlink.h:5,
from conftest.c:62:
/usr/include/linux/netlink.h:35: error: expected specifier-qualifier-list before 'sa_family_t'
configure:7831: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "xllmnrd"
| #define PACKAGE_TARNAME "xllmnrd"
| #define PACKAGE_VERSION "1.2.0"
| #define PACKAGE_STRING "xllmnrd 1.2.0"
| #define PACKAGE_BUGREPORT "https://bitbucket.org/kazssym/xllmnrd/issues"
| #define PACKAGE_URL "http://www.vx68k.org/xllmnrd"
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define PACKAGE_REVISION "e479c8a6598e"
| #define _POSIX_C_SOURCE 200809L
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE__BOOL 1
| #define HAVE_STDBOOL_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_LIBGEN_H 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <linux/rtnetlink.h>
configure:7831: result: no
configure:7831: checking linux/rtnetlink.h presence
configure:7831: gcc -E conftest.c
configure:7831: $? = 0
configure:7831: result: yes
configure:7831: WARNING: linux/rtnetlink.h: present but cannot be compiled
configure:7831: WARNING: linux/rtnetlink.h: check for missing prerequisite headers?
configure:7831: WARNING: linux/rtnetlink.h: see the Autoconf documentation
configure:7831: WARNING: linux/rtnetlink.h: section "Present But Cannot Be Compiled"
configure:7831: WARNING: linux/rtnetlink.h: proceeding with the compiler's result
configure:7831: checking for linux/rtnetlink.h
configure:7831: result: no
thanks
Comments (10)
-
repo owner -
repo owner CentOS appears to have shipped with a strange linux/rtnetlink.h. When I have a chance to use CentOS, I will investigate the header problem.
-
repo owner The following error must be the cause:
In file included from /usr/include/linux/rtnetlink.h:5, from conftest.c:62: /usr/include/linux/netlink.h:35: error: expected specifier-qualifier-list before 'sa_family_t'
Is
sa_family_t
defined in /usr/include/linux/socket.h? -
repo owner - changed version to 1.3.0
-
repo owner -
assigned issue to
- changed version to 1.2.1
This will be fixed in an update release.
-
assigned issue to
-
repo owner - changed status to resolved
Modified a configure check to fix issue
#41.→ <<cset 983cf1c69fda>>
-
repo owner A snapshot has just been uploaded to https://bitbucket.org/kazssym/xllmnrd/downloads/xllmnrd-1.2.0-hotfix-issue-13.tar.gz.
If this snapshot has no problem on CentOS, new version 1.2.1 will be released soon.
-
repo owner - edited description
-
Account Deleted Hi , I am also facing the same problem when I am compiling with arm toolchain
-
repo owner @JanardhanaReddy What did the configure script report about <linux/rtnetlink.h>? This issue was already resolved so if you have the same problem with the latest version, it must be reopened or another issue must be created.
- Log in to comment
Edited the description for readability.