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
Cannot be built externally with Asterisk 16 #15
Comments
Note that other projects building external modules have resolved this by setting |
Puh, I never tested that code with Asterisk 14 or newer. Thanks for the note! Yes, that is the solution. The same was done in Asterisk itself (see the modules And yes, after a bit of Git blame investigation, the original change happened back in May 2015 with Asterisk 14 already:
It was code clean-up, adding an additional burden on external modules. If you do not know how to create a Pull Request, you can use the edit interface of the GitHub webpage instead. That creates a Pull Request automatically. If all this is too complicated, just say so, and I change it directly. |
This is necessary for external module compilation since Asterisk 14 gcc -o codecs/codec_opus_open_source.so -DAST_MODULE=\"codec_opus_open_source\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/asterisk-opus-13.7+20171009=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -g3 -O3 -lopus -shared -Wl,-z,relro codecs/codec_opus_open_source.c In file included from codecs/codec_opus_open_source.c:39: /usr/include/asterisk.h:232:2: error: #error "Externally compiled modules must declare AST_MODULE_SELF_SYM." #error "Externally compiled modules must declare AST_MODULE_SELF_SYM." ^~~~~ In file included from codecs/codec_opus_open_source.c:56: codecs/codec_opus_open_source.c: In function 'load_module': codecs/codec_opus_open_source.c:833:8: error: 'AST_MODULE_SELF' undeclared (first use in this function); did you mean 'AST_MODULE_INFO'? res = ast_register_translator(&opustolin); ^~~~~~~~~~~~~~~~~~~~~~~ codecs/codec_opus_open_source.c:833:8: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [Makefile:50: codecs/codec_opus_open_source.so] Error 1 Fixes traud#15
This is necessary for external module compilation since Asterisk 14 gcc -o codecs/codec_opus_open_source.so -DAST_MODULE=\"codec_opus_open_source\" -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/asterisk-opus-13.7+20171009=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -g3 -O3 -lopus -shared -Wl,-z,relro codecs/codec_opus_open_source.c In file included from codecs/codec_opus_open_source.c:39: /usr/include/asterisk.h:232:2: error: #error "Externally compiled modules must declare AST_MODULE_SELF_SYM." #error "Externally compiled modules must declare AST_MODULE_SELF_SYM." ^~~~~ In file included from codecs/codec_opus_open_source.c:56: codecs/codec_opus_open_source.c: In function 'load_module': codecs/codec_opus_open_source.c:833:8: error: 'AST_MODULE_SELF' undeclared (first use in this function); did you mean 'AST_MODULE_INFO'? res = ast_register_translator(&opustolin); ^~~~~~~~~~~~~~~~~~~~~~~ codecs/codec_opus_open_source.c:833:8: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [Makefile:50: codecs/codec_opus_open_source.so] Error 1 Fixes traud#15
If the shared libraries are not compiled in source tree but externally via the Makefile (for example, Asterisk was already installed via a package manager in Linux), the header asterisk.h of Asterisk (14 and newer) error with: Externally compiled modules must declare AST_MODULE_SELF_SYM. closes #15
Building an external shared module (with the Makefile opposed to patching the Asterisk source) does not work anymore with Asterisk 16. It probably doesn't work starting with Asterisk 14, as this is apparently the version where the very very lightly documented requirement for
AST_MODULE_SELF_SYM
has been introduced.https://issues.asterisk.org/jira/browse/ASTERISK-26278
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919828
The text was updated successfully, but these errors were encountered: