unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Marius Bakke <mbakke@fastmail.com>
Cc: 30006@debbugs.gnu.org
Subject: bug#30006: bzip2 does not provide libbz2.so
Date: Sat, 24 Mar 2018 18:01:02 +0100	[thread overview]
Message-ID: <87zi2xjtm9.fsf@gnu.org> (raw)
In-Reply-To: <871sgbklvj.fsf@fastmail.com> (Marius Bakke's message of "Fri, 23 Mar 2018 13:38:24 +0100")

Marius Bakke <mbakke@fastmail.com> skribis:

> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>
>> Marius,
>>
>> On 2018-03-23 13:02, Marius Bakke wrote:
>>> diff --git a/gnu/packages/compression.scm 
>>> 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 
>>> 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", 
>>> only
>>> +               ;; the versioned libs, so we have to create it 
>>> 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.™
>
> 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’s no reason for the SONAME numbers to match the version
number (it’s even not recommended to do that because it may not carry
the relevant info regarding ABI compatibility.)

So I think the hard-coded number is fine, but we should probably do:

  (symlink … "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’s no such function, which is unfortunate.  But I agree it’s nicer
to preserve symlinks in this case.

Perhaps we should actually do:

  (with-directory-excursion libdir
    (symlink … "libbz2.so"))

?

Thanks,
Ludo’.

  reply	other threads:[~2018-03-24 17:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 13:29 bug#30006: bzip2 does not provide libbz2.so Ludovic Courtès
2018-03-23 12:02 ` Marius Bakke
2018-03-23 12:19   ` Tobias Geerinckx-Rice
2018-03-23 12:38     ` Marius Bakke
2018-03-24 17:01       ` Ludovic Courtès [this message]
2018-03-26 17:36         ` Marius Bakke
2018-03-27  7:32           ` Ludovic Courtès
2018-03-27 20:49             ` Marius Bakke
2018-03-23 20:50     ` Mark H Weaver
2018-03-24  1:17       ` Tobias Geerinckx-Rice
2018-03-24 16:54   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zi2xjtm9.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30006@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).