Hi. I am having trouble compiling mod_signalwire. I am using gcc 13.
Here is the whole build log as there are lots of errors.
Thanks in advance for any suggestions.
Hi. I am having trouble compiling mod_signalwire. I am using gcc 13.
Here is the whole build log as there are lots of errors.
Thanks in advance for any suggestions.
make sure you update/compile libks GitHub - signalwire/libks: Foundational support for signalwire C products
swclt_sub_ctx_t
/usr/include/signalwire-client-c/session.h:277:77: error: unknown type name ‘swclt_sub_cb_t’; did you mean ‘swclt_sub_ctx_t’?
277 | SWCLT_DECLARE(ks_status_t) swclt_sess_provisioning_setup(swclt_sess_t sess, swclt_sub_cb_t cb, void *cb_data);
| ^~~~~~~~~~~~~~
| swclt_sub_ctx_t
In file included from /usr/include/signalwire-client-c/client.h:50:
/usr/include/signalwire-client-c/handle_monitor.h:28:9: error: unknown type name ‘ks_handle_t’
28 | typedef ks_handle_t swclt_hmon_t;
| ^~~~~~~~~~~
/usr/include/signalwire-client-c/handle_monitor.h:31:45: error: unknown type name ‘ks_handle_t’; did you mean ‘ks_hash_t’?
31 | typedef void(*swclt_hmon_state_change_cb_t)(ks_handle_t handle, const swclt_hstate_change_t *state_change_info, void *cb_data);
| ^~~~~~~~~~~
| ks_hash_t
/usr/include/signalwire-client-c/handle_monitor.h:37:9: error: unknown type name ‘ks_handle_t’; did you mean ‘ks_hash_t’?
37 | ks_handle_t handle_to_monitor,
| ^~~~~~~~~~~
| ks_hash_t
/usr/include/signalwire-client-c/handle_monitor.h:38:9: error: unknown type name ‘swclt_hmon_state_change_cb_t’; did you mean ‘swclt_hstate_change_cb_t’?
38 | swclt_hmon_state_change_cb_t cb,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| swclt_hstate_change_cb_t
mod_signalwire.c: In function ‘load_credentials_from_json’:
mod_signalwire.c:233:24: warning: assignment to ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
233 | if ((bootstrap = ks_json_get_object_cstr(json, “bootstrap”)) == NULL) {
| ^
mod_signalwire.c:243:33: warning: assignment to ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
243 | if ((relay_connector_id = ks_json_get_object_cstr(json, “relay_connector_id”)) == NULL) {
| ^
mod_signalwire.c:271:30: warning: implicit declaration of function ‘ks_json_pprint_unformatted’; did you mean ‘ks_json_print_unformatted’? [-Wimplicit-function-declaration]
271 | authentication_str = ks_json_pprint_unformatted(NULL, authentication);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| ks_json_print_unformatted
mod_signalwire.c:271:28: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
271 | authentication_str = ks_json_pprint_unformatted(NULL, authentication);
| ^
mod_signalwire.c: In function ‘mod_signalwire_adoption_post’:
mod_signalwire.c:453:22: warning: implicit declaration of function ‘ks_json_free_ex’; did you mean ‘ks_pool_free_ex’? [-Wimplicit-function-declaration]
453 | if (jsonstr) ks_json_free_ex((void **)&jsonstr);
| ^~~~~~~~~~~~~~~
| ks_pool_free_ex
mod_signalwire.c: In function ‘mod_signalwire_load’:
mod_signalwire.c:1014:9: error: ‘swclt_hmon_state_change_cb_t’ undeclared (first use in this function); did you mean ‘swclt_hstate_change_cb_t’?
1014 | swclt_hmon_register(&globals.signalwire_session_monitor, globals.signalwire_session, mod_signalwire_session_state_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~
mod_signalwire.c:1014:94: error: expected ‘)’ before ‘mod_signalwire_session_state_handler’
1014 | swclt_hmon_register(&globals.signalwire_session_monitor, globals.signalwire_session, mod_signalwire_session_state_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_signalwire.c:1014:9: note: to match this ‘(’
1014 | swclt_hmon_register(&globals.signalwire_session_monitor, globals.signalwire_session, mod_signalwire_session_state_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~
mod_signalwire.c:1055:41: warning: implicit declaration of function ‘ks_handle_destroy’; did you mean ‘ks_hash_destroy’? [-Wimplicit-function-declaration]
1055 | if (globals.signalwire_session) ks_handle_destroy(&globals.signalwire_session);
| ^~~~~~~~~~~~~~~~~
| ks_hash_destroy
mod_signalwire.c: In function ‘mod_signalwire_shutdown’:
mod_signalwire.c:1084:16: warning: implicit declaration of function ‘swclt_hstate_current_get’; did you mean ‘swclt_hstate_changed’? [-Wimplicit-function-declaration]
1084 | while (swclt_hstate_current_get(globals.signalwire_session) == SWCLT_HSTATE_ONLINE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
| swclt_hstate_changed
mod_signalwire.c: In function ‘mod_signalwire_state_online’:
mod_signalwire.c:1144:14: warning: implicit declaration of function ‘swclt_sess_provisioning_setup’; did you mean ‘swclt_sess_provisioning_configure’? [-Wimplicit-function-declaration]
1144 | if (!swclt_sess_provisioning_setup(globals.signalwire_session, __on_provisioning_events, NULL)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| swclt_sess_provisioning_configure
mod_signalwire.c: In function ‘mod_signalwire_state_configure’:
mod_signalwire.c:1221:58: warning: passing argument 1 of ‘ks_json_get_object_item’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1221 | result = ks_json_get_object_item(result, “result”);
| ^~~~~~
/usr/include/libks2/libks/ks_json.h:76:60: note: expected ‘ks_json_t *’ {aka ‘struct kJSON *’} but argument is of type ‘const ks_json_t *’ {aka ‘const struct kJSON *’}
76 | KS_DECLARE(ks_json_t *) ks_json_get_object_item(ks_json_t *object, const char *string);
| ~~~~~~~~~^
mod_signalwire.c:1222:79: warning: implicit declaration of function ‘ks_handle_pool’ [-Wimplicit-function-declaration]
1222 | if (!SIGNALWIRE_PROVISIONING_CONFIGURE_RESPONSE_PARSE(ks_handle_pool(cmd), result, &configure_res)) {
| ^
mod_signalwire.c:1222:79: warning: passing argument 1 of ‘SIGNALWIRE_PROVISIONING_CONFIGURE_RESPONSE_PARSE’ makes pointer from integer without a cast [-Wint-conversion]
1222 | if (!SIGNALWIRE_PROVISIONING_CONFIGURE_RESPONSE_PARSE(ks_handle_pool(cmd), result, &configure_res)) {
| ^~~~~~~~~~~~~~~~~~~
| |
| int
/usr/include/signalwire-client-c/signalwire/provisioning.h:37:1: note: expected ‘ks_pool_t *’ {aka ‘struct ks_pool_s *’} but argument is of type ‘int’
37 | SWCLT_JSON_PARSE_BEG(SIGNALWIRE_PROVISIONING_CONFIGURE_RESPONSE, signalwire_provisioning_configure_response_t)
| ^~~~~~~~~~~~~~~~~~~~
mod_signalwire.c:1228:69: warning: initialization of ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1228 | const char *configuration_profile = ks_json_get_object_cstr(configuration, “profile”);
| ^~~~~~~~~~~~~~~~~~~~~~~
mod_signalwire.c: In function ‘mod_signalwire_runtime’:
mod_signalwire.c:1435:25: error: ‘swclt_hmon_state_change_cb_t’ undeclared (first use in this function); did you mean ‘swclt_hstate_change_cb_t’?
1435 | swclt_hmon_register(&globals.signalwire_session_monitor, globals.signalwire_session, mod_signalwire_session_state_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~
mod_signalwire.c:1435:110: error: expected ‘)’ before ‘mod_signalwire_session_state_handler’
1435 | swclt_hmon_register(&globals.signalwire_session_monitor, globals.signalwire_session, mod_signalwire_session_state_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_signalwire.c:1435:25: note: to match this ‘(’
1435 | swclt_hmon_register(&globals.signalwire_session_monitor, globals.signalwire_session, mod_signalwire_session_state_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~
mod_signalwire.c: At top level:
mod_signalwire.c:594:13: warning: ‘mod_signalwire_session_state_handler’ defined but not used [-Wunused-function]
594 | static void mod_signalwire_session_state_handler(swclt_sess_t sess, swclt_hstate_change_t *state_change_info, const char *cb_data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:738: mod_signalwire_la-mod_signalwire.lo] Error 1
make[4]: Leaving directory ‘/usr/src/freeswitch/src/mod/applications/mod_signalwire’
make[3]: *** [Makefile:727: mod_signalwire-all] Error 1
I did do that, otherwise the configure script complains.
What OS are compiling on? On Debian 12 the gcc version is 12
I tried on 12 and 13, same error on both, The complete build log is
in the link I sent.