miconda created an issue (kamailio/kamailio#4552)

### Description

On Ubuntu 24.04, when using `cmake` to build the module, the `tlsa` is not 
linked against `libssl`, `libcrypto` and `libz` static libraries. I tested with 
latest git master branch, but I guess it is the same for 6.0.

I already pushed the commit 8006cc7d72b71b1e65c7f6eabead72593d03fcd6 because 
`tlsa` is supposed to be always linked against the static libs, not 
conditionally like `tls` (that is the solely purpose of `tlsa`, to ship an 
alternative to `tls` linked with static libs), but it does not fix it.

When using the old `Makefile`, the verbose linking command is:

``` shell
gcc -shared -g -pthread -Wl,-O2 -Wl,-E   -rdynamic "-ldl" 
-Wl,-Bsymbolic-functions tlsa_mod.o tls_bio.o tls_cfg.o tls_config.o 
tls_ct_wrq.o tls_domain.o tls_dump_vf.o tls_init.o tls_locking.o tls_rand.o 
tls_rpc.o tls_select.o tls_server.o tls_util.o tls_verify.o  -lm -l:libssl.a 
-l:libcrypto.a -l:libz.a   -o tlsa.so
```

When using the `cmake` variant, the command is:

``` shell
/usr/bin/cc -fPIC -g -shared -Wl,-soname,tlsa.so -o tlsa.so 
CMakeFiles/tlsa.dir/tls_bio.c.o CMakeFiles/tlsa.dir/tls_cfg.c.o 
CMakeFiles/tlsa.dir/tls_config.c.o CMakeFiles/tlsa.dir/tls_ct_wrq.c.o 
CMakeFiles/tlsa.dir/tls_domain.c.o CMakeFiles/tlsa.dir/tls_dump_vf.c.o 
CMakeFiles/tlsa.dir/tls_init.c.o CMakeFiles/tlsa.dir/tls_locking.c.o 
CMakeFiles/tlsa.dir/tls_rand.c.o CMakeFiles/tlsa.dir/tls_rpc.c.o 
CMakeFiles/tlsa.dir/tls_select.c.o CMakeFiles/tlsa.dir/tls_server.c.o 
CMakeFiles/tlsa.dir/tls_util.c.o CMakeFiles/tlsa.dir/tls_verify.c.o 
CMakeFiles/tlsa.dir/tlsa_mod.c.o  -Wl,-rpath,::::::::::::::::::::::: 
/usr/lib/aarch64-linux-gnu/libssl.so /usr/lib/aarch64-linux-gnu/libcrypto.so 
/usr/lib/aarch64-linux-gnu/libz.so -lpthread -ldl -lresolv
```

So the `cmake` variant is linking with the dynamic `*.so` libs, not with the 
static/archive `*.a` libs.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4552
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!

Reply via email to