unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Milind Kamble <milind.b.kamble@gmail.com>
To: help-guix@gnu.org
Subject: Seeking help to create link to libstdc++.so in /lib64
Date: Sun, 30 Oct 2022 22:38:31 -0500	[thread overview]
Message-ID: <CAJpe+QJe8KajVQHpvWueLh03Ly4eSOEqLM3j-a1UPuS8dfGhvQ@mail.gmail.com> (raw)

Hello,
    I want to create a link in /lib64 that points to libstdc++.so.
That target file is present in the gcc:lib package (not in the
gcc:out). Following the recommendation in Guix info manual (Base
Services), I have used the following construct in my operating-system
spec:
(operating-system
   ;; snip other stuff
  (services
      (list
         ;; snip other stuff
         (extra-special-file "/lib64/libstdc++.so.6"
                    (file-append gcc "/lib/libstdc++.so.6")))))

This creates the link to
/gnu/store/somehash-gcc-10.3.0/lib/libstdc++.so.6 which is a broken
link because libstdc++.so.6 is available in gcc:lib and not gcc:out

I am unable to specify (file-append gcc:lib "/lib/libstdc++.so.6")
because guile complains that gcc:lib is unbound

I understand it is hacky to create link in /lib64/ and the purer
solution is to port the desired app into a guix package. But I don't
have the expertise to craft a package definition yet. I am trying to
use the Deskreen app for screen sharing, which is available as an
AppImage. I have managed to run the AppImage by crafting my
LD_LIBRARY_PATH and "patchelf --set-interpreter" of the AppImage
binary and wanted to make these links in /lib64 where the AppImage
expects it's shared libraries.

Rather than getting a recommendation to not create the link, I would
like to know what syntax change will achieve the desired outcome in
the operating-system spec. This will help me learn the nuances and
concepts of gexp.

If instead of file-append, I use string-append like this:
#~(string-append $#gcc:lib "/lib/libstdc++.so.6")
it works to the extent that gcc:lib is expanded correctly, but then
activate-service.scm script contains
(activate-special-files (quote (("/lib64/libstdc++.so.6"
(string-append "/gnu/store/6d0pl5khj08j3c2619jnypc8bznspgx8-gcc-10.3.0-lib"
"/lib/libstdc++.so.6")))))

and which results in an error:
wrong type (expecting string): (string-append
"/gnu/store//gnu/store/6d0pl5khj08j3c2619jnypc8bznspgx8-gcc-10.3.0.lib"
"/lib/libstdc++.so.6")

So string-append needs to get evaluated in host side before dispatch
to the guix daemon
 Any help would be educative and appreciated.
Thanks,
Milind Kamble


             reply	other threads:[~2022-10-31  3:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  3:38 Milind Kamble [this message]
2022-11-01  9:53 ` Seeking help to create link to libstdc++.so in /lib64 phodina
2022-11-02 11:59   ` Milind Kamble
2022-11-10 15:42 ` (
2022-11-10 16:29   ` phodina
2022-11-10 16:37 ` (

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=CAJpe+QJe8KajVQHpvWueLh03Ly4eSOEqLM3j-a1UPuS8dfGhvQ@mail.gmail.com \
    --to=milind.b.kamble@gmail.com \
    --cc=help-guix@gnu.org \
    /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.
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).