twinkle
twinkle copied to clipboard
Compilation fails on FreeBSD
FreeBSD% cmake ..
-- C++11 regular expressions OK
-- libmagic version: 5.41
-- Found LibSndfile: /usr/local/lib/libsndfile.so
-- Found ucommon includes: /usr/local/include/ucommon/ucommon.h
-- Found ucommon library: /usr/local/lib/libucommon.so;/usr/local/lib/libusecure.so
-- Found commoncpp includes: /usr/local/include/commoncpp/config.h
-- Found commoncpp library: /usr/local/lib/libcommoncpp.so
-- Found ccrtp includes: /usr/local/include/ccrtp/rtp.h
-- Found ccrtp library: /usr/local/lib/libccrtp.so
-- libasound OK
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/twinkle/make
FreeBSD% make
[ 0%] Building CXX object src/CMakeFiles/libtwinkle.dir/abstract_dialog.cpp.o
In file included from /tmp/twinkle/src/abstract_dialog.cpp:21:
In file included from /tmp/twinkle/src/abstract_dialog.h:30:
In file included from /tmp/twinkle/src/client_request.h:26:
In file included from /tmp/twinkle/src/redirect.h:22:
In file included from /tmp/twinkle/src/user.h:28:
In file included from /tmp/twinkle/src/sys_settings.h:24:
In file included from /tmp/twinkle/src/parser/sip_message.h:90:
/tmp/twinkle/src/parser/sip_body.h:22:10: fatal error: 'commoncpp/config.h' file not found
#include <commoncpp/config.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/libtwinkle.dir/build.make:76: src/CMakeFiles/libtwinkle.dir/abstract_dialog.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:352: src/CMakeFiles/libtwinkle.dir/all] Fehler 2
make: *** [Makefile:136: all] Fehler 2
I guess g++ on FreeBSD does not include from /usr/local by default, unlike it does on Linux (thus making it easy to miss this kind of thing).
I have now submitted #305 to properly add -I switches for all the libraries that we use, which should resolve this issue.
Confirm that it does fix this issue.
Confirm that using the exact procedure described in https://github.com/LubosD/twinkle/pull/305#issuecomment-1287819637 it does run on FreeBSD:

Successfully used it to place a phone call via an Asterisk server. Worked :+1:
Thank you very much!