From https://github.com/kamailio/kamailio/actions/runs/12265962282
```
CC (gcc) [M db_sqlite.so] dbase.o
dbase.c: In function 'db_sqlite_close':
dbase.c:157:25: error: passing argument 2 of 'db_do_close' from incompatible pointer type [-Wincompatible-pointer-types]
157 | db_do_close(_h, db_sqlite_free_connection);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(struct sqlite_connection *)
In file included from ../../lib/srdb1/db_ut.h:37,
from dbase.c:28:
../../lib/srdb1/db.h:495:40: note: expected 'void (*)(struct pool_con *)' but argument is of type 'void (*)(struct sqlite_connection *)'
495 | void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [../../Makefile.rules:100: dbase.o] Error 1
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4064
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4064(a)github.com>
Module: kamailio
Branch: master
Commit: a08da7b34b01f4b0a579fbfdc141bf2944613736
URL: https://github.com/kamailio/kamailio/commit/a08da7b34b01f4b0a579fbfdc141bf2…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-12-10T14:39:03Z
cmake: Use evaluated full paths from cmake for correct handling of special cases
---
Modified: cmake/defs.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/a08da7b34b01f4b0a579fbfdc141bf2…
Patch: https://github.com/kamailio/kamailio/commit/a08da7b34b01f4b0a579fbfdc141bf2…
---
diff --git a/cmake/defs.cmake b/cmake/defs.cmake
index 4214ef57121..bb9a0b680a7 100644
--- a/cmake/defs.cmake
+++ b/cmake/defs.cmake
@@ -6,8 +6,6 @@ cmake_minimum_required(VERSION 3.10)
add_library(common INTERFACE)
-message(STATUS "CMAKE_C_COMPILER_VERSION: ${CMAKE_C_COMPILER_VERSION}")
-
set(OS ${CMAKE_SYSTEM_NAME})
message(STATUS "OS: ${OS}")
@@ -109,6 +107,10 @@ if(NOT ${LIBSSL_SET_MUTEX_SHARED})
STATUS
"Checking if can enable workaround for libssl 1.1+ to set shared mutex attribute"
)
+
+ # TODO: This can probably be reduced to a just a find_package(OpenSSL) call
+ # and then check the version
+ # If we are cross-compiling, cmake should search for library on the target or both target/host
if(NOT DEFINED CMAKE_CROSSCOMPILING OR NOT ${CMAKE_CROSSCOMPILING})
message(STATUS "Checking for OpenSSL 1.1.0")
find_package(OpenSSL 1.1.0)
@@ -306,11 +308,11 @@ target_compile_definitions(
${TARGET_ARCH}
__OS_${OS_LOWER}
VERSIONVAL=${VERSIONVAL}
- CFG_DIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}/${CFG_NAME}/"
- SHARE_DIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${MAIN_NAME}/"
+ CFG_DIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}/${CFG_NAME}/"
+ SHARE_DIR="${CMAKE_INSTALL_FULL_DATADIR}/${MAIN_NAME}/"
# Absolute path this run is always /var/run/kamailio either for local or
# system installs
- RUN_DIR="/${CMAKE_INSTALL_LOCALSTATEDIR}/run/${MAIN_NAME}"
+ RUN_DIR="${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/${MAIN_NAME}"
${LOCK_METHOD}
# Module stuff?
PIC