joelsdc created an issue (kamailio/kamailio#4614)
### Description
The `geoip2` module fails to load on Debian Trixie (13) with Kamailio 6.1.0 due
to an undefined symbol `MMDB_open`. This indicates that `geoip2.so` is not
properly linked against `libmaxminddb` at build time, even though the library
is installed on the system.
Kamailio fails to start as a result, since the module cannot be loaded during
config parsing.
### Troubleshooting
#### Reproduction
1. Install Kamailio 6.1.0 on Debian 13 (Trixie) with the
`kamailio-geoip2-modules` package
2. Add `loadmodule "geoip2.so"` to the Kamailio configuration
3. Start Kamailio
Expected: Kamailio starts successfully with geoip2 module loaded.
Actual: Kamailio fails to start with `undefined symbol: MMDB_open`.
#### Debugging Data
```
N/A - not a crash/core dump, module fails at dlopen stage.
```
#### Log Messages
```
2026-03-03T18:17:58.320835-05:00 kamailio kamailio: ERROR: <core>
[core/sr_module.c:613]: ksr_load_module(): could not open module
</usr/lib/x86_64-linux-gnu/kamailio/modules/geoip2.so>:
/usr/lib/x86_64-linux-gnu/kamailio/modules/geoip2.so: undefined symbol:
MMDB_open
2026-03-03T18:17:58.322641-05:00 kamailio kamailio: CRITICAL: <core>
[core/cfg.y:4105]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 162, column 12-22: failed to load module
```
#### SIP Traffic
```
N/A - Kamailio does not start, no SIP traffic processed.
```
### Possible Solutions
The `geoip2.so` module likely needs to be explicitly linked against
`libmaxminddb` (`-lmaxminddb`) in its Makefile. The `MMDB_open` symbol is
provided by `libmaxminddb`, and the current build appears to rely on implicit
linking that doesn't resolve on Debian Trixie.
A potential fix would be to verify that `src/modules/geoip2/Makefile` includes
`-lmaxminddb` in its linker flags.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.1.0 (x86_64/Linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, DBG_QM_MALLOC, DBG_F_MALLOC,
DBG_TLSF_MALLOC, USE_FUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll.
id: unknown
compiled with gcc 14.2.0
```
* **Operating System**:
```
Linux kamailio 6.12.63+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.63-1
(2025-12-30) x86_64 GNU/Linux
Debian 13 (Trixie)
```
* **Required packages**:
```
root@kamailio:~# dpkg -l | grep maxmind
ii libmaxminddb0:amd64 1.12.2-1 amd64
IP geolocation database library
root@kamailio:~#
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4614
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!