libkolabxml on debian

Mihai Badici mihai at badici.ro
Fri Nov 18 11:29:58 CET 2022


Hello,

I use to compile from time to time the libkolabxml package on debian 
current .

The build of php wrapper was always a pain but I had no time to check 
the root cause until few weeks ago.

The problem is the strange way debian allocate the paths for php libs.

For example the .so are currently in /usr/lib/php/20190902/ and each 
build has another directory probably to ensure coexistence of multiple 
version.

The CMakeLists.txt use a lazzy guess method to find that path and fail. 
So I changed it that way to use php-config for this task ( you can 
remove some messages I added for debuging purposes).

Another issue is now debian will keep the dynamic libraries in /usr/lib, 
not in /usr/lib64 so "make install" will put them in the wrong folder

And finally, probably I still missed something because make install will 
put kolabformat.php in the dinamic lib folder instead of /usr/share/php 
where are the static libs . I was aware of that so I move them manually, 
didn't change the cmake file .

I guess this change will still work on redHat but I didn't tested yet. I 
used the master branch from the repo.

root at machinet:/usr/src# diff libkolabxml/src/php/CMakeLists.txt 
/root/machinet/webservices/CMakeLists.txt
6c6
<         COMMAND ${SWIG} -v -c++ -php -o 
${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE}  ../kolabformat.i
---
 >         COMMAND ${SWIG} -v -c++ -php7 -o 
${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE}  ../kolabformat.i
32c32
< if(NOT DEFINED PHP_INSTALL_DIR)
---
 > #if(NOT DEFINED PHP_INSTALL_DIR)
36a37,38
 >
 >
37a40,63
 >
 >
 >
 >  execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --vernum
 >                     OUTPUT_VARIABLE PHP_VERSION_ID
 >
 >       )
 >   message("version a: ${PHP_VERSION_ID}")
 >
 >  message("version a: ${PHP_CONFIG_EXECUTABLE}")
 >
 >
 > execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --include-dir
 >                     OUTPUT_VARIABLE PHP_INCLUDE_DIR
 >
 >         )
 >
 >   message("versionaa: ${PHP_INCLUDE_DIR}")
 >
 >
 > string(REGEX REPLACE "\n" "" PHP_INCLUDE_DIR "${PHP_INCLUDE_DIR}")
 > string(REGEX REPLACE "\n" "" PHP_VERSION_ID "${PHP_VERSION_ID}")
 >
 >
43c69
< endif()
---
 > #endif()
72a99,101
 >  message("include: ${PHP_INCLUDE_DIR}")
 >
 >   message("version: ${PHP_VERSION_ID}")

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/users/attachments/20221118/3f7dd786/attachment.html>
-------------- next part --------------
-- 
This mail was scanned by BitDefender
For more information please visit http://www.bitdefender.com/


More information about the users mailing list