#### Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [x] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: - [x] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description latest `make` version does not evaluate variables immediately. PR explicitly evaluates the LIBS makefile variable. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4085
-- Commit Summary --
* app_python3: evaluate LIBS variable imediately in Makefile
-- File Changes --
M src/modules/app_python3/Makefile (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4085.patch https://github.com/kamailio/kamailio/pull/4085.diff
This PR to fix error messages like ``` [root@nout app_python3]# make clean && make /bin/sh: line 1: --ldflags: command not found /bin/sh: line 1: --ldflags: command not found CC (gcc) [M app_python3.so] app_python3_mod.o CC (gcc) [M app_python3.so] apy_kemi.o CC (gcc) [M app_python3.so] apy_kemi_export.o CC (gcc) [M app_python3.so] python_exec.o CC (gcc) [M app_python3.so] python_msgobj.o CC (gcc) [M app_python3.so] python_support.o LD (gcc) [M app_python3.so] app_python3.so ```
@sergey-safarov pushed 28 commits.
ce81db002834e92f88a0291b384800321a483e3a app_python3s: evaluate LIBS variable imediately in Makefile a6df1199c6df4547c8cd3dbd8f612d47e513d955 dialplan: evaluate LIBS variable imediately in Makefile 24881af69d57ec9992802529fb5e1912ce3eb697 lcr: evaluate LIBS variable imediately in Makefile 7389c0d47a70e5fde0add853d5ded3313962776e regex: evaluate LIBS variable imediately in Makefile afc066aedef1c08a3f1cc1c10a5dc15501b0183f auth_ephemeral: evaluate LIBS variable imediately in Makefile e5f57d25540c8088db7d83a0b3b526b6c60e34b5 cnxcc: evaluate LIBS variable imediately in Makefile 2117b9fe75ea5f7a621f5e822176bc9fa818257d cplc: evaluate LIBS variable imediately in Makefile 760a4d8ad326f7b91508376f78d46537bed27ece gzcompress: evaluate LIBS variable imediately in Makefile 20224dc980c2ce1055680cbcb0d3eb4bb345e80b http_async_client: evaluate LIBS variable imediately in Makefile 99947391e275b8be3490bf9cc010d0313b4a0e57 cdp: evaluate LIBS variable imediately in Makefile e488474aae296fdff79a035bd294ce7129d6d131 ims_auth: evaluate LIBS variable imediately in Makefile 3c0233597b3e7e5b3d8ca9d4f15ea6100f16bbd7 ims_isc: evaluate LIBS variable imediately in Makefile e6a384d50e8cf8b898fdd7e712133c01edb8ef52 ims_icscf: evaluate LIBS variable imediately in Makefile 272f41234a4ef6d14b2e59efa98761dee5817eac ims_registrar_pcscf: evaluate LIBS variable imediately in Makefile b963672b4352a02608541d9bc9d8d8ad2a623de1 ims_registrar_scscf: evaluate LIBS variable imediately in Makefile ae288defe127e7037c56e98cb2eea720a2a60c7b ims_ipsec_pcscf: evaluate LIBS variable imediately in Makefile 0ec8cc434dfe48d99d27c64f382f79f62f8bb0b3 jansson: evaluate LIBS variable imediately in Makefile 2dd015e2ee213eae2f5ebe474f137c883773e446 jwt: evaluate LIBS variable imediately in Makefile 6b46415734c9cbe9b5c46067a9caaef4fb922ff3 kazoo: evaluate LIBS variable imediately in Makefile dda87b136bddd6719614b554f1e5ebae15e19538 lwsc: evaluate LIBS variable imediately in Makefile e634661ec22f6fdc984c8c625a6705b78b28d628 memcached: evaluate LIBS variable imediately in Makefile 1c4fcec21aefabe0101160aaba280df371908251 db_mongodb: evaluate LIBS variable imediately in Makefile 903b48c2d3b0c6b279ad1d48cd15248c5c12e19e db_mysql: evaluate LIBS variable imediately in Makefile 045cca74f3af541fe51e8965e206750e61e741ac outbound: evaluate LIBS variable imediately in Makefile e875f3bccf1e7488b411b617f736666df02b4328 db_postgres: evaluate LIBS variable imediately in Makefile 2eb32f7928a362b75b796434967afc68c2d5d553 presence: evaluate LIBS variable imediately in Makefile 3d1f21080e0cdaa2f24d5d95dd9e71ab0482d4fb presence_conference: evaluate LIBS variable imediately in Makefile 545d289846766dd3dd275ecfeb3af90edd3b42b3 evaluate LIBS variable imediately in Makefile
@sergey-safarov pushed 55 commits.
708203b53fb648dbbbbbeff84ec132275121e58f regex: evaluate LIBS variable imediately in Makefile 7bfaf9d1420b5c5f5de6d40b4f535fe20efbb4ae auth_ephemeral: evaluate LIBS variable imediately in Makefile 2a6a980d55f921403418c7b84cf85d12784ba26c cnxcc: evaluate LIBS variable imediately in Makefile f9cdf1eca8750e948ec07b9bd84a3112d88bbca7 cplc: evaluate LIBS variable imediately in Makefile 80e80c0c2729b4e9c196e8c2caecdaa3694fc310 gzcompress: evaluate LIBS variable imediately in Makefile a4339296ae264191e1013cfeaf2f0127edfce22f http_async_client: evaluate LIBS variable imediately in Makefile 077fb1a82bb509845871268c0f6cff25f835cad0 cdp: evaluate LIBS variable imediately in Makefile 7ecc80b39972efc81f780771b8b3e6ed5e3fb44a ims_auth: evaluate LIBS variable imediately in Makefile 1f90b812c54b64a4cf259e9e4eac78493cf9d376 ims_isc: evaluate LIBS variable imediately in Makefile 770a4d932b13e1ca76ee7b252d9cdcc984180650 ims_icscf: evaluate LIBS variable imediately in Makefile 15d4ae2a651ae46480785f3867e2c6dc90adf43e ims_registrar_pcscf: evaluate LIBS variable imediately in Makefile f7f66fae581a480aecd86e2483b285a75f2bcbb7 ims_registrar_scscf: evaluate LIBS variable imediately in Makefile 8728aafb4679efb00e13e675501ac0caa8cbba49 ims_ipsec_pcscf: evaluate LIBS variable imediately in Makefile 2d2343468088da95364d0fe8ffe13213d43a564f jansson: evaluate LIBS variable imediately in Makefile c140c5c11148e8249d25d651c3d0060748cefbef jwt: evaluate LIBS variable imediately in Makefile df6f7b8fa468c4a1312db53772a53aca23b79a1a kazoo: evaluate LIBS variable imediately in Makefile 1ac48aa8b1a0693ec0947c9893a0ce57a8a45115 lwsc: evaluate LIBS variable imediately in Makefile bee238b1540a9b35c23ef8ccde962039f4481bff memcached: evaluate LIBS variable imediately in Makefile fc4223738af30b9b5cf821ae24d84d6ba036d087 db_mongodb: evaluate LIBS variable imediately in Makefile d902dcc9659d97fbc463f62fbff3abfff8c3ab25 db_mysql: evaluate LIBS variable imediately in Makefile 4cd6e25c8ca17c00059d449094687f776e2281cc outbound: evaluate LIBS variable imediately in Makefile bc921db812ceca69aa2e75481789ec93a7c8d5f7 db_postgres: evaluate LIBS variable imediately in Makefile b9ae997eee07472a95408493d803693622e87569 presence: evaluate LIBS variable imediately in Makefile 6dca128236a49ee3949e112e55aec6b370f580b6 presence_conference: evaluate LIBS variable imediately in Makefile 19c37772edc29ad473f55c6273eeb0aed01dd251 presence_dialoginfo: evaluate LIBS variable imediately in Makefile 164eca0f048c307207715dc0e0822ec8b0f889ad presence_reginfo: evaluate LIBS variable imediately in Makefile 0b1f7b935d6fac8cd56a0938bf865e4b1b906a67 presence_dfks: evaluate LIBS variable imediately in Makefile a3dca4f0ae8c076ce1715916c40ee7d61d51e5de pua: evaluate LIBS variable imediately in Makefile 93fb83a0d20a8db05545a03879b437d7b129baac pua_bla: evaluate LIBS variable imediately in Makefile a5f8b347f8c20102129016d2b56da8bf0d23fdad pua_dialoginfo: evaluate LIBS variable imediately in Makefile 7a6f49ca4b79cfe8ab13d5150fc5747efb26a1b4 pua_reginfo: evaluate LIBS variable imediately in Makefile e9d5915e0507f8f3d45845ef05cf56e1262167fd pua_usrloc: evaluate LIBS variable imediately in Makefile 2723f2f2cd900fc7ff919ec5b24523922182eaf8 pua_xmpp: evaluate LIBS variable imediately in Makefile e49f23abb519285ebe70bb6ef7fe693d2f7d9909 rls: evaluate LIBS variable imediately in Makefile a5057c0a0b384752fcda8481f7b9b6b768850ca9 evaluate LIBS variable imediately in Makefile f19d446c3f41840f04ee7e8bef906b29301a173a rabbitmq: evaluate LIBS variable imediately in Makefile acdfd9377bdde9a66b5f3d53e5e00b0cdd19e493 db_redis: evaluate LIBS variable imediately in Makefile 1bacaf1319039dbabff80deefa63e9423c28104c ndb_redis: evaluate LIBS variable imediately in Makefile 813aca8e560272a14bfec48e5602f3868aa24b9b topos_redis: evaluate LIBS variable imediately in Makefile 49c125e59f36b11b6e77a07ea27671de883178ba app_ruby: evaluate LIBS variable imediately in Makefile 061aa512e4683c3ddc912362850d55d1c3dca283 app_ruby_proc: evaluate LIBS variable imediately in Makefile 653b78d65e9a6b00153286faa7a3558cbc2d7027 log_systemd: evaluate LIBS variable imediately in Makefile a99797aecaf5706cea87ca94e6a5381a09588b43 systemdops: evaluate LIBS variable imediately in Makefile 95a44285684d5f1b31dc2a6e714206e1d9558e31 crypto: evaluate LIBS variable imediately in Makefile e1d67c083201da32509ce5a929b3844dc4d79cbe tls: evaluate LIBS variable imediately in Makefile 835c9180624214ab03a70d5db2a7b952982f8d50 db_unixodbc: evaluate LIBS variable imediately in Makefile 8d048d27473a816b0b021e1c39b18f247e887acd utils: evaluate LIBS variable imediately in Makefile 684e206974f68e11d3bfbd48820325976acafa41 http_client: evaluate LIBS variable imediately in Makefile e015effac52b15d3b4a0f025f0d6c5b0da8a2396 lost: evaluate LIBS variable imediately in Makefile 02b960ceba062805ce6ad6158e1e9a49c85a7d19 slack: evaluate LIBS variable imediately in Makefile 4d1fb8e10cb2f6cb6da415c8b93ea34797eefb4b websocket: evaluate LIBS variable imediately in Makefile d6d3e24fafe568bcaa172f7353a96833f7678570 xhttp_pi: evaluate LIBS variable imediately in Makefile 15c5f3ad9738b03954dbf93a239ba1c3b69f5e6f xmlrpc: evaluate LIBS variable imediately in Makefile 6abf047abbc5cfd85a8903851c243f1343233b0e xmlops: evaluate LIBS variable imediately in Makefile 17e0340f8a669d72052f49e27934d75e5cb60275 uuid: evaluate LIBS variable imediately in Makefile
@sergey-safarov pushed 2 commits.
b8611c45be786ec1fb41a83764cdcd026ee2a34b ndb_mongodb: evaluate LIBS variable imediately in Makefile 4ebfa3a8b04de564c44f0309ab4ff12b035ec4ee presence_xml: evaluate LIBS variable imediately in Makefile
For the future the plan is to use cmake-based building system, which is already in git master branch:
- https://www.kamailio.org/wikidocs/tutorials/cmake/
The old-makefiles are obsoleted and should be used only for very old distros, where cmake version is not compatible with what is needed for kamailio in a simple way.
Otherwise, this change is quite intrusive, is this the only way to get it done? I would expect a lot of projects using directly makefiles to be affected. Maybe some option to `make` command to behave like before?!?
Generally `cmake` should help here. I have read the provided documentation link and and it is not clean how to compile `kazoo` module using `cmake`. Could you clarify how to compile and install optional modules. I have used commands ```sh cmake -S . -B build cmake --build build sudo cmake --install build ``` Also I do not see packaged README files ``` RPM build errors: File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/INSTALL File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/README File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.acc File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.acc_diameter File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.alias_db File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.app_jsdt File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.async File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.auth File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.auth_db File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.auth_diameter File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.avp ```
I see commit c8544e48710fa74150b958a1f8d1e918973afb51. I will recheck README.
With c8544e48710fa74150b958a1f8d1e918973afb51 commit I also do not see `README` files after the install command.
There have been several changes to the cmake related to the README building. If you are still having issues with the cmake build, please create a new issue for it.
The problem seems that `make install` with `cmake` does not install the README files for modules - they were in share doc folder like README.acc, README.auth ... and included in rpms:
- https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/obs/kamailio.s...
Right, it needs to be investigate if cmake does it similarly.
henning@app01:/usr/local/kamailio-devel$ ls -la share/doc/kamailio/modules/ total 2608 drwxr-xr-x 2 root root 4096 Dec 30 09:08 . drwxr-xr-x 3 root root 4096 Dec 30 09:08 .. -rw-r--r-- 1 root root 45797 Dec 30 09:08 README.acc -rw-r--r-- 1 root root 5010 Dec 30 09:08 README.acc_diameter -rw-r--r-- 1 root root 8579 Dec 30 09:08 README.alias_db ...
Hey @sergey-safarov,
In order for `make install` to install the documentation for the modules, they have to build first. Since the generation of the docs is not included in the default target (see https://github.com/kamailio/kamailio/commit/8a37acb07317d42dc3254ae5ed47573d...), one should explicitly build them using `make kamailio_docs` while in the build folder.
If they docs have been built, then the `make install` will install the `READMES.module-name` where you have described.
I have read the provided documentation link and and it is not clean how to compile kazoo module using cmake.
Could you clarify how to compile and install optional modules.
Regarding this, check out: 1. https://www.kamailio.org/wikidocs/tutorials/cmake/custom/ 2. https://www.kamailio.org/wikidocs/tutorials/cmake/commands/
You have to provide the option(s) during the configuration phase of cmake.
@xkaraman: is it possible that the install takes the README files from the source tree modules' folders? They are up to date, being automatically built and pushed to git repo when someone changes the xml files, they do not need to be generated at compile time.
This is done by a script on server to have coherent format, because each distro can have different xsl and xml template files/tools versions, they looked different based on where they were generated. For example, a simple typo/spell fix to xml might result in a huge formatting change in the generated README. Then each module resulted in different README styles (e.g., some with ToC, some without, different spacing for identation, etc.). Therefore several years ago it was decided to generate the readme files on server, being pushed to git repo by a generic account -- see an example commit done by it:
- https://github.com/kamailio/kamailio/commit/5c48fb7ba1b6e7d516d6f5dad50f8c0a...
@miconda After 2692148d92bb8b17709eb4cbddd8e653bbf5c14a, this should be the behavior.
`make install` we now install the README found in `src/modules/*/README` in the `share` folder.
@xkaraman I have added "-DBUILD_DOC=ON" for cmake build command and now can see generated modules README fils in the installed, but not present "README" file ``` [root@nout SPECS]# ls -l /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/ | head total 1124 -rw-r--r--. 1 root root 12716 Dec 24 16:13 README.async -rw-r--r--. 1 root root 36571 Dec 24 16:13 README.auth -rw-r--r--. 1 root root 5331 Dec 24 16:13 README.auth_xkeys -rw-r--r--. 1 root root 10581 Dec 24 16:13 README.benchmark -rw-r--r--. 1 root root 4685 Dec 24 16:13 README.blst -rw-r--r--. 1 root root 8304 Dec 24 16:13 README.cfg_rpc -rw-r--r--. 1 root root 6488 Dec 24 16:13 README.cfgt -rw-r--r--. 1 root root 20029 Dec 24 16:13 README.cfgutils -rw-r--r--. 1 root root 31985 Dec 24 16:13 README.corex ``` What are the correct options to build and install "README" file?
The README and INSTALL files are the ones from root folder of kamailio source tree. They are not generated, just copied over -- I assume you meant the ones here:
- https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/obs/kamailio.s...
I have also added `-DINCLUDE_MODULES="htable tls topos_htable kazoo"` and now ``` + /usr/bin/cmake --install redhat-linux-build -- Install configuration: "Release" -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/sbin/kamailio -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/kamailio.cfg -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/modules/htable.so -- Set non-toolchain portion of runtime path of "/root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/modules/htable.so" to "/usr/lib64/kamailio" -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.htable -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/modules/tls.so -- Set non-toolchain portion of runtime path of "/root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/modules/tls.so" to "/usr/lib64/kamailio" -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/doc/kamailio/modules/README.tls -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/modules/topos_htable.so -- Set non-toolchain portion of runtime path of "/root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/modules/topos_htable.so" to "/usr/lib64/kamailio" CMake Error at redhat-linux-build/src/modules/cmake_install.cmake:135 (file): file INSTALL cannot find "/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/topos_htable/README": No such file or directory. Call Stack (most recent call first): redhat-linux-build/src/cmake_install.cmake:89 (include) redhat-linux-build/cmake_install.cmake:47 (include) ``` But `topos_htable` is listed for build in the `INCLUDE_MODULES`.
Hey @sergey-safarov
What are the correct options to build and install "README" file?
The README and INSTALL files are the ones from root folder of kamailio source tree. They are not generated, just copied over -- I assume you meant the ones here:
This must be an oversight on my part and I didn't include them at all in the installation. I will adopt so they are also installed as well.
I have executed "make kamailio_docs" inside build folder but this generate error
Hmm, that needs to be investigated. Can't clearly see why it fails.
I have also added -DINCLUDE_MODULES="htable tls topos_htable kazoo" and now
So regarding this: 1. `/usr/bin/cmake --install folder` does not force build if not built already. Just a note on this. It's assuming everything that needs to be installed is already built/exists as a file and so on. Therefore before `--install`, `--build` must have been called. 2. After including the modules, you should and I guess you did `--build`. But the docs and the README generations are not in the default target. You should create the docs using the above command that failed for some reason `make kamailio_docs` for HTML and text generation AND a separate command `make <module_name>_readme` to create the READMEs found in the source tree. 3. > file INSTALL cannot find "/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/topos_htable/README":
I just looked over the Kamailio repo. There is no README file inside the module folder, so there is nothing to install. I don't know why there is no README there since the server should have committed one. @miconda needs to investigate this. So, in order for the README to be created and available for install, it should be `make topos_htable_readme`, and then installing again should pick up the file and copy it accordingly.
Thanks @xkaraman for clarification. I have addded next command and readme for `topos_htable` generated. ``` /usr/bin/cmake --build redhat-linux-build -j 1 --target topos_htable_readme ``` Is possible to add targed like `kamailio_docs_readme` and regenerate all raadme files for all modules (including listed in `DINCLUDE_MODULES`). This will allow build reame, and not copy present in the repo.
Remaining files to install ``` File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/dictionary.kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/pi_framework.xml File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/tls.cfg Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/var/lib/kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/sbin/kamcmd Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/kamctl/dbtextdb File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/kamctl/dbtextdb/dbtextdb.py File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/man/man5/* File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/man/man8/* Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio/* ```
Looks like command for man files generation does not work as expected ``` [root@nout kamailio-6.0.0-pre0]# /usr/bin/cmake --build redhat-linux-build -j 1 --target man Change Dir: '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build'
Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile -j1 man gmake: *** No rule to make target 'man'. Stop. ``` And target `db_text` does not install all required files. Also required package `kamcmd` utility.
Thanks @xkaraman for clarification. I have added the next command and readme generated for the `topos_htable`.
/usr/bin/cmake --build redhat-linux-build -j 1 --target topos_htable_readme
Is it possible to add target like `kamailio_docs_readme` and regenerate readme files for all modules (including those listed in `DINCLUDE_MODULES`)? This will allow build readme, and not copy present in the repo.
Yep, that will be a nice and easy addition. Will add it soon.
Remaining files to install
File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/dictionary.kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/pi_framework.xml File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/tls.cfg File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/sbin/kamcmd Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/kamctl/dbtextdb File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/kamctl/dbtextdb/dbtextdb.py File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/man/man5/* File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/man/man8/* Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio/*
Hmm, nice list to look for what is not installed and needed. Will pick it up.
Looks like the command for `man` files generation does not work as expected
[root@nout kamailio-6.0.0-pre0]# /usr/bin/cmake --build redhat-linux-build -j 1 --target man Change Dir: '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile -j1 man gmake: *** No rule to make target 'man'. Stop.
Yeah, I haven't implement yet the `man` target even though I added it to the available targets. Coming soon as well.
And target `db_text` does not install all required files. Probable required command like
make -C src/modules/db_text install-scripts
The same command is needed for modules
[root@nout kamailio-6.0.0-pre0]# find . -name "Makefile" -exec grep install-scripts {} \; | sed -e 's/.* install-//' -e 's/-scripts//' perl berkeley mysql-script mysql oracle pgsql redis sqlite dbtext
Ahh, didn't know about this. I will see what it can be done with them.
Also required package `kamcmd` utility.
Sure, that one was also on the TODO list.
Is it possible to add target like `kamailio_docs_readme` and regenerate readme files for all modules (including those listed in `DINCLUDE_MODULES`)? This will allow build readme, and not copy present in the repo.
You can now do this by building the target `kamailio_docs_readme`. This will generate the README files and replace the ones in the source tree for all modules included in the configuration phase.
Looks like the command for `man` files generation does not work as expected
[root@nout kamailio-6.0.0-pre0]# /usr/bin/cmake --build redhat-linux-build -j 1 --target man Change Dir: '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile -j1 man gmake: *** No rule to make target 'man'. Stop.
Target `man` is now available. It generates all related files for core, kamctl and kamdbctl, kamcmd, and modules. You can also build them separately by using targets `kamctl_man` for `kamctl`, `kamcmd_man` for `kamcmd`, and `kamailio_docs_man` for the modules.
Also required package `kamcmd` utility.
`kamcmd` is also now build and installed by default and separately by `kamcmd` target.
Thanks @xkaraman Targets `kamailio_docs_readme` and `man` works for me, `kamcmd` utility is also packaged.
When I try compile `db_berkeley`, then I see this error in the log ``` -- Extra modules (if module already included already from group is ignored): pvtpl;pua_rpc;siprepo;systemdops;log_systemd;db_text;acc_json;auth_ephemeral;jansson;db_berkeley -- Excluded modules (exlcude even if in included modules):
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.3.0") -- Checking for module 'libsystemd' -- Found libsystemd, version 256 -- Checking for module 'jansson' -- Found jansson, version 2.13.1 CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find BerkeleyDB (missing: BerkeleyDB_LIBRARY BerkeleyDB_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) cmake/modules/FindBerkeleyDB.cmake:147 (find_package_handle_standard_args) src/modules/db_berkeley/CMakeLists.txt:6 (find_package) ``` But depend libs is present in the system ``` [root@nout SPECS]# rpm -qa | grep libdb libdb-5.3.28-63.fc41.x86_64 libdb-devel-5.3.28-63.fc41.x86_64 ```
Also I found need to package `/usr/sbin/kambdb_recover`.
For info, I still use ``` make cfg prefix=/usr \ basedir=%{buildroot} \ cfg_prefix=%{buildroot} \ doc_prefix=%{buildroot} \ doc_dir=%{_docdir}/kamailio/ \ cfg_target=%{_sysconfdir}/kamailio/ modules_dirs="modules" make -C src/modules/db_text install-scripts make -C src/modules/tls install-cfg ``` You probably want to implement this using CMake commands.
Hey @sergey-safarov,
After https://github.com/kamailio/kamailio/commit/ade4c37d8098699422e76bf0c931610d..., the necessary files should be installed along with the included modules.
Both the schemas for the database type and their necessary scripts for kamctl should be installed.
Just make sure to include the modules to be built and **also build** the `dbschema` target since it's not in the `all`/default target. This maybe can be avoided, if I copied from the source tree. Are those updated as well if there is a change in XML schemas files @miconda?
When I try compile db_berkeley, then I see this error in the log
-- Extra modules (if module already included already from group is ignored): pvtpl;pua_rpc;siprepo;systemdops;log_systemd;db_text;acc_json;auth_ephemeral;jansson;db_berkeley -- Excluded modules (exlcude even if in included modules): -- Found PkgConfig: /usr/bin/pkg-config (found version "2.3.0") -- Checking for module 'libsystemd' -- Found libsystemd, version 256 -- Checking for module 'jansson' -- Found jansson, version 2.13.1 CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find BerkeleyDB (missing: BerkeleyDB_LIBRARY BerkeleyDB_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) cmake/modules/FindBerkeleyDB.cmake:147 (find_package_handle_standard_args) src/modules/db_berkeley/CMakeLists.txt:6 (find_package)
Hmm, the `FindBerkeleyDB` in the `cmake` folder is responsible to find the database in various systems. This was taken from an online source, hoping it was general enough. It probably didn't account for your OS.
Can you maybe check if by replacing its content with from [FindBerkeleyDB.cmake](https://github.com/sum01/FindBerkeleyDB/blob/master/FindBerkeleyDB.cmake), fixes your error?
Also I found need to package /usr/sbin/kambdb_recover.
This is the one found in `util` folder right? I will translate the Makefile to CMake and install it as well.
Remaining files yet are: ``` File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/dictionary.kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/pi_framework.xml File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/tls.cfg Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/kamctl/dbtextdb File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/lib64/kamailio/kamctl/dbtextdb/dbtextdb.py ```
About `dbtextdb`. In the source tree present module `db_dbtext` and no module `db_dbtextdb`. But `kamctl` utility present `dbtext` and `dbtextdb`. https://github.com/kamailio/kamailio/tree/master/utils/kamctl/dbtextdb
Looks like `dbtext` installed properly. But `dbtextdb` is not.
About `db_berkeley` error. On rpm-based systems presents two Berkley-related devel packages
libdb-devel libdb-cxx-devel
in this files present this devel files
[root@nout SPECS]# rpm -ql libdb-devel /usr/include/db.h /usr/include/db_185.h /usr/include/libdb /usr/include/libdb/db.h /usr/include/libdb/db_185.h /usr/lib64/libdb.so [root@nout SPECS]# rpm -ql libdb-cxx-devel /usr/include/db_cxx.h /usr/include/libdb/db_cxx.h /usr/lib64/libdb_cxx.so
For Kamailio build required 'C' version devel files. But cmake file used `C++` version. Could you make change like
diff --git a/cmake/modules/FindBerkeleyDB.cmake b/cmake/modules/FindBerkeleyDB.cmake index d625ff410f..423230ff2e 100644 --- a/cmake/modules/FindBerkeleyDB.cmake +++ b/cmake/modules/FindBerkeleyDB.cmake @@ -45,7 +45,7 @@ endif() find_path( BerkeleyDB_INCLUDE_DIR - NAMES db_cxx.h + NAMES db.h HINTS ${_BerkeleyDB_homebrew_prefix}/include PATH_SUFFIXES 4.8
Similar devel files are used here https://github.com/sum01/FindBerkeleyDB/blob/master/FindBerkeleyDB.cmake#L54
Great, thanks for the fix! I pushed it master!
About `dbtextdb`. In the source tree present module `db_dbtext` and no module `db_dbtextdb`. But in the `kamctl` utility present `dbtext` and `dbtextdb`. https://github.com/kamailio/kamailio/tree/master/utils/kamctl/dbtextdb
Looks like `dbtext` installed properly. But `dbtextdb` is not.
Yeah, sorry I missed that part! Should also be installed now!
All files should be there now! Keep me posted if anything is still missing!
I have rebuild RPM packages using master and cmake. Now I can see error messages. ``` RPM build errors: File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/pi_framework.xml File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/etc/kamailio/tls.cfg Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio/* ``` But build log I see ``` -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/man/man8/kamdbctl.8 -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/sbin/kamcmd -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/man/man8/kamcmd.8 + DESTDIR=/root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT + /usr/bin/cmake --install redhat-linux-build --component tls-cfg -- Install configuration: "Release" + DESTDIR=/root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT + /usr/bin/cmake --install redhat-linux-build --component xhttp_pi-cfg -- Install configuration: "Release" ``` My expectation first two error messages should not appear.
The last messages probably relate to folder names difference in the `src/modules` folder and `utils/kamctl`. Please compare ``` [root@nout kamailio]# find ./{src,utils}/{modules,kamctl} -regextype posix-extended -regex ".*/db_?[a-z]*$|" 2> /dev/null ./src/modules/db_berkeley ./src/modules/db_cluster ./src/modules/db_flatstore ./src/modules/db_mongodb ./src/modules/db_mysql ./src/modules/db_oracle ./src/modules/db_perlvdb ./src/modules/db_postgres ./src/modules/db_redis ./src/modules/db_sqlite ./src/modules/db_text ./src/modules/db_unixodbc ./utils/kamctl/db_berkeley ./utils/kamctl/db_berkeley/kamailio/dbaliases ./utils/kamctl/db_redis ./utils/kamctl/db_redis/kamailio/dbaliases ./utils/kamctl/db_sqlite ./utils/kamctl/dbcassandra ./utils/kamctl/dbtext ./utils/kamctl/dbtext/kamailio/dbaliases ./utils/kamctl/dbtextdb ``` The present module is `db_text,` but 'dbtext' is used in the utils folder. I think that is why some `dbtext` files are not installed.
My expectation first two error messages should not appear.
Did you include the modules `tls` and `xhttp_pi` in the include list? Those files will be installed only if the select module is included in the configuration. If you included them, and still not installed, I should take a closer look.
The last messages probably relate to folder names difference in the `src/modules` folder and `utils/kamctl`. Please compare
[root@nout kamailio]# find ./{src,utils}/{modules,kamctl} -regextype posix-extended -regex ".*/db_?[a-z]*$|" 2> /dev/null ./src/modules/db_berkeley ./src/modules/db_cluster ./src/modules/db_flatstore ./src/modules/db_mongodb ./src/modules/db_mysql ./src/modules/db_oracle ./src/modules/db_perlvdb ./src/modules/db_postgres ./src/modules/db_redis ./src/modules/db_sqlite ./src/modules/db_text ./src/modules/db_unixodbc ./utils/kamctl/db_berkeley ./utils/kamctl/db_berkeley/kamailio/dbaliases ./utils/kamctl/db_redis ./utils/kamctl/db_redis/kamailio/dbaliases ./utils/kamctl/db_sqlite ./utils/kamctl/dbcassandra ./utils/kamctl/dbtext ./utils/kamctl/dbtext/kamailio/dbaliases ./utils/kamctl/dbtextdb
The present module is `db_text,` but 'dbtext' is used in the utils folder. I think that is why some `dbtext` files are not installed.
The naming here is indeed a bit misleading and I may have missed something. Regarding those files though, you have to also build the target `dbschema` first, so that the files to be installed are generated and found. Also, the corresponding **module** name should be in the included list like before ie `db_text`. We can maybe add this target to the default if it's necessary!
@sergey-safarov Do you were able to test the latest changes from Xenofon? Or is there still an issue with the naming. Otherwise this PR could be probably closed.
Thanks @xkaraman @henningw I have the latest comments and found
Did you include the modules tls and xhttp_pi in the include list
yes, this works.
Regarding those files though, you have to also build the target dbschema first, so that the files to be installed are generated and found
yes, this also works and I installs some required files.
Remaining part is ``` RPM build errors: Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio/* ```
This is related to the name difference. `db_text` is the module name and `dbtext` in the "utils/kamctl" folder.
Ahh i see what's happening (i think)! I see the `dbtext` folder in my install folder but didn't notice the second `kamailio` folder.
Those files are installed but under `prefix/usr/share/kamailio/dbtext` and not `usr/share/kamailio/dbtext/kamailio`. Note the 2nd kamailio folder.
How do you want me to handle this? I think the rest of the database do not have the extra kamailio folder!
I do not have any idea how it should be handled. @henningw could you look?
@sergey-safarov Xenofon did a fix related to the path issue mentioned above after the discussion this afternoon at 6839f1a2. Please give it a try, its hopefully already fixed.
I have tried https://github.com/kamailio/kamailio/commit/6839f1a2e090f06b0b7ca9289dd3b727... And error still there ``` RPM build errors: Directory not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio File not found: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/kamailio/* ``` In my perspective required change like this https://github.com/kamailio/kamailio/commit/dc41c3805f77a8eafeff48c4143f85d9...
Thanks for the feedback. I have done also a quick test build in the default cfg. The dbtext files are indeed missing.
Xenofon will have a look tomorrow morning and add them.
``` henning@app01:/tmp/kamailio-build$ find . -name "*text*" ./share/doc/kamailio/modules/README.textopsx ./share/doc/kamailio/modules/README.textops ./share/doc/kamailio/modules/README.db_text ./lib/kamailio/kamctl/kamctl.dbtext ./lib/kamailio/kamctl/dbtextdb ./lib/kamailio/kamctl/dbtextdb/dbtextdb.py ./lib/kamailio/kamctl/kamdbctl.dbtext ./lib/kamailio/modules/db_text.so ./lib/kamailio/modules/textops.so ./lib/kamailio/modules/textopsx.so ```
After building the dbschema target the files are installed.
``` $ cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/tmp/kamailio-build [..] $ $ cmake --build build/ [..] $ cmake --build build/ -t dbschema [..] $ cmake --install build/ [..] $ ls -la /tmp/kamailio-build/share/kamailio/dbtext/kamailio/ total 312 drwxr-xr-x 2 henning henning 4096 Jan 16 08:27 . drwxr-xr-x 3 henning henning 4096 Jan 16 08:27 .. -rw-r--r-- 1 henning henning 130 Jan 16 08:25 acc -rw-r--r-- 1 henning henning 74 Jan 16 08:25 acc_cdrs -rw-r--r-- 1 henning henning 503 Jan 16 08:25 active_watchers -rw-r--r-- 1 henning henning 88 Jan 16 08:25 address -rw-r--r-- 1 henning henning 377 Jan 16 08:25 aliases [..]
```
@sergey-safarov does it work for you if you add the mentioned step from above now for the package building? Thanks.
Could you check my build log ``` -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/acc -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/acc_cdrs -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/missed_calls -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/dbaliases -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/subscriber -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/usr_preferences -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/carrierroute -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/carrierfailureroute -- Installing: /root/rpmbuild/BUILD/kamailio-6.0.0-build/BUILDROOT/usr/share/kamailio/dbtext/carrier_name ``` Here files installed into `/usr/share/kamailio/dbtext`, not to the `/usr/share/kamailio/dbtext/kamailio` This triggered by ```sh /usr/bin/cmake --install redhat-linux-build ``` Full build log attached. [build.log.gz](https://github.com/user-attachments/files/18463428/build.log.gz) Build started by command ``` rpmbuild -bb kamailio.spec ```
Hey @sergey-safarov,
Are you sure on the latest commit? I have taken a look to logs you have sent.
I can see that when schemas are processed, your build looks like this for `acc` table and `dbtext`:
Processing acc for dbtext
cd /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/lib/srdb1/schema && XML_CATALOG_FILES=/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/stylesheets/dbschema_k/catalog.xml /usr/bin/xsltproc --xinclude **--stringparam dir /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/utils/kamctl/dbtext** --stringparam prefix '' --stringparam db dbtext /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio- 6.0.0-pre0/doc/stylesheets/dbschema_k/xsl/dbtext.xsl kamailio-acc.xml
While for me (note the bold regarding dir):
Processing acc for dbtext
cd /home/xenofon/kamailio-cmake/src/lib/srdb1/schema && XML_CATALOG_FILES=/home/xenofon/kamailio-cmake/doc/stylesheets/dbschema_k/catalog.xml /usr/bin/xsltproc --xinclude **--stringparam dir /home/xenofon/kamailio- cmake/build-man/utils/kamctl/dbtext/kamailio** --stringparam prefix '' --stringparam db dbtext /home/xenofon/kamailio- cmake/doc/stylesheets/dbschema_k/xsl/dbtext.xsl kamailio-acc.xml
If you take a look at https://github.com/kamailio/kamailio/blob/0a5db6808e859e88aae739e277d1647e05..., you will see that if `dbtext` is included and build, it should also have the extra kamailio path. Can you confirm this? Otherwise, I can't see why it's not getting picked up!
As extra notes for cmake:
There are these warning that should be taken care probably:
``` CMake Warning: Manually-specified variables were not used by the project:
CMAKE_CXX_FLAGS_RELEASE CMAKE_Fortran_FLAGS_RELEASE CMAKE_INSTALL_DO_STRIP INCLUDE_INSTALL_DIR LIB_INSTALL_DIR LIB_SUFFIX SHARE_INSTALL_PREFIX SYSCONF_INSTALL_DIR ```
For install stip, I think you have to do `cmake --install build-folder --strip` or build the `install/strip` target like `cmake --build build-folder -t install/strip`. I couldn't;t find any documented cmake variable `CMAKE_INSTALL_DO_STRIP`. If you think that is the correct way, it's all good!
Now, for the paths, we use this [GNUInstallDirs module](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html). It has the same semantic meaning with what you are trying to do, but different naming. if the defaults are fine, there is no need to provide them.
And lastly, `CMAKE_<LANGUAGE>_FLAGS_RELEASE`. I will see how to implement/provide way to use it. Maybe a better way is to use with [CMAKE_<LANGUAGE>_FLAGS_RELEASE_INIT]( https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS_CONFIG_INIT.ht...). I am not 100% sure on this but you can try and verify it?
Please keep me posted if you any more troubles! Xenofon
I have retested with 6750e2e2f1d6c10f6b5e66897d38657a576a9732 and now do not see an issue with `/usr/share/kamailio/dbtext/kamailio` folder.
I continue RPM packaging for `cmake` build.
Please check text_target for `ims` modules.
``` [ 90%] Processing target ims_auth_doc_text gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' [ 90%] Built target ims_auth_doc_text /usr/bin/gmake -f src/modules/CMakeFiles/ims_qos_doc_text.dir/build.make src/modules/CMakeFiles/ims_qos_doc_text.dir/depend gmake[3]: Entering directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' cd /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0 /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/src/modules /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/src/modules/CMakeFiles/ims_qos_doc_text.dir/DependInfo.cmake "--color=" error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' /usr/bin/gmake -f src/modules/CMakeFiles/ims_qos_doc_text.dir/build.make src/modules/CMakeFiles/ims_qos_doc_text.dir/build gmake[3]: Entering directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' [100%] Processing target ims_charging_doc_text gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' [100%] Generating text documentation with for ims_qos cd /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/ims_qos/doc && XML_CATALOG_FILES=/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/catalog.xml /usr/bin/xsltproc --novalid --xinclude /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl ims_qos.xml | /usr/bin/lynx -nolist -stdin -dump > /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/src/modules/ims_qos/ims_qos.txt [100%] Built target ims_charging_doc_text /usr/bin/gmake -f src/modules/CMakeFiles/ims_qos_npn_doc_text.dir/build.make src/modules/CMakeFiles/ims_qos_npn_doc_text.dir/depend error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl gmake[3]: Entering directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' cd /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0 /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/src/modules /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/src/modules/CMakeFiles/ims_qos_npn_doc_text.dir/DependInfo.cmake "--color=" error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl [100%] Processing target ims_icscf_doc_text [100%] Processing target ims_diameter_server_doc_text [100%] Processing target ims_dialog_doc_text gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' /usr/bin/gmake -f src/modules/CMakeFiles/ims_qos_npn_doc_text.dir/build.make src/modules/CMakeFiles/ims_qos_npn_doc_text.dir/build gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[3]: Entering directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[3]: *** No rule to make target '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/ims_qos_npn/doc/ims_qos_npn.xml', needed by 'src/modules/ims_qos_npn/ims_qos_npn.txt'. Stop. gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[2]: *** [CMakeFiles/Makefile2:21774: src/modules/CMakeFiles/ims_qos_npn_doc_text.dir/all] Error 2 gmake[2]: *** Waiting for unfinished jobs.... [100%] Built target ims_dialog_doc_text [100%] Built target ims_diameter_server_doc_text [100%] Built target ims_icscf_doc_text error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl error : Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import error : xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl Unknown IO error warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" compilation error: file /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/doc/docbook/txt.xsl line 6 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl [100%] Processing target ims_isc_doc_text [100%] Processing target ims_ipsec_pcscf_doc_text gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' [100%] Processing target ims_qos_doc_text [100%] Processing target ims_ocs_doc_text gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' [100%] Built target ims_isc_doc_text [100%] Built target ims_ipsec_pcscf_doc_text [100%] Built target ims_qos_doc_text [100%] Built target ims_ocs_doc_text gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake[1]: *** [CMakeFiles/Makefile2:4351: src/modules/CMakeFiles/kamailio_docs_readme.dir/rule] Error 2 gmake[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' gmake: *** [Makefile:244: kamailio_docs_readme] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.XrK9iO (%build) ```
Hey @sergey-safarov,
This is due to a misssing package called `docbook-xsl`. Hopefully, it's available on your OS as well.
@miconda After [2692148](https://github.com/kamailio/kamailio/commit/2692148d92bb8b17709eb4cbddd8e653...), this should be the behavior.
`make install` we now install the README found in `src/modules/*/README` in the `share` folder.
Do you have the need to build the readmes in the end? As we discussed above, install should copy the ones found in each module .
We have implemented `kamailio_docs_readme` target [link](https://github.com/kamailio/kamailio/pull/4085#issuecomment-2577661883). My expectation do not trigger xslt transformation and just rebuild the modules readme file. I will try with `docbook-xsl`.
We have implemented kamailio_docs_readme target https://github.com/kamailio/kamailio/pull/4085#issuecomment-2577661883. My expectation do not trigger xslt transformation and just rebuild the modules readme file.
This target will build the readmes from scratch and replace all readme files found in the source trees. If you want only to install them, `install` target will pick the READMEs found in the source tree, or build the target `install_kamailio_docs`.
gmake[3]: *** No rule to make target '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/ims_qos_npn/doc/ims_qos_npn.xml', needed by 'src/modules/ims_qos_npn/ims_qos_npn.txt'. Stop.
The error is here. It seems that the `xml` file in `ims_qos_npn` modules is named `ims_qos.xml` instead of `ims_qos_npn.xml`. Try changing it to the module name and try again!
@sergey-safarov ims_qos_npn doc building should be fixed after c994fb8d39
Could you check ``` Building C object src/modules/app_perl/CMakeFiles/app_perl.dir/app_perl_mod.c.o cd /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build/src/modules/app_perl && /usr/bin/gcc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH="x86_64" -DCC_GCC_LIKE_ASM -DCFG_DIR="/etc/kamailio/" -DCOMPILER=""gcc 14.2.1"" -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DFMSTATS -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKMSTATS -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMOD_NAME="app_perl" -DMOD_NAMEID=app_perl -DNAME="kamailio" -DOS=Linux -DOS_QUOTED="Linux" -DPKG_MALLOC -DQ_MALLOC -DRAW_SOCKS -DRUN_DIR="/run/kamailio" -DSHARE_DIR="/usr/share/kamailio/" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION="6.0.0-pre0" -DVERSIONVAL=6000000 -D_REENTRANT -D_GNU_SOURCE -O2 -flto="auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include" -D__CPU_x86_64 -D__OS_linux -Dapp_perl_EXPORTS -I/usr/lib64/perl5/CORE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/app_perl/= -fPIC -Wall -funroll-loops -Wcast-align -Werror=implicit-function-declaration -Werror=implicit-int -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/app_perl/CMakeFiles/app_perl.dir/app_perl_mod.c.o -MF CMakeFiles/app_perl.dir/app_perl_mod.c.o.d -o CMakeFiles/app_perl.dir/app_perl_mod.c.o -c /root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/app_perl/app_perl_mod.c cc1: error: unrecognized argument to ‘-flto=’ option: ‘auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include’ make[2]: *** [src/modules/app_perl/CMakeFiles/app_perl.dir/build.make:79: src/modules/app_perl/CMakeFiles/app_perl.dir/app_perl_mod.c.o] Error 1 make[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' make[1]: *** [CMakeFiles/Makefile2:30444: src/modules/app_perl/CMakeFiles/app_perl.dir/all] Error 2 make[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/redhat-linux-build' ```
Hey @sergey-safarov ,
This only happens with the specific module? did the modules before coming successfully?
This happens when I have added ``` app_perl db_perlvdb ```
Also when I added ``` acc_radius auth_radius misc_radius ``` I can see error ``` -- Checking for module 'radcli' -- Package 'radcli' not found CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:645 (message): The following required packages were not found:
- radcli
Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:873 (_pkg_check_modules_internal) cmake/modules/FindRadius.cmake:44 (pkg_check_modules) src/modules/acc_radius/CMakeLists.txt:5 (find_package) ``` In normal case required only devel files in the 'freeradius-client-devel': ``` [root@nout SPECS]# rpm -ql freeradius-client-devel /usr/include/freeradius-client.h /usr/lib64/libfreeradius-client.so ``` Could you pass check when `freeradius-client.h` is present.
For old script `-flto` option works ``` [root@nout kamailio-6.0.0-pre0]# make -n -C src/modules/app_perl make: Entering directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/app_perl' echo "CC (gcc) [M app_perl.so] app_perl_mod.o" ; gcc -fPIC -DPIC -g -pthread -funroll-loops -Wcast-align -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"6.0.0-pre0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 14.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -DMOD_NAME='"app_perl"' -DMOD_NAMEID='app_perl' -c app_perl_mod.c -o app_perl_mod.o gcc -MM -MG -DPIC -DKSR_PTHREAD_MUTEX_SHARED -DNAME='"kamailio"' -DVERSION='"6.0.0-pre0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 14.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -DMOD_NAME='"app_perl"' -DMOD_NAMEID='app_perl' app_perl_mod.c | sed -e 's/#.*//' -e '/:[ ]*$/d' -e '/^[ ]*$/d' -e 's|.*:|app_perl_mod.o: $(wildcard |' -e 's/([^\])$/\1)/'> app_perl_mod.d echo "CC (gcc) [M app_perl.so] perlfunc.o" ; gcc -fPIC -DPIC -g -pthread -funroll-loops -Wcast-align -DKSR_PTHREAD_MUTEX_SHARED -Wall -DNAME='"kamailio"' -DVERSION='"6.0.0-pre0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 14.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -DMOD_NAME='"app_perl"' -DMOD_NAMEID='app_perl' -c perlfunc.c -o perlfunc.o gcc -MM -MG -DPIC -DKSR_PTHREAD_MUTEX_SHARED -DNAME='"kamailio"' -DVERSION='"6.0.0-pre0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 14.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -DMOD_NAME='"app_perl"' -DMOD_NAMEID='app_perl' perlfunc.c | sed -e 's/#.*//' -e '/:[ ]*$/d' -e '/^[ ]*$/d' -e 's|.*:|perlfunc.o: $(wildcard |' -e 's/([^\])$/\1)/'> perlfunc.d echo "CC (gcc) [M app_perl.so] kamailioxs.o" ; gcc -fPIC -DPIC -g -pthread -funroll-loops -Wcast-align -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wno-unused -DNAME='"kamailio"' -DVERSION='"6.0.0-pre0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 14.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -DMOD_NAME='"app_perl"' -DMOD_NAMEID='app_perl' -c kamailioxs.c -o kamailioxs.o gcc -MM -MG -DPIC -DKSR_PTHREAD_MUTEX_SHARED -DNAME='"kamailio"' -DVERSION='"6.0.0-pre0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 14.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DSHARE_DIR='"/usr/local/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -DMOD_NAME='"app_perl"' -DMOD_NAMEID='app_perl' kamailioxs.c | sed -e 's/#.*//' -e '/:[ ]*$/d' -e '/^[ ]*$/d' -e 's|.*:|kamailioxs.o: $(wildcard |' -e 's/([^\])$/\1)/'> kamailioxs.d echo LIB_RPATH_LST:= >librpath.lst echo "LD (gcc) [M app_perl.so] app_perl.so" ; gcc -shared -g -pthread -Wl,-O2 -Wl,-E -rdynamic "-ldl" -Wl,-Bsymbolic-functions app_perl_mod.o perlfunc.o kamailioxs.o `perl -MExtUtils::Embed -e ldopts` -o app_perl.so make: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.0.0-build/kamailio-6.0.0-pre0/src/modules/app_perl' ```
Looks like some extra wrapping present here. In `cmake` script present ``` -flto="auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include" ``` And normal ``` -flto=auto ``` In my understanding first need to be removed.
This happens when I have added
app_perl db_perlvdb
Also when I added
acc_radius auth_radius misc_radius
I can see error
-- Checking for module 'radcli' -- Package 'radcli' not found CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:645 (message): The following required packages were not found: - radcli Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:873 (_pkg_check_modules_internal) cmake/modules/FindRadius.cmake:44 (pkg_check_modules) src/modules/acc_radius/CMakeLists.txt:5 (find_package)
In normal case required only devel files in the 'freeradius-client-devel':
[root@nout SPECS]# rpm -ql freeradius-client-devel /usr/include/freeradius-client.h /usr/lib64/libfreeradius-client.so
Could you pass check when `freeradius-client.h` is present. In old script we need to export "FREERADIUS=1" https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/obs/kamailio.s...
Regarding RADIUS. There is one `CMAKE` option in https://github.com/kamailio/kamailio/blob/874183da2a6000f5f8e755e19338b74757.... So when on configuration pass which client you want to use.
`cmake --S . -B build-folder -DRADIUSCLIENT="FREERADIUS" other_options ...`
Thanks @xkaraman for hint. I have added `-DRADIUSCLIENT="FREERADIUS"` to the cmake command and now see ``` -- Checking for module 'freeradius' -- Package 'freeradius' not found CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:645 (message): The following required packages were not found:
- freeradius
Call Stack (most recent call first): /usr/share/cmake/Modules/FindPkgConfig.cmake:873 (_pkg_check_modules_internal) cmake/modules/FindRadius.cmake:40 (pkg_check_modules) src/modules/acc_radius/CMakeLists.txt:5 (find_package) ``` In my expectation required delve package like ``` freeradius-client-devel ```
Hey @sergey-safarov,
My dev machine does not have available the `freeradius-client-dev`, can you verify that 53bd567dd7444a8145aa876d82db2c6b579a7e19, does the work correctly? Specifically, give a look at `FindLibfreeradius.cmake` if I am looking for the correct filenames and libraries!
Thanks!!
I can confirm `freeradius-client-dev` library was found properly and the module compiled. Now I see messages ``` File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/share/snmp/mibs/KAMAILIO-MIB File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/share/snmp/mibs/KAMAILIO-REG-MIB File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/share/snmp/mibs/KAMAILIO-SIP-COMMON-MIB File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/share/snmp/mibs/KAMAILIO-SIP-SERVER-MIB File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/share/snmp/mibs/KAMAILIO-TC ``` Proable required review `snmpstats` module install commands.
@sergey-safarov you are right! Commit is pushed!
Thanks, @xkaraman, `snmpstats` build fixed now.
Could you also check error with `-flto` options [Link 1](https://github.com/kamailio/kamailio/pull/4085#issuecomment-2606576084) [Link 2](https://github.com/kamailio/kamailio/pull/4085#issuecomment-2607162735)
Hey @sergey-safarov ,
So this was a weird one. For ubuntu it builds fine as it was. For testing i used `rockylinux` which is a flavour of RHEL and found that it produced the same error as yours.
After debugging, a lot of...., i found that for some reason cmake was quoting the `${PERL_C_EXTRA_FLAGS}` and so compiler error out. I'm not sure why it happened or if this a very specific bug on cmake on RHEL based.
I transformed the string to list for now and it seems to work correct and appending correctly. There is a duplication of flags here since perl is already compiled with those but i guess it's correct still.
Can you maybe verify this and i ll probably adjust the fix to be rhel specific or if it works for most OS leave it as is.
I have compiled 20a35249dae05c8c39c06e9c6ac1bba778700d62 and error look like ``` [ 47%] Building C object src/modules/db_perlvdb/CMakeFiles/db_perlvdb.dir/db_perlvdb.c.o cd /root/rpmbuild/BUILD/kamailio-6.1.0-build/kamailio-6.1.0-dev0/redhat-linux-build/src/modules/cplc && /usr/bin/gcc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH="x86_64" -DCC_GCC_LIKE_ASM -DCFG_DIR="/etc/kamailio/" -DCOMPILER=""gcc 14.2.1"" -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DFMSTATS -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKMSTATS -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMOD_NAME="cplc" -DMOD_NAMEID=cplc -DNAME="kamailio" -DOS=Linux -DOS_QUOTED="Linux" -DPKG_MALLOC -DQ_MALLOC -DRAW_SOCKS -DRUN_DIR="/run/kamailio" -DSHARE_DIR="/usr/share/kamailio/" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION=cd /root/rpmbuild/BUILD/kamailio-6.1.0-build/kamailio-6.1.0-dev0/redhat-linux-build/src/modules/db_perlvdb && /usr/bin/gcc -D-I/usr/local/include -D-O2 -D-Wall -D-Werror=format-security -D-Wno-complain-wrong-lang -D-Wp,-D_GLIBCXX_ASSERTIONS -D-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -D-fasynchronous-unwind-tables -D-fcf-protection -D-fexceptions -D-ffat-lto-objects -D-flto=auto -D-fno-omit-frame-pointer -D-fno-strict-aliasing -D-fstack-clash-protection -D-fstack-protector-strong -D-fwrapv -D-g -D-grecord-gcc-switches -D-m64 -D-march=x86-64 -D-mno-omit-leaf-frame-pointer -D-mtls-dialect=gnu2 -D-mtune=generic -D-pipe -D-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -D-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH="x86_64" -DCC_GCC_LIKE_ASM -DCFG_DIR="/etc/kamailio/" -DCOMPILER=""gcc 14.2.1"" -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DFMSTATS -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKMSTATS -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMOD_NAME="db_perlvdb" -DMOD_NAMEID=db_perlvdb -DNAME="kamailio" -DOS=Linux -DOS_QUOTED="Linux" -DPKG_MALLOC -DQ_MALLOC -DRAW_SOCKS -DRUN_DIR="/run/kamailio" -DSHARE_DIR="/usr/share/kamailio/" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION="6.1.0-dev0" -DVERSIONVAL=6001000 -D_GNU_SOURCE -D_REENTRANT -D__CPU_x86_64 -D__OS_linux -Ddb_perlvdb_EXPORTS -I/usr/lib64/perl5/CORE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.1.0-build/kamailio-6.1.0-dev0/src/modules/db_perlvdb/= -fPIC -Wall -funroll-loops -Wcast-align -Werror=implicit-function-declaration -Werror=implicit-int -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/db_perlvdb/CMakeFiles/db_perlvdb.dir/db_perlvdb.c.o -MF CMakeFiles/db_perlvdb.dir/db_perlvdb.c.o.d -o CMakeFiles/db_perlvdb.dir/db_perlvdb.c.o -c /root/rpmbuild/BUILD/kamailio-6.1.0-build/kamailio-6.1.0-dev0/src/modules/db_perlvdb/db_perlvdb.c "6.1.0-dev0" -DVERSIONVAL=6001000 -D__CPU_x86_64 -D__OS_linux -Dcplc_EXPORTS -isystem /usr/include/libxml2 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.1.0-build/kamailio-6.1.0-dev0/src/modules/cplc/= -DWITH_GZFILEOP -fPIC -Wall -funroll-loops -Wcast-align -Werror=implicit-function-declaration -Werror=implicit-int -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/cplc/CMakeFiles/cplc.dir/cplc.c.o -MF CMakeFiles/cplc.dir/cplc.c.o.d -o CMakeFiles/cplc.dir/cplc.c.o -c /root/rpmbuild/BUILD/kamailio-6.1.0-build/kamailio-6.1.0-dev0/src/modules/cplc/cplc.c <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers <command-line>: error: macro names must be identifiers ```
@sergey-safarov Please try again with the latest version of tree. I forgot to change one cmake command... Hopefully that was it.
Thanks @xkaraman. The `perl` module is compiled properly now. It looks like it is required to install some files additionally. ``` error: Directory not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio.pm error: Directory not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/Constants.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/Message.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB.pm error: Directory not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/LDAPUtils error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/LDAPUtils/LDAPConf.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/LDAPUtils/LDAPConnection.pm error: Directory not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/Utils error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/Utils/Debug.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/Utils/PhoneNumbers.pm error: Directory not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Column.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Pair.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/ReqCond.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Result.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/VTab.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Value.pm error: Directory not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter/AccountingSIPtrace.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter/Alias.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter/Auth.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter/Describe.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter/Speeddial.pm error: File not found: /root/rpmbuild/BUILD/kamailio-6.1.0-build/BUILDROOT/usr/lib64/kamailio/perl/Kamailio/VDB/Adapter/TableVersions.pm ```
@sergey-safarov
After f4d7e298bb351be5f12652083bd5e37109748169 in master, they should be installed as well and found a better fix for the quoting problem we had before on the options!
If you can verify it, that would be great!
Thanks @xkaraman, the last change works properly. I have properly packaged sources for RHEL 10 and Fedora 41. But when started build for CentOS 9 then catch this error ``` [2025-01-27T17:22:50.142Z] [ 65%] Building C object src/modules/json/CMakeFiles/json.dir/json_funcs.c.o [2025-01-27T17:22:50.146Z] cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/src/modules/json && /usr/bin/gcc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH="x86_64" -DCC_GCC_LIKE_ASM -DCFG_DIR="/etc/kamailio/" -DCOMPILER=""gcc 11.5.0"" -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DFMSTATS -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKMSTATS -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMOD_NAME="json" -DMOD_NAMEID=json -DNAME="kamailio" -DOS=Linux -DOS_QUOTED="Linux" -DPKG_MALLOC -DQ_MALLOC -DRAW_SOCKS -DRUN_DIR="/run/kamailio" -DSHARE_DIR="/usr/share/kamailio/" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION="6.1.0-dev0" -DVERSIONVAL=6001000 -D__CPU_x86_64 -D__OS_linux -Djson_EXPORTS -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/json/= -fPIC -Wall -funroll-loops -Wcast-align -Werror=implicit-function-declaration -Werror=implicit-int -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/json/CMakeFiles/json.dir/json_funcs.c.o -MF CMakeFiles/json.dir/json_funcs.c.o.d -o CMakeFiles/json.dir/json_funcs.c.o -c /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/json/json_funcs.c [2025-01-27T17:22:50.284Z] /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/json/json_funcs.c:26:10: fatal error: json.h: No such file or directory [2025-01-27T17:22:50.284Z] 26 | #include <json.h> [2025-01-27T17:22:50.284Z] | ^~~~~~~~ [2025-01-27T17:22:50.301Z] compilation terminated. [2025-01-27T17:22:50.326Z] gmake[2]: *** [src/modules/json/CMakeFiles/json.dir/build.make:79: src/modules/json/CMakeFiles/json.dir/json_funcs.c.o] Error 1 [2025-01-27T17:22:50.326Z] gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' [2025-01-27T17:22:50.331Z] gmake[1]: *** [CMakeFiles/Makefile2:35943: src/modules/json/CMakeFiles/json.dir/all] Error 2 [2025-01-27T17:22:50.332Z] gmake[1]: *** Waiting for unfinished jobs.... [2025-01-27T17:22:50.531Z] gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' [2025-01-27T17:22:53.719Z] [ 65%] Built target ims_usrloc_scscf [2025-01-27T17:22:53.723Z] gmake[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' [2025-01-27T17:22:53.737Z] gmake: *** [Makefile:159: all] Error 2 [2025-01-27T17:22:53.748Z] error: Bad exit status from /var/tmp/rpm-tmp.6ObW3A (%build) [2025-01-27T17:22:53.749Z] ```
The latest json error looks similar to the one reported recently on sr-dev list for amazon linux (https://lists.kamailio.org/mailman3/hyperkitty/list/sr-dev@lists.kamailio.or...)
Just as an idea, one should check if the json-c library installs the pkg-config (.pc) file for it on those distros, or even if the pkg-config tool is installed.
On Amazon Linux pkg-config is installed and it still fails: ``` # pkg-config --cflags json-c -I/usr/include/json-c ``` Using different versions of cmake doesn't help. On Rocky Linux 8.10 it build ok (same path for json-c libraries).
The `-isystem /usr/include/json-c` is missing from the compiler flags.
It works ok with `json-c-devel-0.13.1` and it fails with `json-c-devel-0.14-8`. Here's a diff between the files installed by the two versions. The newer version has some cmake specific files, not sure if those ones are messing up the build. ``` $ sdiff json.0.13.1 json.0.14-8 $ repoquery --installed -l json-c-devel | # repoquery --installed -l json-c-devel /usr/include/json-c /usr/include/json-c /usr/include/json-c/arraylist.h /usr/include/json-c/arraylist.h /usr/include/json-c/bits.h < /usr/include/json-c/debug.h /usr/include/json-c/debug.h /usr/include/json-c/json.h /usr/include/json-c/json.h /usr/include/json-c/json_c_version.h /usr/include/json-c/json_c_version.h /usr/include/json-c/json_config.h /usr/include/json-c/json_config.h /usr/include/json-c/json_inttypes.h /usr/include/json-c/json_inttypes.h /usr/include/json-c/json_object.h /usr/include/json-c/json_object.h /usr/include/json-c/json_object_iterator.h /usr/include/json-c/json_object_iterator.h /usr/include/json-c/json_pointer.h /usr/include/json-c/json_pointer.h /usr/include/json-c/json_tokener.h /usr/include/json-c/json_tokener.h > /usr/include/json-c/json_types.h /usr/include/json-c/json_util.h /usr/include/json-c/json_util.h /usr/include/json-c/json_visit.h /usr/include/json-c/json_visit.h /usr/include/json-c/linkhash.h /usr/include/json-c/linkhash.h /usr/include/json-c/printbuf.h /usr/include/json-c/printbuf.h > /usr/lib64/cmake/json-c > /usr/lib64/cmake/json-c/json-c-config.cmake > /usr/lib64/cmake/json-c/json-c-targets-release.cmake > /usr/lib64/cmake/json-c/json-c-targets.cmake /usr/lib64/libjson-c.so /usr/lib64/libjson-c.so /usr/lib64/pkgconfig/json-c.pc /usr/lib64/pkgconfig/json-c.pc > /usr/share/doc/json-c /usr/share/doc/json-c/ChangeLog /usr/share/doc/json-c/ChangeLog /usr/share/doc/json-c/README /usr/share/doc/json-c/README /usr/share/doc/json-c/README.html /usr/share/doc/json-c/README.html /usr/share/doc/json-c/README.md /usr/share/doc/json-c/README.md ```
For RHEL 10, build a successful ``` json-c-devel-0.17-4.el10.x86_64 [root@nout /]# rpm -ql json-c-devel /usr/include/json-c /usr/include/json-c/arraylist.h /usr/include/json-c/debug.h /usr/include/json-c/json.h /usr/include/json-c/json_c_version.h /usr/include/json-c/json_config.h /usr/include/json-c/json_inttypes.h /usr/include/json-c/json_object.h /usr/include/json-c/json_object_iterator.h /usr/include/json-c/json_patch.h /usr/include/json-c/json_pointer.h /usr/include/json-c/json_tokener.h /usr/include/json-c/json_types.h /usr/include/json-c/json_util.h /usr/include/json-c/json_visit.h /usr/include/json-c/linkhash.h /usr/include/json-c/printbuf.h /usr/lib64/cmake/json-c /usr/lib64/cmake/json-c/json-c-config.cmake /usr/lib64/cmake/json-c/json-c-targets-release.cmake /usr/lib64/cmake/json-c/json-c-targets.cmake /usr/lib64/libjson-c.so /usr/lib64/pkgconfig/json-c.pc /usr/share/doc/json-c /usr/share/doc/json-c/ChangeLog /usr/share/doc/json-c/README /usr/share/doc/json-c/README.html /usr/share/doc/json-c/README.md ```
For CentOS 9, build a not successful ``` sh-5.1# rpm -qa | grep json-c-devel json-c-devel-0.14-11.el9.x86_64 sh-5.1# rpm -ql json-c-devel /usr/include/json-c /usr/include/json-c/arraylist.h /usr/include/json-c/debug.h /usr/include/json-c/json.h /usr/include/json-c/json_c_version.h /usr/include/json-c/json_config.h /usr/include/json-c/json_inttypes.h /usr/include/json-c/json_object.h /usr/include/json-c/json_object_iterator.h /usr/include/json-c/json_pointer.h /usr/include/json-c/json_tokener.h /usr/include/json-c/json_types.h /usr/include/json-c/json_util.h /usr/include/json-c/json_visit.h /usr/include/json-c/linkhash.h /usr/include/json-c/printbuf.h /usr/lib64/cmake/json-c /usr/lib64/cmake/json-c/json-c-config.cmake /usr/lib64/cmake/json-c/json-c-targets-release.cmake /usr/lib64/cmake/json-c/json-c-targets.cmake /usr/lib64/libjson-c.so /usr/lib64/pkgconfig/json-c.pc /usr/share/doc/json-c /usr/share/doc/json-c/ChangeLog /usr/share/doc/json-c/README /usr/share/doc/json-c/README.html /usr/share/doc/json-c/README.md ``` And pkg fils difference ```diff --- a/usr/lib64/pkgconfig/json-c.pc 2021-09-14 10:57:00.000000000 +0000 +++ b/usr/lib64/pkgconfig/json-c.pc 2025-01-28 09:05:47.726892617 +0000 @@ -5,8 +5,8 @@
Name: json-c Description: A JSON implementation in C -Version: 0.14 +Version: 0.17 Requires: -Libs.private: +Libs.private: -lm Libs: -L${libdir} -ljson-c Cflags: -I${includedir} -I${includedir}/json-c ``` On RHEL also present ``` /usr/include/json-c/json_patch.h ```
After taking a look at it, it seems the problem is on some of the first release of `json-c` with cmake support. I have opened an issued https://github.com/json-c/json-c/issues/886.
Latest releases like 0.17 on `noble`, correctly find `json-c` with `find_package` call
@xkaraman I think if the host has installed `json-c` version greater 0.15 then we can use files in the `/usr/lib64/cmake/json-c` folder. If not then required to add '/usr/include/json-c' in the include path on Linux hosts.
I think we have two options right now: 1. Either wait for upstream to fix this, if they do backports that is. 2. Just use pkg-config to find it for all OS, since it seems to be mostly stable for all.
I also tried to use `find_package(json-c 0.15 CONFIG)` but it also seems `json-c` does not support a proper version handling as this errors appears when I try to isolate it even with 0.17 installed . ``` CMake Warning at src/modules/json/CMakeLists.txt:5 (find_package): Could not find a configuration file for package "json-c" that is compatible with requested version "0.15".
The following configuration files were considered but not accepted:
/usr/lib/x86_64-linux-gnu/cmake/json-c/json-c-config.cmake, version: unknown /lib/x86_64-linux-gnu/cmake/json-c/json-c-config.cmake, version: unknown
-- json-c not found. looking with pkg-config -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") -- Checking for module 'json-c' -- Found json-c, version 0.17 ```
Waiting for upstream to fix it will be probably longer until it show up in the used distribution (if at all). If pkg-config is stable, then we probably should use this.
I think it is and will be stable for some more releases since the [json-c.pc.in](https://github.com/json-c/json-c/blob/master/json-c.pc.in) is still in their main dev branch.
I will update to only use `pkg-config` for now then.
Now `json-c` devel files are found properly. On current master can fix this build ``` [ 63%] Building C object src/modules/ims_usrloc_scscf/CMakeFiles/ims_usrloc_scscf.dir/ul_callback.c.o cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/src/modules/ims_usrloc_scscf && /usr/bin/gcc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH="x86_64" -DCC_GCC_LIKE_ASM -DCFG_DIR="/etc/kamailio/" -DCOMPILER=""gcc 11.5.0"" -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DFMSTATS -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKMSTATS -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMOD_NAME="ims_usrloc_scscf" -DMOD_NAMEID=ims_usrloc_scscf -DNAME="kamailio" -DOS=Linux -DOS_QUOTED="Linux" -DPKG_MALLOC -DQ_MALLOC -DRAW_SOCKS -DRUN_DIR="/run/kamailio" -DSHARE_DIR="/usr/share/kamailio/" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION="6.1.0-dev0" -DVERSIONVAL=6001000 -D__CPU_x86_64 -D__OS_linux -Dims_usrloc_scscf_EXPORTS -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/ims_usrloc_scscf/= -fPIC -Wall -funroll-loops -Wcast-align -Werror=implicit-function-declaration -Werror=implicit-int -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/ims_usrloc_scscf/CMakeFiles/ims_usrloc_scscf.dir/ul_callback.c.o -MF CMakeFiles/ims_usrloc_scscf.dir/ul_callback.c.o.d -o CMakeFiles/ims_usrloc_scscf.dir/ul_callback.c.o -c /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/ims_usrloc_scscf/ul_callback.c /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/janssonrpcc/janssonrpc_server.c: In function 'jsonrpc_parse_server': /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/janssonrpcc/janssonrpc_server.c:194:16: warning: 'conn.s' may be used uninitialized [-Wmaybe-uninitialized] 194 | if(conn.s == NULL) { | ~~~~^~ /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/janssonrpcc/janssonrpc_server.c:132:13: note: 'conn' declared here 132 | str conn; | ^~~~ [ 63%] Building C object src/modules/janssonrpcc/CMakeFiles/janssonrpcc.dir/janssonrpc_srv.c.o ``` For me looks this error is present on the old build but I do have an idea how it can be possible.
@xkaraman looks like simila change we need for `jsonrpcc` module ``` cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/src/modules/json && /usr/bin/cmake -E cmake_link_script CMakeFiles/json.dir/link.txt --verbose=1 /usr/bin/gcc -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG -m64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -shared -Wl,-soname,json.so -o json.so CMakeFiles/json.dir/json_funcs.c.o CMakeFiles/json.dir/json_mod.c.o CMakeFiles/json.dir/json_trans.c.o -Wl,-rpath,::::::::::::::::::: /usr/lib64/libjson-c.so -ldl -lresolv In file included from /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/jsonrpcc/jsonrpc.c:32: /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/jsonrpcc/jsonrpc.h:32:10: fatal error: json.h: No such file or directory 32 | #include <json.h> | ^~~~~~~~ compilation terminated. gmake[2]: *** [src/modules/jsonrpcc/CMakeFiles/jsonrpcc.dir/build.make:79: src/modules/jsonrpcc/CMakeFiles/jsonrpcc.dir/jsonrpc.c.o] Error 1 gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' gmake[1]: *** [CMakeFiles/Makefile2:35969: src/modules/jsonrpcc/CMakeFiles/jsonrpcc.dir/all] Error 2 gmake[1]: *** Waiting for unfinished jobs.... ```
@sergey-safarov Done.
yes, json error fixed now. Could you also check ``` /usr/bin/cmake --build redhat-linux-build -j8 --verbose --target dbschema gmake: *** No rule to make target 'dbschema'. Stop. error: Bad exit status from /var/tmp/rpm-tmp.jUvIRf (%build) ``` This error is not present on RHEL 10 and Fedora but exist on CentOS 9.
The target `dbschema` is only available when the `xsltproc` exe can be found. Can you verify that is installed?
You should have seen something like this in your cmake config phase if it's not found: `message(STATUS "xsltproc is not found. Skip dbschema target.")`
Thanks @xkaraman, the build is now completed without errors. Making final tests.
@xkaraman could you help me force disable VERBOSE logs for cmake. RHEL by default enables verbose logs using `cmake build` command with `--verbose`. Can I add other options to revert this options like? ``` cmake --build . --verbose --something_new. ```
@xkaraman could you help me force disable VERBOSE logs for cmake. RHEL by default enables verbose logs using `cmake build` command with `--verbose`. Can I add other options to revert this options like?
cmake --build . --verbose --something_new.
What do you mean? Can;t you not provide the `--verbose` flag?
I have managed this, please ignore the comment above. Could you check why ``` /usr/share/kamailio/mongodb/kamailio/version-create.mongo ``` file installed on `CentOS 8` and not installed on `CentOS 9`.
Hmm, i don't think this file is create at all in my build at all. I can't see why CentOS 8 picks it up. Can you verify it exists in your `build_folder/utils/kamctl/mongodb`?
There is this in in the old Makefiles https://github.com/xkaraman/kamailio/blob/6883143c3bd61c72fd738a2cef24bee472... , that is producing it. still trying to figure what it does exactly!
Hey @sergey-safarov,
You can ea722916ef2923a15f5aa50176d707b62bc5091b in `cmake` branch that tries to deal with this issue. Can you verify that it now generates that file and it's getting installed?
Thanks @xkaraman. Change works properly and can be merged. I have assembled RPM packages for RHEL 10, CentOS 8 9, and Fedora 41.
@sergey-safarov Great news! Thanks for the help and reports!
Closed #4085.
@sergey-safarov
I pushed some commits that were for component based packaging for debian!
can you maybe confirm that it didn't changed something on your packaging and it still works as expected? you can find the new changes in `cmake` branch!
I have checked the commit history and have not found what is added and what needs to be checked. Can add commits links.
Sure here it is. https://github.com/kamailio/kamailio/tree/cmake
and the commit 60822e7756970a077c561ba3880052b002b45d51
I have checked `cmake` branch and see ``` [100%] Built target dbschema_db_berkeley cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/lib/srdb1/schema && XML_CATALOG_FILES=/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/doc/stylesheets/dbschema_k/catalog.xml /usr/bin/xsltproc --xinclude --stringparam dir /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/src/modules/xhttp_pi/xhttp_pi/'' --stringparam prefix acc- --stringparam db pi_framework_table /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/doc/stylesheets/dbschema_k/xsl/pi_framework_table.xsl kamailio-acc.xml bash: /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/db_mongodb/generate_version_create_mongo.sh: No such file or directory gmake[3]: *** [src/modules/db_mongodb/CMakeFiles/dbschema_mongodb.dir/build.make:177: dbschema_mongodb] Error 127 gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' gmake[2]: *** [CMakeFiles/Makefile2:35347: src/modules/db_mongodb/CMakeFiles/dbschema_mongodb.dir/all] Error 2 gmake[2]: *** Waiting for unfinished jobs.... gmake[3]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' [100%] Built target dbschema_mysql
```
@sergey-safarov Ahh, right it should be fixed now after 50b902b50ac834b58fc79fbe021955180277309b at `cmake` branch again?
Thanks for the quick responses while we wait for the confirmation for deb packaging!
I have tried this commit and now see ``` -- Set runtime path of "/root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/lib64/kamailio/modules/xmpp.so" to "/usr/lib64/kamailio" -- Installing: /root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/share/doc/kamailio/modules/README.xmpp -- Installing: /root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/lib64/kamailio/kamctl/kamctl.dbtext -- Installing: /root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/lib64/kamailio/kamctl/kamdbctl.dbtext CMake Error at redhat-linux-build/src/modules/db_text/cmake_install.cmake:54 (file): file INSTALL cannot find "/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/db_text/dbtextdb/dbtextdb.py": No such file or directory. ```
I have tried this commit and now see
-- Set runtime path of "/root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/lib64/kamailio/modules/xmpp.so" to "/usr/lib64/kamailio" -- Installing: /root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/share/doc/kamailio/modules/README.xmpp -- Installing: /root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/lib64/kamailio/kamctl/kamctl.dbtext -- Installing: /root/rpmbuild/BUILDROOT/kamailio-6.1.0-dev0.0.el9.centos.x86_64/usr/lib64/kamailio/kamctl/kamdbctl.dbtext CMake Error at redhat-linux-build/src/modules/db_text/cmake_install.cmake:54 (file): file INSTALL cannot find "/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/modules/db_text/dbtextdb/dbtextdb.py": No such file or directory.
Should be fixed as well in f1d9af8306fcd5b2d82f6688f16572ccd598ec51.
Sorry for the troubles.
Justed test latest cmake branch commit d1199c225f1c66bd8365d10bee734f8330d84f20 and see ``` cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/utils/kamctl && sed -e s#/etc/kamailio/kamailio.cfg#/etc/kamailio/kamailio.cfg#g -e s#/usr/sbin/#/usr/sbin/#g -e s#/usr/lib/kamailio/modules/#/usr/lib64/kamailio/#g -e s#/usr/share/doc/kamailio/#/usr/share/doc/kamailio/#g < /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/utils/kamctl/kamdbctl.8 > /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/utils/kamctl/kamdbctl.8 gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' [ 1%] Built target avp_man [ 1%] Built target auth_man [ 1%] Built target kamcmd_man [ 1%] Built target kamctl_man [ 1%] Generating lex.yy.c from cfg.lex cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/src/core && /usr/bin/flex -o /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build/src/core/lex.yy.c /root/rpmbuild/BUILD/kamailio-6.1.0-dev0/src/core/cfg.lex [ 1%] Generating parser source files gmake[2]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' [ 1%] Built target GenerateParser gmake[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-6.1.0-dev0/redhat-linux-build' gmake: *** [Makefile:159: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.jHhpXQ (%build) ```
Ok i am guessing that this was related to this change here d1199c225f1c66bd8365d10bee734f8330d84f20.
Since the default is ON, you must have the `xsltproc`, `lynx`, and `docbook2x-man`. I will improve the handling of this if it's the case Can you verify you do?
An alternative would set to the `-DBUILD_DOC=OFF` and it will behave as before.
On your successful RPM packaging, where the docs and man pages generated by calling explicitly the targets?
yes, with installed `libxslt`, `lynx`, `docbook-style-xsl` all works good. I have assembled RPM packages for RHEL 10, CentOS 8 9, and Fedora 41.