Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules/websocket: ensure linkage to libcrypto #439

Merged
merged 1 commit into from Dec 14, 2015

Conversation

andrey-utkin
Copy link
Contributor

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.

Fixes linkage for Ubuntu Wily (15.10).
The issue manifests itself as "undefined symbol: SHA1" error at module loading.
@miconda
Copy link
Member

miconda commented Dec 14, 2015

Thanks!

miconda added a commit that referenced this pull request Dec 14, 2015
modules/websocket: ensure linkage to libcrypto
@miconda miconda merged commit 665eef8 into kamailio:master Dec 14, 2015
@linuxmaniac
Copy link
Member

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

@andrey-utkin
Copy link
Contributor Author

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.

@andrey-utkin
Copy link
Contributor Author

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';

@miconda
Copy link
Member

miconda commented Dec 15, 2015

I pushed a fix for it -- apparently an whitespace is needed after ifneq.

@linuxmaniac - wondering why travis was not sending any notification for this...

@linuxmaniac
Copy link
Member

@miconda yes, I need to check why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants