Fixes linkage for Ubuntu Wily (15.10). The issue manifests itself as "undefined symbol: SHA1" error at module loading.
In Ubuntu 14 LTS (Trusty), ```pkg-config --libs libssl``` returns ```-lssl -lcrypto```, but in Ubuntu 15.10 (Wily) it returns only ```-lssl```. In the end, websocket.so gets SHA1 symbol (and some more) unresolved.
For unclear reason, this change is not needed for tls.so - it gets linked to libcrypto automatically, despite it is linked only with ```-lssl``` flag. Maybe it is something symbol-specific, or something I am completely unaware of.
SSL_BUILDER stuff in Makefile seems to become even more mostruous with the proposed change. Keep in mind that there is ~5 more modules with identical construction in their Makefiles. Rejection of this patch in favor of cleaner solution is appreciated. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/439
-- Commit Summary --
* modules/websocket: ensure linkage to libcrypto
-- File Changes --
M modules/websocket/Makefile (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/439.patch https://github.com/kamailio/kamailio/pull/439.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439
Thanks!
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#issuecomment-164446791
Merged #439.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#event-491005363
665eef8 broke the build https://kamailio.sipwise.com/job/kamailiodev-nightly-binaries/410/console
``` 04:53:35 /usr/bin/make install-modules-all LIBDIR=lib/i386-linux-gnu group_include="kwebsocket" BASEDIR=/tmp/buildd/kamailio-4.4.0~dev6+0~20151215005547.412+wheezy/debian/kamailio-websocket-modules cfg_prefix=/tmp/buildd/kamailio-4.4.0~dev6+0~20151215005547.412+wheezy/debian/kamailio-websocket-modules doc-dir=share/doc/kamailio-websocket-modules 04:53:35 make[1]: Entering directory `/tmp/buildd/kamailio-4.4.0~dev6+0~20151215005547.412+wheezy' 04:53:35 mkdir -p /tmp/buildd/kamailio-4.4.0~dev6+0~20151215005547.412+wheezy/debian/kamailio-websocket-modules/usr/lib/i386-linux-gnu/kamailio/modules 04:53:35 Makefile:16: *** missing separator. Stop. 04:53:35 make[1]: *** [install-modules] Error 1 04:53:35 make[1]: Leaving directory `/tmp/buildd/kamailio-4.4.0~dev6+0~20151215005547.412+wheezy' 04:53:35 make: *** [install] Error 2 ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#issuecomment-164724586
Oh terribly sorry. ```ifneq($(SSL_BUILDER),)``` is 16th line. What exactly is considered a missing separator? I am not that keen to makefile language, sorry. Help is appreciated.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#issuecomment-164727220
Actually, this line is not required. If we assume that libssl is installed, then we can drop it (and its endif) entirely. If we don't add such assumption, we can still drop those lines and replace ```echo 'libcrypto'``` with ```echo 'pkg-config libcrypto';```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#issuecomment-164727934
I pushed a fix for it -- apparently an whitespace is needed after ifneq.
@linuxmaniac - wondering why travis was not sending any notification for this...
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#issuecomment-164735330
@miconda yes, I need to check why
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/439#issuecomment-164746002