After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681963 - compile error using --with-context-manager=linux
compile error using --with-context-manager=linux
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
0.18.x
Other Linux
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-16 06:20 UTC by sledz
Modified: 2012-08-20 09:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sledz 2012-08-16 06:20:44 UTC
When using --with-context-manager=linux in configure step make fails with

make[3]: Entering directory `/pm/sledz/HydraIP/OE/tmp.6-SSZ/work/armv5te-angstrom-linux-gnueabi/gupnp-0.18.3-r3.1/gupnp-0.18.3/libgupnp'
  CC     gupnp-linux-context-manager.lo
gupnp-linux-context-manager.c:53: error: expected specifier-qualifier-list before 'GSocket'
gupnp-linux-context-manager.c: In function 'network_device_new':
gupnp-linux-context-manager.c:97: error: storage size of 'ifr' isn't known
gupnp-linux-context-manager.c:101: error: invalid application of 'sizeof' to incomplete type 'struct ifreq' 
gupnp-linux-context-manager.c: In function 'network_device_create_context':
gupnp-linux-context-manager.c:177: warning: assignment makes pointer from integer without a cast
gupnp-linux-context-manager.c: At top level:
gupnp-linux-context-manager.c:250: error: expected ')' before '*' token
gupnp-linux-context-manager.c: In function 'create_context':
gupnp-linux-context-manager.c:291: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c: In function 'remove_context':
gupnp-linux-context-manager.c:313: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c: In function 'on_bootstrap':
gupnp-linux-context-manager.c:352: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:353: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c:357: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:360: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:362: error: 'on_netlink_message_available' undeclared (first use in this function)
gupnp-linux-context-manager.c:362: error: (Each undeclared identifier is reported only once
gupnp-linux-context-manager.c:362: error: for each function it appears in.)
gupnp-linux-context-manager.c: In function 'send_netlink_request':
gupnp-linux-context-manager.c:405: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c: In function 'handle_device_status_change':
gupnp-linux-context-manager.c:443: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c:447: error: 'IFF_UP' undeclared (first use in this function)
gupnp-linux-context-manager.c:457: error: 'IFF_MULTICAST' undeclared (first use in this function)
gupnp-linux-context-manager.c:457: error: 'IFF_LOOPBACK' undeclared (first use in this function)
gupnp-linux-context-manager.c:457: error: 'IFF_POINTOPOINT' undeclared (first use in this function)
gupnp-linux-context-manager.c:462: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c: In function 'remove_device':
gupnp-linux-context-manager.c:472: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c: In function 'receive_netlink_message':
gupnp-linux-context-manager.c:492: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c:498: error: 'G_IO_ERROR_WOULD_BLOCK' undeclared (first use in this function)
gupnp-linux-context-manager.c: In function 'create_ioctl_socket':
gupnp-linux-context-manager.c:555: error: 'G_IO_ERROR' undeclared (first use in this function)
gupnp-linux-context-manager.c: In function 'create_netlink_socket':
gupnp-linux-context-manager.c:571: error: 'GSocket' undeclared (first use in this function)
gupnp-linux-context-manager.c:571: error: 'sock' undeclared (first use in this function)
gupnp-linux-context-manager.c:579: error: 'G_IO_ERROR' undeclared (first use in this function)
gupnp-linux-context-manager.c:614: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c: In function 'gupnp_linux_context_manager_init':
gupnp-linux-context-manager.c:629: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c: In function 'gupnp_linux_context_manager_constructed':
gupnp-linux-context-manager.c:651: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c:653: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c:655: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c: In function 'gupnp_linux_context_manager_dispose':
gupnp-linux-context-manager.c:684: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c:685: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c:686: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c:687: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'bootstrap_source'
gupnp-linux-context-manager.c:690: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:691: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:692: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:693: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket_source'
gupnp-linux-context-manager.c:696: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c:697: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c:698: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'netlink_socket'
gupnp-linux-context-manager.c:706: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c:707: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
gupnp-linux-context-manager.c:708: error: 'GUPnPLinuxContextManagerPrivate' has no member named 'interfaces'
make[3]: *** [gupnp-linux-context-manager.lo] Error 1

It seems that at least there are two includes missing in gupnp-linux-context-manager.c:

#include <gio/gio.h>
#include <net/if.h>
Comment 1 Jens Georg 2012-08-16 08:40:36 UTC
hm, works here, but yes, they should be included. Can you verify if those are the only two missing files?
Comment 2 sledz 2012-08-16 10:18:56 UTC
After adding both everything compiled fine here.
Comment 3 Jens Georg 2012-08-16 18:51:38 UTC
which kernel version / glibc version are you using? here net/if.h conflicts with linux/if.h
Comment 4 sledz 2012-08-17 07:35:42 UTC
We're cross compiling for an embedded device and are forced to use kernel 2.6.24.

Including <linux/if.h> instead of <net/if.c> works well for our kernel too, so you can use this one.
Comment 5 Jens Georg 2012-08-19 11:32:22 UTC
Does configure find linux/wireless.h for you?
Comment 6 sledz 2012-08-20 09:49:25 UTC
Yes and no.

The configure step finds the include, but the test itself fails.

-------------> snippet from config.log <-------------
configure:11490: checking for linux/wireless.h
configure:11490: arm-angstrom-linux-gnueabi-gcc -march=armv5te -mtune=arm926ej-s -mthumb-interwork -mno-thumb --sysroot=/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi -c -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2  conftest.c >&5
In file included from conftest.c:36:
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:650: error: expected specifier-qualifier-list before '__s32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:663: error: expected specifier-qualifier-list before '__u16'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:677: error: expected specifier-qualifier-list before '__s32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:688: error: expected specifier-qualifier-list before '__u8'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:704: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:717: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:744: error: expected specifier-qualifier-list before '__u8'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:806: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:820: error: expected specifier-qualifier-list before '__u16'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:834: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:842: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:851: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:863: error: expected specifier-qualifier-list before '__u16'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:886: error: 'IFNAMSIZ' undeclared here (not in a function)
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:901: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:945: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:1046: error: expected specifier-qualifier-list before '__u32'
/pm/sledz/HydraIP/OE/tmp.6-SSZ/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/linux/wireless.h:1064: error: expected specifier-qualifier-list before '__u16'
configure:11490: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gupnp"
| #define PACKAGE_TARNAME "gupnp"
| #define PACKAGE_VERSION "0.18.0"
| #define PACKAGE_STRING "gupnp 0.18.0"
| #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp"
| #define PACKAGE_URL "http://www.gupnp.org/"
| #define PACKAGE "gupnp"
| #define VERSION "0.18.0"
| #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_STDLIB_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_MMAP 1
| #define _FILE_OFFSET_BITS 64
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_LINUX_RTNETLINK_H 1
| /* end confdefs.h.  */
|  #ifdef HAVE_SYS_SOCKET_H
|                   #include <sys/socket.h>
|                   #endif
| 
| 
| #include <linux/wireless.h>
configure:11490: result: no
-------------> snippet from config.log <-------------