X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 4B713DC061E for ; Mon, 29 Jun 2015 18:09:11 +0000 (UTC) Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 2B576DC0229 for ; Mon, 29 Jun 2015 18:09:10 +0000 (UTC) Received: by obbkm3 with SMTP id km3so110261657obb.1 for ; Mon, 29 Jun 2015 11:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UMiC2u1Vc3pY2sH591N/WopFMfO/8KLjGMjdZqEeQtU=; b=cmEz7Ti6XTI5yC/VzIvCD9yXOsOgMIJLN5zbhNNPnFK/I1k+f9iklY49I+GE690WHz 5ilU1EJI8AYY7Vr+mrWPNI47qmHPeDQUGGufbtydV556KmKjeLR5VeOtfKetZGFE0Y2q Nxmzma+7+Ti+qKP7aD1t+Cly8LM9D6ijSG4W6CZw7jWfpypUekRiGqlt9LnpBBMzmL13 u5y7FPG30JoK5PnJ7UAVKR+M3MSF9mPMNAbSytOBMtkIqQxLEVx+OT+fx6lXhs/ybCff Vhq7tXNtqEZ9Qz0K37yG8L4iQBLtrq9Qdo62m647xLK3uM26VSBbwagQKRSCjwW5KRe+ eHYA== X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 X-Received: by 10.202.68.213 with SMTP id r204mr14617267oia.97.1435601350206; Mon, 29 Jun 2015 11:09:10 -0700 (PDT) Received: by 10.76.70.199 with HTTP; Mon, 29 Jun 2015 11:09:10 -0700 (PDT) In-Reply-To: <20150629203945.5b5fa936@vostro> References: <20150629203945.5b5fa936@vostro> Date: Mon, 29 Jun 2015 11:09:10 -0700 Message-ID: Subject: [alpine-devel] Re: openssl link problem From: Michael Fox <415fox@gmail.com> To: Timo Teras Cc: alpine-devel Content-Type: multipart/alternative; boundary=001a113d74ea84ad1a0519abfc72 X-Virus-Scanned: ClamAV using ClamSMTP --001a113d74ea84ad1a0519abfc72 Content-Type: text/plain; charset=UTF-8 So just to clarify, adding `-lcrypto` is the correct solution? On Mon, Jun 29, 2015 at 10:39 AM, Timo Teras 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 --001a113d74ea84ad1a0519abfc72 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
So just to clarify, adding `-lcrypto` is the correct solut= ion?

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
>=C2=A0 =C2=A0 =C2=A0ldd (0x6f765b6cf000)
>=C2=A0 =C2=A0 =C2=A0libcrypto.so.1.0.0 =3D> /lib/libcrypto.so.1.0.0 = (0x6f765b046000)
>=C2=A0 =C2=A0 =C2=A0libc.musl-x86_64.so.1 =3D> ldd (0x6f765b6cf000)<= br> >=C2=A0 =C2=A0 =C2=A0libz.so.1 =3D> /lib/libz.so.1 (0x6f765ae30000) >
> So I'm out of ideas ...

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



--

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