Module: kamailio
Branch: master
Commit: 58bd1b995a1bf36eb1efebbd2e091e0dc9ca716c
URL: https://github.com/kamailio/kamailio/commit/58bd1b995a1bf36eb1efebbd2e091e0…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-12-19T17:49:13Z
cmake: Fix modules suffix to .so for all OS
---
Modified: src/modules/CMakeLists.txt
---
Diff: https://github.com/kamailio/kamailio/commit/58bd1b995a1bf36eb1efebbd2e091e0…
Patch: https://github.com/kamailio/kamailio/commit/58bd1b995a1bf36eb1efebbd2e091e0…
---
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index fe13a88f537..a1b474a4502 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -65,6 +65,8 @@ function(add_module_group group_modules)
add_subdirectory(${module_path})
# Remove the 'lib' prefix from the module name
set_target_properties(${module_name} PROPERTIES PREFIX "")
+ # Set suffix to .so always
+ set_target_properties(${module_name} PROPERTIES SUFFIX ".so")
# Add this policy to new so we can use target_link_libraries(... PRIVATE
# ...) to link against targets defined in children directories
Do we expect a local kamailio to use /var/run/kamailio as it's `run` directory or use `build_folder/run`? if then, then kamailio must be run as `sudo` since it affects root files and folders.
If you do not provide it the default prefix is `/usr/local`, so even if its not installed it will use that when running it, so it must therefore have sudo access and the directory already created (I think).
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/1860420fea7ed57d25bc7d735b46c11…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/1860420fea7ed57d25bc7d735b46c11c739aa0c4/150535640(a)github.com>
On darwin (macos), as I tested the usual commands I do when developing/testing, with the version before my commit I got the error:
```
0(44284) ERROR: <core> [main.c:3141]: main(): failed to create runtime dir /usr/local/var/run/kamailio, check directory permissions
```
It was simply after `mkdir buildmac; cd buildmac; cmake ..; make` and then running locally, not doing the make install.
Also, as I tested on the Ubuntu 24.04, I got similar situation:
```
0(562038) DEBUG: jsonrpcs [jsonrpcs_fifo.c:570]: jsonrpc_fifo_mod_init(): fifo path is [/usr/local/var/run/kamailio/kamailio_rpc.fifo]
0(562038) DEBUG: jsonrpcs [jsonrpcs_fifo.c:157]: jsonrpc_init_fifo_file(): testing if fifo file exists ...
0(562038) ERROR: jsonrpcs [jsonrpcs_fifo.c:72]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=432)
```
MacOS is not a GNU System, but Ubuntu should be, so I don't know what actually happens -- I just compared with the old-makefiles to figure out a solution.
Furthermore, I think that the recommended standard path for runtime folders on Linux'es is now `/run/` no longer `/var/run/`, I remember that we had to do such change (also checking the ubunut, /var/run is a synlink to /run -- @linuxmaniac: am I right here?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/1860420fea7ed57d25bc7d735b46c11…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/1860420fea7ed57d25bc7d735b46c11c739aa0c4/150535482(a)github.com>