Bug #3230
closedconfigure: linux/if.h: present but cannot be compiled
100%
Description
checking for sys/time.h... yes checking for unistd.h... (cached) yes checking linux/if.h usability... no checking linux/if.h presence... yes configure: WARNING: linux/if.h: present but cannot be compiled configure: WARNING: linux/if.h: check for missing prerequisite headers? configure: WARNING: linux/if.h: see the Autoconf documentation configure: WARNING: linux/if.h: section "Present But Cannot Be Compiled" configure: WARNING: linux/if.h: proceeding with the compiler's result configure: WARNING: ## ------------------------------------------------- ## configure: WARNING: ## Report this to osmocom-net-gprs@lists.osmocom.org ## configure: WARNING: ## ------------------------------------------------- ## checking for linux/if.h... no checking net/if.h usability... yes checking net/if.h presence... yes checking for net/if.h... yes checking linux/if_tun.h usability... yes checking linux/if_tun.h presence... yes checking for linux/if_tun.h... yes checking net/if_tun.h usability... no checking net/if_tun.h presence... no checking for net/if_tun.h... no checking linux/netlink.h usability... yes checking linux/netlink.h presence... yes checking for linux/netlink.h... yes checking linux/rtnetlink.h usability... yes checking linux/rtnetlink.h presence... yes checking for linux/rtnetlink.h... yes checking for an ANSI C-conforming const... yes checking for mode_t... yes checking for size_t... yes ...
Anyone else can confirm this? If no, I'll share some more details about my OS.
Asking because I don't see such messages during compilation of other osmo-*.
Files
Updated by fixeria almost 6 years ago
Updated by fixeria almost 6 years ago
- File config.log config.log added
Ok, would be better to upload all together.
Updated by fixeria over 5 years ago
$ autoconf -Wall configure.ac:4: warning: 'AM_CONFIG_HEADER': this macro is obsolete. configure.ac:4: You should use the 'AC_CONFIG_HEADERS' macro instead. aclocal.m4:904: AM_CONFIG_HEADER is expanded from... configure.ac:4: the top level configure.ac:11: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete. configure.ac:11: You should run autoupdate. ../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from... configure.ac:11: the top level
Updated by pespin over 4 years ago
- I don't have the issue you write here
- I run autoconfig -Wall and submitted a pair of (not directly related) patches:
remote: https://gerrit.osmocom.org/c/osmo-ggsn/+/14621 configure.ac: Replace obosolete macro AC_CANONICAL_SYSTEM
remote: https://gerrit.osmocom.org/c/osmo-ggsn/+/14622 configure.ac: Use brackets in AC_INIT params
https://gerrit.osmocom.org/c/osmo-ggsn/+/14623 configure.ac: Use prefered AC_CONFIG_HEADERS over AM_CONFIG_HEADER
- Summary seems on a specific version of autoconf the issue was fatal, but it was reverted next version (found that in several places): https://github.com/taku910/crfpp/issues/9
fixeria do you still get those "WARNING: linux/if.h" lines nowadays with current master?
Updated by pespin over 4 years ago
Full log, interesting part:
configure:11513: checking linux/if.h usability configure:11513: gcc -c -g -O2 conftest.c >&5 In file included from conftest.c:67:0: /usr/include/linux/if.h:185:19: error: field 'ifru_addr' has incomplete type struct sockaddr ifru_addr; ^ /usr/include/linux/if.h:186:19: error: field 'ifru_dstaddr' has incomplete type struct sockaddr ifru_dstaddr; ^ /usr/include/linux/if.h:187:19: error: field 'ifru_broadaddr' has incomplete type struct sockaddr ifru_broadaddr; ^ /usr/include/linux/if.h:188:19: error: field 'ifru_netmask' has incomplete type struct sockaddr ifru_netmask; ^ /usr/include/linux/if.h:189:20: error: field 'ifru_hwaddr' has incomplete type struct sockaddr ifru_hwaddr; ^ configure:11513: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "osmo-ggsn" | #define PACKAGE_TARNAME "osmo-ggsn" | #define PACKAGE_VERSION "1.2.0" | #define PACKAGE_STRING "osmo-ggsn 1.2.0" | #define PACKAGE_BUGREPORT "osmocom-net-gprs@lists.osmocom.org" | #define PACKAGE_URL "" | #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_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_ARPA_INET_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_NETDB_H 1 | #define HAVE_NETINET_IN_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_SYS_SOCKET_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_UNISTD_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/if.h> configure:11513: result: no configure:11513: checking linux/if.h presence configure:11513: gcc -E conftest.c configure:11513: $? = 0 configure:11513: result: yes configure:11513: WARNING: linux/if.h: present but cannot be compiled configure:11513: WARNING: linux/if.h: check for missing prerequisite headers? configure:11513: WARNING: linux/if.h: see the Autoconf documentation configure:11513: WARNING: linux/if.h: section "Present But Cannot Be Compiled" configure:11513: WARNING: linux/if.h: proceeding with the compiler's result
There seems to be a similar issue with net/if_tun.h.
Related: https://algorithmicallyrandom.blogspot.com/2012/07/error-on-including-include.html
Updated by pespin over 4 years ago
- Status changed from New to Feedback
- Assignee set to fixeria
- % Done changed from 0 to 50
fixeria can you give a try with and without this patch applied to see if it fixes the issue? Otherwise please provide again logs with/without the patch applied.
https://gerrit.osmocom.org/c/osmo-ggsn/+/14624 configure.ac: Workaround some linux/if.h headers requiring external ...
Updated by fixeria over 4 years ago
- % Done changed from 50 to 80
I just tested your change, and I don't see the warnings on my ancient Ubuntu anymore:
... checking for linux/if.h... yes checking for net/if.h... yes checking linux/if_tun.h usability... yes checking linux/if_tun.h presence... yes checking for linux/if_tun.h... yes checking net/if_tun.h usability... no checking net/if_tun.h presence... no checking for net/if_tun.h... no checking linux/netlink.h usability... yes checking linux/netlink.h presence... yes checking for linux/netlink.h... yes checking linux/rtnetlink.h usability... yes checking linux/rtnetlink.h presence... yes checking for linux/rtnetlink.h... yes checking for an ANSI C-conforming const... yes ...
Updated by pespin over 4 years ago
- Status changed from Feedback to Resolved
- % Done changed from 80 to 100
Merged, closing.