For discussion of Alpine Linux development and developer support

3 2

[alpine-devel] openssl link problem

Michael Fox
Details
Message ID
<CABbL6oZBbc=bH_J_=LZQRpTu0qsQAD92Wr86vS_HaByPv=Yk0w@mail.gmail.com>
Sender timestamp
1435597938
DKIM signature
missing
Download raw message
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

[alpine-devel] Re: openssl link problem

Michael Fox
Details
Message ID
<CABbL6oZc8AR82SLktZssZVR5rSKT7wA83yGp-hYrHjsHVsyW7g@mail.gmail.com>
In-Reply-To
<20150629203945.5b5fa936@vostro> (view parent)
Sender timestamp
1435601350
DKIM signature
missing
Download raw message
So just to clarify, adding `-lcrypto` is the correct solution?

On Mon, Jun 29, 2015 at 10:39 AM, Timo Teras <timo.teras@iki.fi> wrote:

> On Mon, 29 Jun 2015 10:12:18 -0700
> Michael Fox <415fox@gmail.com> wrote:
>
> > 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 ...
>
> If you are using the symbol, you need to explicitly link against it.
> We pass --as-needed to linker by default.
>



-- 

-
Michael

[alpine-devel] Re: openssl link problem

Timo Teras
Details
Message ID
<20150629203945.5b5fa936@vostro>
In-Reply-To
<CABbL6oZBbc=bH_J_=LZQRpTu0qsQAD92Wr86vS_HaByPv=Yk0w@mail.gmail.com> (view parent)
Sender timestamp
1435599585
DKIM signature
missing
Download raw message
On Mon, 29 Jun 2015 10:12:18 -0700
Michael Fox <415fox@gmail.com> wrote:

> 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 ...

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


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

[alpine-devel] Re: openssl link problem

Timo Teras
Details
Message ID
<20150629215135.6bb97c0c@vostro>
In-Reply-To
<CABbL6oZc8AR82SLktZssZVR5rSKT7wA83yGp-hYrHjsHVsyW7g@mail.gmail.com> (view parent)
Sender timestamp
1435603895
DKIM signature
missing
Download raw message
On Mon, 29 Jun 2015 11:09:10 -0700
Michael Fox <415fox@gmail.com> wrote:

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

Yes.

> On Mon, Jun 29, 2015 at 10:39 AM, Timo Teras <timo.teras@iki.fi>
> wrote:
> 
> > On Mon, 29 Jun 2015 10:12:18 -0700
> > Michael Fox <415fox@gmail.com> wrote:
> >
> > > 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 ...
> >
> > If you are using the symbol, you need to explicitly link against it.
> > We pass --as-needed to linker by default.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---