[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Statically linking
[Thread Prev] | [Thread Next]
- Subject: Re: Statically linking
- From: Mihai Moldovan <ionic@xxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sun, 14 Apr 2019 01:35:20 +0200
- To: libssh@xxxxxxxxxx, Paul Beerkens <paul.beerkens@xxxxxxxxxxxxxxxxxxxx>
* On 4/12/19 9:28 PM, Paul Beerkens wrote:> [...] > I am getting tons of error messages about undefined reference like these: > > /usr/local/lib/libssh.a(pki.c.o): In function `ssh_key_clean': > /home/paul.beerkens/Downloads/libssh-0.8.7/src/pki.c:136: undefined > reference to `DSA_free' > /home/paul.beerkens/Downloads/libssh-0.8.7/src/pki.c:137: undefined > reference to `RSA_free' > /home/paul.beerkens/Downloads/libssh-0.8.7/src/pki.c:139: undefined > reference to `EC_KEY_free' > /usr/local/lib/libssh.a(pki.c.o): In function `ssh_signature_free': > /home/paul.beerkens/Downloads/libssh-0.8.7/src/pki.c:505: undefined > reference to `DSA_SIG_free' > /home/paul.beerkens/Downloads/libssh-0.8.7/src/pki.c:521: undefined > reference to `ECDSA_SIG_free' > /usr/local/lib/libssh.a(wrapper.c.o): In function `crypto_free': > > > > What do I need to do to get static linking to work? Interesting. Note that a full build log is always a nice thing to provide because at that point in time, we can tell you what went wrong, but not exactly why. The underline issue is that your crypto-backend is not linked in - which seems to be OpenSSL in your case (yes, libssh supports multiple backends, it needn't be OpenSSL.) The reason *why* this is not automatically pulled in correctly is because you just linked libssh manually, leading to said problems. I think (but am not 100 % positive) that libssh provides a libssh_static.pc file which can be used exactly for this case and includes the dependent libraries. Mihai
Attachment:
signature.asc
Description: OpenPGP digital signature
Re: Statically linking | Alberto Garcia <agarciaillera@xxxxxxxxx> |
Statically linking | Paul Beerkens <paul.beerkens@xxxxxxxxxxxxxxxxxxxx> |