hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
832 stars 202 forks source link

make error #189

Closed moyi7712 closed 4 years ago

moyi7712 commented 4 years ago

upnp_device.c: In function ‘upnp_add_response’: upnp_device.c:75:46: error: dereferencing pointer to incomplete type ‘struct Upnp_Action_Request’ rc = UpnpAddToActionResponse(&event->request->ActionResult, ^~ upnp_device.c: At top level: upnp_device.c:156:47: warning: ‘struct Upnp_Subscription_Request’ declared inside parameter list will not be visible outside of this definition or declaration struct Upnp_Subscription_Request ^~~~~~~~~ upnp_device.c: In function ‘handle_subscription_request’: upnp_device.c:165:12: error: dereferencing pointer to incomplete type ‘struct Upnp_Subscription_Request’ sr_event->ServiceId, sr_event->UDN); ^~ upnp_device.c: At top level: upnp_device.c:243:17: warning: ‘struct Upnp_State_Var_Request’ declared inside parameter list will not be visible outside of this definition or declaration struct Upnp_State_Var_Request var_event) { ^~~~~~ upnp_device.c: In function ‘handle_var_request’: upnp_device.c:245:18: error: dereferencing pointer to incomplete type ‘struct Upnp_State_Var_Request’ var_event->ServiceID); ^~ upnp_device.c: In function ‘initialize_device’: upnp_device.c:444:7: error: too few arguments to function ‘UpnpAddVirtualDir’ rc = UpnpAddVirtualDir("/upnp"); ^~~~~ In file included from upnp_device.c:41: /usr/include/upnp/upnp.h:2740:17: note: declared here EXPORT_SPEC int UpnpAddVirtualDir( ^~~~~ upnp_device.c:454:10: warning: passing argument 5 of ‘UpnpRegisterRootDevice2’ from incompatible pointer type [-Wincompatible-pointer-types] &event_handler, result_device, ^~~~~~ In file included from upnp_device.c:41: /usr/include/upnp/upnp.h:813:14: note: expected ‘Upnp_FunPtr’ {aka ‘int ()(enum Upnp_EventType_e, const void , void )’} but argument is of type ‘int ()(Upnp_EventType, void , void )’ {aka ‘int ()(enum Upnp_EventType_e, void , void )’} Upnp_FunPtr Fun,


make[2]: *** [Makefile:406: upnp_device.o] Error 1
make[2]: Leaving directory '/home/haiya/gmrender-resurrect/src'
make[1]: *** [Makefile:366: all-recursive] Error 1
make[1]: Leaving directory '/home/haiya/gmrender-resurrect'
make: *** [Makefile:307: all] Error 2
vallahaye commented 4 years ago

Same error on my side when compiling on Raspbian (kernel 4.19.57-v7+) with GCC (8.3.0-6+rpi1).

EDIT: It compiles on my ArchLinux machine with GCC (9.1.0).

EDIT2: It appears that those build errors are caused by the API changes added to libupnp in its latest version (1.8.4). So for now, the quick and dirty solution on Raspbian is to purge libupnp-dev and install libupnp6-dev instead.

hzeller commented 4 years ago

The libupnp 1.8 compatibility update should fix this.