From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30006: bzip2 does not provide libbz2.so Date: Sat, 24 Mar 2018 18:01:02 +0100 Message-ID: <87zi2xjtm9.fsf@gnu.org> References: <87incft8tf.fsf@gnu.org> <877eq3knk0.fsf@fastmail.com> <718583be2617e43743e8ee40397bb0b4@tobias.gr> <871sgbklvj.fsf@fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezmZQ-0005o9-0E for bug-guix@gnu.org; Sat, 24 Mar 2018 13:04:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezmYM-0001ej-1p for bug-guix@gnu.org; Sat, 24 Mar 2018 13:03:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43763) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ezmYL-0001eW-TT for bug-guix@gnu.org; Sat, 24 Mar 2018 13:02:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ezmYL-0003wi-J7 for bug-guix@gnu.org; Sat, 24 Mar 2018 13:02:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871sgbklvj.fsf@fastmail.com> (Marius Bakke's message of "Fri, 23 Mar 2018 13:38:24 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Marius Bakke Cc: 30006@debbugs.gnu.org Marius Bakke skribis: > Tobias Geerinckx-Rice writes: > >> Marius, >> >> On 2018-03-23 13:02, Marius Bakke wrote: >>> diff --git a/gnu/packages/compression.scm=20 >>> b/gnu/packages/compression.scm >>> index b158feac4..fd111e579 100644 >>> --- a/gnu/packages/compression.scm >>> +++ b/gnu/packages/compression.scm >>> @@ -272,6 +272,9 @@ file; as a result, it is often used in conjunction= =20 >>> with \"tar\", resulting in >>> (lambda* (#:key outputs #:allow-other-keys) >>> (let* ((out (assoc-ref outputs "out")) >>> (libdir (string-append out "/lib"))) >>> + ;; The Make target above does not create "libbz2.so",=20 >>> only >>> + ;; the versioned libs, so we have to create it=20 >>> ourselves. >>> + (symlink "libbz2.so.1.0" "libbz2.so") >> >> How about symlinking to (string-append ... version) directly? >> Seems more robust & worked fine when I tried it, I think.=E2=84=A2 > > That makes sense. I just wanted to stay close to the typical Autotools > way of creating these links, where libfoo.so points to libfoo.so.1 which > points to libfoo.so.1.2. I'll change to (version-major+minor ...) > instead, in the off chance that bzip2 ever gets a new version. Note that there=E2=80=99s no reason for the SONAME numbers to match the ver= sion number (it=E2=80=99s even not recommended to do that because it may not car= ry the relevant info regarding ABI compatibility.) So I think the hard-coded number is fine, but we should probably do: (symlink =E2=80=A6 "libbz2.so") (unless (file-exists? "libbz2.so) (error "wrong symlink target!" (readlink "libbz2.so"))) to be on the safe side. > Side note: "copy-file" (and thus "install-file") actually dereferences > symlinks, so in the end you get three copies of the same library. Is > there an alternative to "copy-file" that preserves soft links? Not that > it matters in practice due to deduplication, but still... There=E2=80=99s no such function, which is unfortunate. But I agree it=E2= =80=99s nicer to preserve symlinks in this case. Perhaps we should actually do: (with-directory-excursion libdir (symlink =E2=80=A6 "libbz2.so")) ? Thanks, Ludo=E2=80=99.