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

freeswitch spandsp compilation error #2158

Open
ROBERT-MCDOWELL opened this issue Jul 12, 2023 · 9 comments
Open

freeswitch spandsp compilation error #2158

ROBERT-MCDOWELL opened this issue Jul 12, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@ROBERT-MCDOWELL
Copy link
Contributor

Describe the bug
make
....
make[4]: Entering directory '/home/src/freeswitch/src/mod/applications/mod_spandsp'
CC mod_spandsp_la-mod_spandsp.lo
CC mod_spandsp_la-udptl.lo
CC mod_spandsp_la-mod_spandsp_fax.lo
CC mod_spandsp_la-mod_spandsp_dsp.lo
mod_spandsp_dsp.c: In function 'get_v18_mode':
mod_spandsp_dsp.c:159:17: error: 'V18_MODE_5BIT_4545' undeclared (first use in this function)
159 | int r = V18_MODE_5BIT_4545;
| ^~~~~~~~~~~~~~~~~~
mod_spandsp_dsp.c:159:17: note: each undeclared identifier is reported only once for each function it appears in
mod_spandsp_dsp.c:165:29: error: 'V18_MODE_5BIT_50' undeclared (first use in this function)
165 | r = V18_MODE_5BIT_50;
| ^~~~~~~~~~~~~~~~
mod_spandsp_dsp.c: In function 'spandsp_tdd_send_session':
mod_spandsp_dsp.c:216:21: error: too few arguments to function 'v18_init'
216 | tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
| ^~~~~~~~
In file included from /usr/local/include/spandsp.h:111,
from mod_spandsp.h:50,
from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared here
138 | SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
| ^~~~~~~~
mod_spandsp_dsp.c: In function 'spandsp_tdd_encode_session':
mod_spandsp_dsp.c:263:26: error: too few arguments to function 'v18_init'
263 | pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
| ^~~~~~~~
/usr/local/include/spandsp/v18.h:138:29: note: declared here
138 | SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
| ^~~~~~~~
mod_spandsp_dsp.c: In function 'spandsp_tdd_decode_session':
mod_spandsp_dsp.c:341:26: error: too few arguments to function 'v18_init'
341 | pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt);
| ^~~~~~~~
/usr/local/include/spandsp/v18.h:138:29: note: declared here
138 | SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
....

Package version or git hash

  • Version last git
@ROBERT-MCDOWELL ROBERT-MCDOWELL added the bug Something isn't working label Jul 12, 2023
@akscf
Copy link

akscf commented Jul 13, 2023

This also present in 1.10.9, as a temporary solution used the following
(hope not mistaken with additional args in v18_init())

--- mod_spandsp_dsp.c   2023-02-03 20:07:30.000000000 +0000
+++ mod_spandsp_dsp.c.fixes     2023-07-13 08:47:35.332074299 +0000
@@ -156,13 +156,13 @@
 {
        switch_channel_t *channel = switch_core_session_get_channel(session);
        const char *var;
-       int r = V18_MODE_5BIT_4545;
+       int r = V18_MODE_WEITBRECHT_5BIT_4545;

        if ((var = switch_channel_get_variable(channel, "v18_mode"))) {
                if (!strcasecmp(var, "5BIT_45") || !strcasecmp(var, "baudot")) {
-                       r = V18_MODE_5BIT_4545;
+                       r = V18_MODE_WEITBRECHT_5BIT_4545;
                } else if (!strcasecmp(var, "5BIT_50")) {
-                       r = V18_MODE_5BIT_50;
+                       r = V18_MODE_WEITBRECHT_5BIT_4545;
                } else if (!strcasecmp(var, "DTMF")) {
                        r = V18_MODE_DTMF;
                } else if (!strcasecmp(var, "EDT")) {
@@ -213,7 +213,7 @@
                return SWITCH_STATUS_FALSE;
        }

-       tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
+       tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL, NULL, NULL);


        v18_put(tdd_state, text, -1);
@@ -260,7 +260,7 @@
        }

        pvt->session = session;
-       pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
+       pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL, NULL, NULL);
        pvt->head_lead = TDD_LEAD;

        v18_put(pvt->tdd_state, text, -1);
@@ -338,7 +338,7 @@
        }

        pvt->session = session;
-       pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt);
+       pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt, NULL, NULL);

        if ((status = switch_core_media_bug_add(session, "spandsp_tdd_decode", NULL,
                                                tdd_decode_callback, pvt, 0, SMBF_READ_REPLACE | SMBF_NO_PAUSE, &bug)) != SWITCH_STATUS_SUCCESS) {

@ROBERT-MCDOWELL
Copy link
Contributor Author

works! many thanks!

@akscf
Copy link

akscf commented Jul 14, 2023

you are welcome

piotrgregor referenced this issue in freeswitch/spandsp Jul 16, 2023
- Async and FSK modules reworked, to generalise the bit stream processing
  for async data
- V.8 module enhanced to support gateway operation, for things like V.150.x
- modem connect tone module enhanced to support gateway operation, for things
like V.150.x
@piotrgregor
Copy link
Contributor

piotrgregor commented Jul 16, 2023

This commit broke compatibllity between libspandsp and mod_spandsp. mod_spandsp must be updated to use new defines introduced in that commit.
As a workaround reset spandsp to something preceding that commit, e.g.:
git reset --hard 67d2455efe02e7ff0d897f3fd5636fed4d54549e
Reconfigure, compile, reinstall spandsp.

@seven1240
Copy link
Collaborator

#2184

@nadirhamid
Copy link

@piotrgregor solution works nicely. It was a headache to debug this, thank you.

@ikrammuzamil
Copy link

This commit broke compatibllity between libspandsp and mod_spandsp. mod_spandsp must be updated to use new defines introduced in that commit. As a workaround reset spandsp to something preceding that commit, e.g.: git reset --hard 67d2455efe02e7ff0d897f3fd5636fed4d54549e Reconfigure, compile, reinstall spandsp.

thanks dear it's worked

@Forcheny
Copy link

This commit broke compatibllity between libspandsp and mod_spandsp. mod_spandsp must be updated to use new defines introduced in that commit. As a workaround reset spandsp to something preceding that commit, e.g.: git reset --hard 67d2455efe02e7ff0d897f3fd5636fed4d54549e Reconfigure, compile, reinstall spandsp.

Thanks so much. It works on my lab.

@nttranbao
Copy link

Hi, wonder if there is a fix coming for this issue. I've got same issue on Debian Bookworm, and had to follow the above "git reset" workaround to make it work. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants