[OpenSIPS-Devel] [OpenSIPS/opensips] 354ba0: Fix libdl linking typo to eliminate build warnings
Bogdan Andrei IANCU
noreply at github.com
Mon Nov 24 07:21:00 UTC 2025
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 354ba017ae966b80cabe91931671d626902e5119
https://github.com/OpenSIPS/opensips/commit/354ba017ae966b80cabe91931671d626902e5119
Author: Peter Lemenkov <lemenkov at gmail.com>
Date: 2025-10-24 (Fri, 24 Oct 2025)
Changed paths:
M modules/cachedb_mongodb/Makefile
M modules/db_http/Makefile
M modules/db_mysql/Makefile
M modules/rest_client/Makefile
Log Message:
-----------
Fix libdl linking typo to eliminate build warnings
During compilation, the following annoying warnings appear during
linking:
```
gcc -shared -fPIC -DPIC -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -Wl,-O2 -Wl,-E db_http.o http_dbase.o ssl_tweaks.o -ldl -lresolv -pthread -lcurl -dl -Bsymbolic -o db_http.so
lto1: warning: unrecognized gcc debugging option: l
lto1: warning: unrecognized gcc debugging option: l
```
They seems harmless but really noisy so after a little research I've
found that they were caused by the following lines in a several
Makefiles:
```
LIBS += -dl -Bsymbolic
```
These were adeed in a few commits, such as 149e69e3f67 and a3e87277f27.
Apparently the idea was to link against libdl e.g. `LIBS += -ldl`.
Although in most cases libdl is linked by default and there is no strict
requirement to specifically mention it (that's probably why nobody saw
it) it's better to link it explicitly to make the original intention
more clear.
Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
Commit: 6d784ce4501179f9aa573209cc8065dce989a195
https://github.com/OpenSIPS/opensips/commit/6d784ce4501179f9aa573209cc8065dce989a195
Author: Bogdan Andrei IANCU <bogdan at opensips.org>
Date: 2025-11-24 (Mon, 24 Nov 2025)
Changed paths:
M modules/cachedb_mongodb/Makefile
M modules/db_http/Makefile
M modules/db_mysql/Makefile
M modules/rest_client/Makefile
Log Message:
-----------
Merge pull request #3744 from lemenkov/libdl_link_typo
Fix libdl linking typo to eliminate build warnings
Compare: https://github.com/OpenSIPS/opensips/compare/dfcb6992c1c4...6d784ce45011
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list