LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Linphone - Fails to compile mediastreamer2 (https://www.linuxquestions.org/questions/slackware-14/linphone-fails-to-compile-mediastreamer2-4175632941/)

joenew 06-29-2018 09:18 AM

Linphone - Fails to compile mediastreamer2
 
1 Attachment(s)
Hi all, I'm trying to recompile linphone using sbopkg. I'm on slackware_64-14.2 with some AlienBob package, also multilib.
Below you find sbopkg log file attached with all building messages and final errors too.

Anyway I'll report an inline part of that messages:
Code:

  CC      upnp/libmediastreamer_voip_la-upnp_igd.lo
In file included from /usr/include/upnp/ActionComplete.h:22:0,
                from /usr/include/upnp/upnp.h:397,
                from upnp/upnp_igd_utils.h:36,
                from upnp/upnp_igd.c:33:
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
/usr/include/upnp/TemplateInclude.h:37:17: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  typedef struct s_##CLASS CLASS; \
                ^
/usr/include/upnp/TemplateInclude.h:32:2: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON_AUX’
  TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
  ^
/usr/include/upnp/TemplateInclude.h:138:1: note: in expansion of macro ‘TEMPLATE_PROTOTYPE_COMMON’
 TEMPLATE_PROTOTYPE_COMMON(CLASS)
 ^
upnp/upnp_igd.c:398:86: warning: ‘struct Upnp_Discovery’ declared inside parameter list
 void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, struct Upnp_Discovery *d_event) {
                                                                                      ^
upnp/upnp_igd.c:398:86: warning: its scope is only this definition or declaration, which is probably not what you want
upnp/upnp_igd.c: In function ‘upnp_igd_add_device’:
upnp/upnp_igd.c:426:51: error: dereferencing pointer to incomplete type ‘struct Upnp_Discovery’
  ret = UpnpResolveURL((baseURL ? baseURL : d_event->Location), relURL, presURL);
                                                  ^
upnp/upnp_igd.c:520:112: warning: passing argument 8 of ‘upnp_igd_send_action’ from incompatible pointer type [-Wincompatible-pointer-types]
    upnp_igd_send_action(igd_ctxt, deviceNode, IGD_SERVICE_WANIPCONNECTION, "GetNATRSIPStatus", NULL, NULL, 0, upnp_igd_callback, igd_ctxt);
                                                                                                                ^
upnp/upnp_igd.c:354:5: 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 *)}’
 int upnp_igd_send_action(upnp_igd_context* igd_ctxt, upnp_igd_device_node *device_node, int service,
    ^
upnp/upnp_igd.c:523:109: warning: passing argument 8 of ‘upnp_igd_send_action’ from incompatible pointer type [-Wincompatible-pointer-types]
    upnp_igd_send_action(igd_ctxt, deviceNode, IGD_SERVICE_WANIPCONNECTION, "GetStatusInfo", NULL, NULL, 0, upnp_igd_callback, igd_ctxt);
                                                                                                            ^
upnp/upnp_igd.c:354:5: 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 *)}’
 int upnp_igd_send_action(upnp_igd_context* igd_ctxt, upnp_igd_device_node *device_node, int service,
    ^
upnp/upnp_igd.c:524:116: warning: passing argument 8 of ‘upnp_igd_send_action’ from incompatible pointer type [-Wincompatible-pointer-types]
    upnp_igd_send_action(igd_ctxt, deviceNode, IGD_SERVICE_WANIPCONNECTION, "GetExternalIPAddress", NULL, NULL, 0, upnp_igd_callback, igd_ctxt);
                                                                                                                    ^
upnp/upnp_igd.c:354:5: 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 *)}’
 int upnp_igd_send_action(upnp_igd_context* igd_ctxt, upnp_igd_device_node *device_node, int service,
    ^
upnp/upnp_igd.c: In function ‘upnp_igd_callback’:
upnp/upnp_igd.c:898:18: error: dereferencing pointer to incomplete type ‘struct Upnp_Discovery’
      if (d_event->ErrCode != UPNP_E_SUCCESS) {
                  ^
upnp/upnp_igd.c:905:48: warning: passing argument 3 of ‘upnp_igd_add_device’ from incompatible pointer type [-Wincompatible-pointer-types]
        upnp_igd_add_device(igd_ctxt, desc_doc, d_event);
                                                ^
upnp/upnp_igd.c:398:6: note: expected ‘struct Upnp_Discovery *’ but argument is of type ‘struct Upnp_Discovery *’
 void upnp_igd_add_device(upnp_igd_context *igd_ctxt, IXML_Document *desc_doc, struct Upnp_Discovery *d_event) {
      ^
upnp/upnp_igd.c:914:18: error: dereferencing pointer to incomplete type ‘struct Upnp_Discovery’
      if (d_event->ErrCode != UPNP_E_SUCCESS) {
                  ^
upnp/upnp_igd.c:924:18: error: dereferencing pointer to incomplete type ‘struct Upnp_Action_Complete’
      if (a_event->ErrCode != UPNP_E_SUCCESS) {
                  ^
upnp/upnp_igd.c:934:19: error: dereferencing pointer to incomplete type ‘struct Upnp_State_Var_Complete’
      if (sv_event->ErrCode != UPNP_E_SUCCESS) {
                  ^
upnp/upnp_igd.c:945:46: error: dereferencing pointer to incomplete type ‘struct Upnp_Event’
      upnp_igd_handle_event(igd_ctxt, e_event->Sid, e_event->EventKey, e_event->ChangedVariables);
                                              ^
upnp/upnp_igd.c:953:19: error: dereferencing pointer to incomplete type ‘struct Upnp_Event_Subscribe’
      if (es_event->ErrCode != UPNP_E_SUCCESS) {
                  ^
In file included from upnp/upnp_igd.c:34:0:
upnp/upnp_igd.c:967:70: error: dereferencing pointer to incomplete type ‘struct Upnp_Event_Subscribe’
      ret = UpnpSubscribe(igd_ctxt->upnp_handle, UPNP_STRING(es_event->PublisherUrl), &TimeOut, newSID);
                                                                      ^
upnp/upnp_igd_private.h:131:46: note: in definition of macro ‘UPNP_STRING’
 #define UPNP_STRING(x) UpnpString_get_String(x)
                                              ^
upnp/upnp_igd.c: In function ‘upnp_igd_start’:
upnp/upnp_igd.c:1120:27: warning: passing argument 1 of ‘UpnpRegisterClient’ from incompatible pointer type [-Wincompatible-pointer-types]
  ret = UpnpRegisterClient(upnp_igd_callback, igd_ctxt, &igd_ctxt->upnp_handle);
                          ^
In file included from upnp/upnp_igd_utils.h:36:0,
                from upnp/upnp_igd.c:33:
/usr/include/upnp/upnp.h:989:17: 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 *)}’
 EXPORT_SPEC int UpnpRegisterClient(
                ^
Makefile:2387: set di istruzioni per l'obiettivo "upnp/libmediastreamer_voip_la-upnp_igd.lo" non riuscito
make[5]: *** [upnp/libmediastreamer_voip_la-upnp_igd.lo] Errore 1
make[5]: uscita dalla directory "/tmp/sbopkg.tPalmB/linphone-3.12.0/mediastreamer2/src"
Makefile:1028: set di istruzioni per l'obiettivo "all" non riuscito
make[4]: *** [all] Errore 2
make[4]: uscita dalla directory "/tmp/sbopkg.tPalmB/linphone-3.12.0/mediastreamer2/src"
Makefile:641: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make[3]: *** [all-recursive] Errore 1
make[3]: uscita dalla directory "/tmp/sbopkg.tPalmB/linphone-3.12.0/mediastreamer2"
Makefile:548: set di istruzioni per l'obiettivo "all" non riuscito
make[2]: *** [all] Errore 2
make[2]: uscita dalla directory "/tmp/sbopkg.tPalmB/linphone-3.12.0/mediastreamer2"
Makefile:619: set di istruzioni per l'obiettivo "all-recursive" non riuscito
make[1]: *** [all-recursive] Errore 1
make[1]: uscita dalla directory "/tmp/sbopkg.tPalmB/linphone-3.12.0"
Makefile:547: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2
Cleaning up..

What do you think about, what could be the problem?
Thanks in advance!

ponce 06-29-2018 09:24 AM

when you run the linphone.SlackBuild try passing it the parameter
Code:

UPNP=no

joenew 06-29-2018 10:18 AM

Thanks as usual ponce, It works now!

Have you got any idea why it was failing with UPNP support active instead?

ponce 06-29-2018 10:31 AM

probably because linupnp has been bumped to version 1.8.x and not everything on SBo has catched up with it (something is still not compatible).

joenew 06-29-2018 11:16 AM

Yes I've libupnp-1.8.3-x86_64-2_SBo on the system...
Would be the case to warn the linphone slackbuild maintainer?

Thanks again!

ponce 06-29-2018 12:00 PM

Yes, maybe disabling upnp support in it by default for the moment should be better.

chris.willing 06-30-2018 05:55 AM

There have been other SlackBuilds which fail due to updated libupnp. For that reason a libupnp-legacy was introduced. No guarantee but maybe using libupnp-legacy instead of libupnp would help in this case.

chris

joenew 07-01-2018 08:49 AM

Ok, I tried and it seems to work properly with "legacy" libupnp:
Code:

# hoorex -i libupnp
libupnp vlc linphone

# for i in $(hoorex -i libupnp);do ls /var/log/packages/|grep ^$i;done
libupnp-1.8.3-x86_64-2_SBo
vlc-3.0.2-x86_64-1alien
linphone-3.12.0-x86_64-1_SBo

# removepkg linphone

# removepkg libupnp

There are just vlc and linphone on my system that depend on libupnp, but vlc is from alien repo and it should been built against a static version of libupnp (we find libupnp-1.6.19.tar.bz2 in vlc build dir on alien repo...). So I removed linphone and libupnp and then tried to build libupnp-legacy and again linphone using sbopkg:
Code:

# sbopkg -i "libupnp-legacy linphone"

[...]

Done upgrading/installing package.

+++++++++++++++++++++++++++++++++++++++++++
SUMMARY LOG
Using the SBo repository for Slackware 14.2
Queue Process:  Download, build, and install

libupnp-legacy:
  MD5SUM check for libupnp-1.6.17.tar.bz2 ... OK
  Building package libupnp-legacy-1.6.17-x86_64-1_SBo.tgz ... OK
  Installing package libupnp-legacy-1.6.17-x86_64-1_SBo.tgz ... OK

linphone:
  MD5SUM check for linphone-3.12.0.tar.gz ... OK
  MD5SUM check for ortp-1.0.2.tar.gz ... OK
  MD5SUM check for mediastreamer-2.16.1.tar.gz ... OK
  Building package linphone-3.12.0-x86_64-1_SBo.tgz ... OK
  Installing package linphone-3.12.0-x86_64-1_SBo.tgz ... OK

+++++++++++++++++++++++++++++++++++++++++++

###########################################
          Queue process complete!
###########################################

In that way it compiled without errors. Thanks for your hint!

I would say the problem is just related to linphone queue:
https://slackbuilds.org/slackbuilds/.../linphone.info

Code:

REQUIRES="bctoolbox belle-sip bzrtp ffmpeg libsrtp libupnp mbedtls speex"
I think libupnp should be replaced with libupnp-legacy

chris.willing 07-02-2018 03:04 AM

Great that it worked for you.

However, for others trying something simiiar, be warned that the libupnp and libupnp-legacy packages clash with each other i.e. cannot be installed at the same time without fear of disaster. This raises problems in situations like when vlc and linphone are both installed; in that case libupnp is used for vlc (which has been updated to use the latest libupnp) whereas libupnp-legacy is required for linphone. I sent a way to create a non-conflicting libupnp-legacy package to the SBo user list back in March but nothing came of it.

In the OP's case this wasn't a problem because alienBob's vlc already statically included libupnp, so no clash because only libupnp-legacy was needed for linphone.

chris

joenew 07-02-2018 12:28 PM

I mailed linphone package maintainer (without any answer at now...), but it would be a good idea to warn also libupnp / libupnp-legacy maintainer on SBo.

MadMaverick9 07-10-2018 02:20 AM

Foobar :banghead:


All times are GMT -5. The time now is 04:34 AM.