Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error #189

Closed
moyi7712 opened this issue Aug 23, 2019 · 2 comments
Closed

make error #189

moyi7712 opened this issue Aug 23, 2019 · 2 comments

Comments

@moyi7712
Copy link

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
Copy link

vallahaye commented Aug 28, 2019

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 pushed a commit that referenced this issue Oct 20, 2019
* Compile against libupnp 1.8
(Patch from Debian, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884246)
* Define a compatibility layer to allow libupnp v1.8.x & v1.6.x without relying on v1.6.26
  (including compatibility macros for UPNP root device callback to eliminate warnings)
* Add missing upnp_compat include for webserver.c
* Fixed const warning in find_action
* Set ActionResult after adding response data. Necessary since we've made a copy & modified the pointer
* Fix action logging for libupnp-v1.8.x
* Additional compatibility macros for VD callbacks to eliminate warnings due to changed callback prototype
* Increase upnp_set_error buffer size to match LINE_SIZE. Also eliminate additional local vars
* Clean up some of the weird formatting in upnp_device. Eliminate some unnecessary local vars.

Closes #173 #170 #189 #176
@hzeller
Copy link
Owner

hzeller commented Oct 21, 2019

The libupnp 1.8 compatibility update should fix this.

@hzeller hzeller closed this as completed Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants