----- Original Message -----
> From: "Antonio Rojas" <[email protected]>
> To: [email protected]
> Sent: Tuesday, August 21, 2018 11:32:48 AM
> Subject: Re: libssh 0.8.1 breaks amarok
> 
> El martes, 21 de agosto de 2018 11:09:57 (CEST) Anderson Sasaki escribió:
> > 
> > Is it possible to provide a backtrace to debug the issue?
> 
> Sure, but at which point should I get it? The error comes from mysql
> initialization failure at
> 
> https://github.com/KDE/amarok/blob/master/src/core-impl/storage/sql/mysqlestorage/MySqlEmbeddedStorage.cpp#L92

The best would be to check the libssh initialization (the call to _ssh_init() 
made by the library constructor).

> 
> 
> > Which OpenSSL version are you using?
> 
> openssl 1.1.0i

That is weird... For OpenSSL 1.1.x the libssh initialization is a noop (should 
behave exactly in the same way as when you link against libgcrypt).

> 
> > Are you linking pthreads?
> 
> From cmake output:
> 
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - not found
> -- Check if compiler accepts -pthread
> -- Check if compiler accepts -pthread - yes
> -- Found Threads: TRUE
> 
> However, the compiled library is not linked to libpthread:
> 
>  > readelf -d /usr/lib/libssh.so
> 
> Dynamic section at offset 0x741d8 contains 29 entries:
>   Tag        Type                         Name/Value
>  0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
>  0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]
>  0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
>  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
>  0x0000000000000001 (NEEDED)             Shared library:
>  [ld-linux-x86-64.so.2]
>  0x000000000000000e (SONAME)             Library soname: [libssh.so.4]
> ...
> 

This is expected. Libssh do not link to libpthread, but rely on glibc stubs for 
pthreads functions (if the application do not link against libpthread, the 
stubs are simple noops).

Let me rephrase the question: Is the application which is linked against libssh 
also linking libpthread?

Reply via email to