Subject: [alpine-devel] openssl link problem

From: Michael Fox <[email-masked]>
Date: Mon, 29 Jun 2015 10:12:18 -0700

I encounter a problem linking with openssl:

//lib/libssl.so.1.0.0: undefined reference to `EVP_idea_cbc'

The symbol is provided by libcrypto and adding -lcrypto to the link fixes
it. The thing is that openssl already links libcrypto:

al64:~/src/nix$ ldd //lib/libssl.so.1.0.0
    ldd (0x6f765b6cf000)
    libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0 (0x6f765b046000)
    libc.musl-x86_64.so.1 => ldd (0x6f765b6cf000)
    libz.so.1 => /lib/libz.so.1 (0x6f765ae30000)

So I'm out of ideas ...

-- 

-
Michael

---

From: Timo Teras <[email-masked]>
Date: Mon, 29 Jun 2015 20:39:45 +0300

On Mon, 29 Jun 2015 10:12:18 -0700
Michael Fox <[email-masked]> wrote:

> The symbol is provided by libcrypto and adding -lcrypto to the link
> fixes it. The thing is that openssl already links libcrypto:
> 

If you are using the symbol, you need to explicitly link against it.
We pass --as-needed to linker by default.

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Michael Fox <[email-masked]>
Date: Mon, 29 Jun 2015 11:09:10 -0700

So just to clarify, adding `-lcrypto` is the correct solution?

-- 

-
Michael

---

From: Timo Teras <[email-masked]>
Date: Mon, 29 Jun 2015 21:51:35 +0300

On Mon, 29 Jun 2015 11:09:10 -0700

> So just to clarify, adding `-lcrypto` is the correct solution?

Yes.

> > > The symbol is provided by libcrypto and adding -lcrypto to the
> > > link fixes it. The thing is that openssl already links libcrypto:
> > >

---