karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 107 forks source link

undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1_1_0 #260

Closed snblitz closed 4 years ago

snblitz commented 5 years ago

undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1_1_0 debian 9.9 stretch can be fixed by adding -lcrypto to icecast_LDADD = $(icecast_DEPENDENCIES) -L/usr/lib -lssl -lcrypto -lcurl -ltheora -lvorbis -logg -lm -lxslt -lxml2 in src/Makefile I then get a warning make[1]: Entering directory '/home/brian/src/icecast-kh/src' CCLD icecast /usr/bin/ld: warning: libssl.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libssl.so.1.1 /usr/bin/ld: warning: libcrypto.so.1.0.2, needed by /usr/lib/x86_64-linux-gnu/libcurl.so, may conflict with libcrypto.so.1.1 But it does compile and run.

snblitz commented 5 years ago

repeatable via fresh debian 9 stretch install apt-get install -y build-essential libxml2-dev libxslt1-dev libcurl4-openssl-dev libvorbis-dev libtheora-dev libssl-dev git clone https://github.com/karlheyes/icecast-kh ./configure --with-openssl --prefix=/usr make

dklann commented 5 years ago

Also seeing this on Ubuntu 18.04 LTS (all packages updated before attempting to compile).

libssl-dev:amd64 1.1.1-1ubuntu2.1 openssl 1.1.1-1ubuntu2.1

Even though the error message says undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1_1_0'

karlheyes commented 4 years ago

did you resolve this? I don't have access myself to the environment. What does the following do

pkg-config --libs openssl

karl.

hridderhu commented 4 years ago

Today I also got the same error

Just for background: we need an icecast with https connection. We cannot get it working with the default icecast tarball source (icecast-2.4.4.tar.gz). Compiling is OK, but always error: "INFO connection/get_ssl_certificate No SSL capability on any configured ports"

The solution icecast-kh-icecast-2.4.0-kh13 works fine on debian wheezy

Any advise will be welcome. Manu thanks in advance

Henk

hridderhu commented 4 years ago

Solution suitable for me:

Henk

karlheyes commented 4 years ago

I checked both ubuntu 18.04 and debian 9.7 for this and this issue must be something else installed, or not configured correctly. The original poster refers to a version clash. This happened the same way on the debian 9.7 I tried, libcurl4 has been built with crypto 1.0.2 but the headers that icecast sees are for 1.1 so quite rightly, the linker is complaining. handling multipel lib versions is fine but an individual app needs a consistent lib version but you may get away with it depending on the changes in the crypto lib. ubuntu had no such issue in this regard on the setup I used.

The missing ERR_reason_error_string was not something I saw, I believe it resides in the libcrypto lib so should be in there (it's not a new call) but you may be missig the reference to it if crypto is not referenced by any installed dependancies. I can add crypto to the default libs I suppose

karl

karlheyes commented 4 years ago

I suspect the 'DSO missing' message is fixed now. If there is still some issue then open a report.

BusterNeece commented 4 years ago

@karlheyes Seeing this same error when attempting to build against Ubuntu 20.04 LTS:

[91m/usr/bin/ld: connection.o: undefined reference to symbol 'ERR_peek_last_error@@OPENSSL_1_1_0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO missing from command line

Is it specifically trying to build against OpenSSL 1.1.0?

karlheyes commented 4 years ago

I don't refer to a versioned symbol per-se. When the compile is done, the symbol that is found when building connection.o is in openssl 1.1.0 but -lcrypto looks to be missing from the build line, which is made from the tests for openssl.

I'm assuming for now that pkg-config is not installed on there, so an old assumption is made. I've updated the configure script now so can you verify it works.

karl

BusterNeece commented 4 years ago

@karlheyes Yep, it built! Thank you for the quick fix! :D