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

Fix static linking with OpenSSL #5

Closed
wants to merge 1 commit into from
Closed

Fix static linking with OpenSSL #5

wants to merge 1 commit into from

Conversation

joerg-krause
Copy link
Contributor

@joerg-krause joerg-krause commented Aug 27, 2016

Static linking userspace programs such as mpd against libshout
currently doesn't work out of the box, because libshout is linked
against libssl, but this isn't expressed in libshouts pkg-config
file:

/usr/lib/libshout.a(tls.o): In function `tls_check_cert':
tls.c:(.text+0x10): undefined reference to `SSL_get_peer_certificate'
tls.c:(.text+0x24): undefined reference to `SSL_get_verify_result'
tls.c:(.text+0x4c): undefined reference to `X509_get_subject_name'
tls.c:(.text+0x60): undefined reference to `X509_NAME_get_text_by_NID'
tls.c:(.text+0x118): undefined reference to `X509_NAME_get_entry'
tls.c:(.text+0x11c): undefined reference to `X509_NAME_ENTRY_get_data'
tls.c:(.text+0x120): undefined reference to `ASN1_STRING_length'
tls.c:(.text+0x148): undefined reference to `X509_free'
tls.c:(.text+0x178): undefined reference to `X509_NAME_get_index_by_NID'

Since OpenSSL installs its own .pc files, make sure that @SHOUT_REQUIRES@ contains ssl.

@joerg-krause joerg-krause changed the title Add 'Libs.private' field to pkg-config file Fix static linking with OpenSSL Aug 31, 2016
@joerg-krause
Copy link
Contributor Author

Updated the commit to follow the suggestion of @tpetazzoni.

Static linking userspace programs such as mpd against libshout
currently doesn't work out of the box, because libshout is linked
against libssl, but this isn't expressed in libshouts pkg-config
file:

```
/usr/lib/libshout.a(tls.o): In function `tls_check_cert':
tls.c:(.text+0x10): undefined reference to `SSL_get_peer_certificate'
tls.c:(.text+0x24): undefined reference to `SSL_get_verify_result'
tls.c:(.text+0x4c): undefined reference to `X509_get_subject_name'
tls.c:(.text+0x60): undefined reference to `X509_NAME_get_text_by_NID'
tls.c:(.text+0x118): undefined reference to `X509_NAME_get_entry'
tls.c:(.text+0x11c): undefined reference to `X509_NAME_ENTRY_get_data'
tls.c:(.text+0x120): undefined reference to `ASN1_STRING_length'
tls.c:(.text+0x148): undefined reference to `X509_free'
tls.c:(.text+0x178): undefined reference to `X509_NAME_get_index_by_NID'
```

Since OpenSSL installs its own .pc files, make sure that @SHOUT_REQUIRES@
contains `ssl`.
@joerg-krause
Copy link
Contributor Author

Opened an issue at the gitlab repo: https://gitlab.xiph.org/xiph/icecast-libshout/issues/2307.

Closing.

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

1 participant