xkaraman left a comment (kamailio/kamailio#4241)

> Yes, the module was linked dynamically.
> 
> ```
> ~ $ LD_PRELOAD=/usr/sbin/kamailio ldd /usr/lib/kamailio/modules/rabbitmq.so
>       /lib/ld-musl-x86_64.so.1 (0x7f1274453000)
>       /usr/sbin/kamailio => /usr/sbin/kamailio (0x7f1273f6d000)
>       librabbitmq.so.4 => /usr/lib/librabbitmq.so.4 (0x7f1273f58000)
>       libuuid.so.1 => /usr/lib/libuuid.so.1 (0x7f1273f4f000)
>       libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f1274453000)
>       libssl.so.3 => /usr/lib/libssl.so.3 (0x7f1273e82000)
>       libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x7f12739bd000)
> ```
> 
> That means the config script looks for statically linked libraries, but it is 
> not used for source compilation. This leads to installing the unnecessary 
> package `rabbitmq-c-static` on Alpine Linux. Can `cmake` configuration rules 
> be changed to test `rabbitmq-c` using dynamic linking? This will prevent to 
> installation unnecessary package `rabbitmq-c-static` on Alpine Linux.

I will see if i can request only the shared libraries. A workaround is to 
uninstall the package `static` after the building as it's not required and it 
only contains one file, the static version of the library! and probably, open 
an issue on upstream maintainer of the conflicts.



> [@xkaraman](https://github.com/xkaraman) could you check this commit 
> https://gitlab.alpinelinux.org/safarov/aports/-/commit/bc80020a6e5eb5e80035c1761b9bbef602f2e73d
> 
> For now, I am updating the mainstream packaging config file. Later, I will 
> push the same file to the Kamailio repo.

Looks good i think. Just a note on `make EMBEDDED_UTF8_DECODE=1 STUN=1 
FREERADIUS=1` to `cmake`.

You passed the freeradius correctly with the `-DRADIUSCLIENT`. You can provide 
`-DEMBEDDED_UTF8_DECODE` as well. I will have to verify `STUN` as well, but in 
any case if you want to pass any additional definitiosn that are not yet 
definied as an option in cmake, you can use `-DEXTRA_DEFS="DEF;DEF=VALUE"`. See 
https://www.kamailio.org/wikidocs/tutorials/cmake/custom/#other-feature-options

> One more issue
> 
> ```
> >>> kamailio: Analyzing dependencies...
> WARNING: opening /home/buildozer/packages/main/x86_64/APKINDEX.tar.gz: No 
> such file or directory
> ERROR: unable to select packages:
>   .makedepends-kamailio-20250819.082913:
>     masked in: cache
>     satisfies: world[.makedepends-kamailio=20250819.082913]
>   ninja-is-really-ninja (no such package):
>     required by: .makedepends-kamailio-20250819.082913[ninja-is-really-ninja]
> >>> ERROR: kamailio: builddeps failed
> >>> kamailio: Uninstalling dependencies...
> WARNING: opening /home/buildozer/packages/main/x86_64/APKINDEX.tar.gz: No 
> such file or directory
> ERROR: No such package: .makedepends-kamailio
> Handling artifacts
> ```
> 
> Alpine Linux CI/CD server uses only the `main` repo for package compilation. 
> When I switched to using CMake, I needed to install the 
> `ninja-is-really-ninja` package. But this package is located in the 
> `community` repo and cannot be used during the build process. More detail at 
> https://gitlab.alpinelinux.org/safarov/aports/-/jobs/1979005
> 
> Is it possible to update CMake rules and not use `Ninja`?

Yes, you can of course use `make` instead of `ninja`. See 
https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-G . 
Either the env variable 
[CMAKE_GENERATOR](https://cmake.org/cmake/help/latest/envvar/CMAKE_GENERATOR.html#envvar:CMAKE_GENERATOR)
 is set that chose `ninja`, or it's the default for alpine. You can of course 
choose the generator to `make` like `cmake -G Unix Makefiles [other_options]` 
to compile with make. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4241#issuecomment-3200107544
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/4241/3200107...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to