### Description i wants load this [config](https://github.com/nemergent/NG112LIS/blob/master/kamailio.cfg) on docker image `kamailio/kamailio-ci:5.1-alpine.debug`
During config parsing i got error 0(10) ERROR: <core> [core/sr_module.c:636]: load_module(): Symbol not found: exports 0(10) CRITICAL: <core> [core/cfg.y:3446]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 300, column 12-24: failed to load module
### Troubleshooting I checked symbol inside `app_perl.so` and cannot find `exports` ``` @a7c6ee5895f8:/usr/lib/kamailio/modules$ readelf -all /usr/lib/kamailio/modules/app_perl.so | grep export 000000218d00 000b00000006 R_X86_64_GLOB_DAT 0000000000000000 find_export + 0 000000218db8 002100000006 R_X86_64_GLOB_DAT 0000000000000000 find_export_record + 0 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND find_export 33: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND find_export_record 97: 00000000002190c0 96 OBJECT GLOBAL DEFAULT 18 _app_perl_exports ```
When make same test for other module then this sympols is exists ``` @a7c6ee5895f8:/usr/lib/kamailio/modules$ readelf -all /usr/lib/kamailio/modules/kazoo.so | grep export 0000002586a8 001200000006 R_X86_64_GLOB_DAT 0000000000000000 find_export + 0 18: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND find_export 187: 0000000000259260 96 OBJECT GLOBAL DEFAULT 21 exports ```
#### Reproduction start docker container ``` docker run --entrypoint=sh -it kamailio/kamailio-ci:5.1-alpine.debug ``` install tools ``` apk add wget binutils ``` copy config ``` wget https://raw.githubusercontent.com/nemergent/NG112LIS/master/kamailio.cfg -o /etc/kamailio/kamailio.cfg ``` start kamaillio and fix errors ``` kamailio -DD -E ```
#### Debugging Data none
#### Log Messages
``` 0(10) ERROR: <core> [core/sr_module.c:636]: load_module(): Symbol not found: exports 0(10) CRITICAL: <core> [core/cfg.y:3446]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 300, column 12-24: failed to load module 0(10) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <app_perl> found ```
#### SIP Traffic none
### Possible Solutions not known
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` @a7c6ee5895f8:/usr/lib/kamailio/modules$ kamailio -v version: kamailio 5.2.0-dev1 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 15:02:10 Mar 1 2018 with gcc 6.4.0 ```
* **Operating System**: Fedora 27 + docker 1.12
``` Linux a7c6ee5895f8 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 Linux ```
Issue not reproduce to when used `kamailio/kamailio:5.1.1-stretch` docker image. Think issue related to Alpine dist.
For some of the modules, the exports structure is named `_modname_exports` because of exporting with global scope and having naming conflicts.
Can you get the logs with debug=3? Just to confirm, because it should show that it lookups the _app_perl_exports.
Hello Daniel This is relevant log messages ``` 0(30) DEBUG: <core> [core/cfg.y:1659]: yyparse(): loading module app_perl.so 0(30) DEBUG: <core> [core/sr_module.c:575]: load_module(): trying to load </usr/lib/kamailio/modules/app_perl.so> 0(30) DEBUG: <core> [core/sr_module.c:634]: load_module(): looking up exports with name: _app_perl_exports 0(30) ERROR: <core> [core/sr_module.c:636]: load_module(): Symbol not found: exports 0(30) CRITICAL: <core> [core/cfg.y:3446]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 300, column 12-24: failed to load module ```
Can you try with the patch referenced above?
i tried laster `master` and get this results ``` 0(18) DEBUG: <core> [core/cfg.y:1659]: yyparse(): loading module app_perl.so 0(18) DEBUG: <core> [core/sr_module.c:575]: load_module(): trying to load </usr/lib/kamailio/modules/app_perl.so> 0(18) DEBUG: <core> [core/sr_module.c:633]: load_module(): looking up exports with name: _app_perl_exports 0(18) DEBUG: <core> [core/sr_module.c:651]: load_module(): /usr/lib/kamailio/modules/app_perl.so: exports dlflags interface is deprecated and it will not be 0(18) ERROR: <core> [core/sr_module.c:403]: version_control(): no version info in module </usr/lib/kamailio/modules/app_perl.so>: Symbol not found: exports ```
Pushed another patch for it, try again with latest master.
Now related `kamailio` logs strings ``` 0(52) DEBUG: <core> [core/cfg.y:1659]: yyparse(): loading module app_perl.so 0(52) DEBUG: <core> [core/sr_module.c:575]: load_module(): trying to load </usr/lib/kamailio/modules/app_perl.so> 0(52) DEBUG: <core> [core/sr_module.c:623]: load_module(): attempt to lookup exports structure failed - dlerror: Symbol not found: exports 0(52) DEBUG: <core> [core/sr_module.c:636]: load_module(): looking up exports with name: _app_perl_exports 0(52) DEBUG: <core> [core/sr_module.c:654]: load_module(): /usr/lib/kamailio/modules/app_perl.so: exports dlflags interface is deprecated and it will not be 0(52) DEBUG: <core> [core/sr_module.c:623]: load_module(): attempt to lookup exports structure failed - dlerror: Symbol not found: exports 0(52) DEBUG: <core> [core/sr_module.c:636]: load_module(): looking up exports with name: _app_perl_exports 0(52) DEBUG: <core> [core/cfg.lex:1736]: pp_define(): defining id: MOD_app_perl 0(52) DEBUG: <core> [core/cfg.y:1659]: yyparse(): loading module xhttp.so 0(52) DEBUG: <core> [core/sr_module.c:575]: load_module(): trying to load </usr/lib/kamailio/modules/xhttp.so> 0(52) DEBUG: <core> [core/kemi.c:1586]: sr_kemi_modules_add(): adding module: xhttp 0(52) DEBUG: <core> [core/sr_module.c:345]: register_module(): register PV from: xhttp ```
Looks as config loaded. Will do next tests
Look like perl script `LIS.pl` also loaded properly.
Can this commits be added to `5.1` branch?
Closed #1465.
They will be backported very soon. Thanks for testing.