* Seeking help to create link to libstdc++.so in /lib64
@ 2022-10-31 3:38 Milind Kamble
2022-11-01 9:53 ` phodina
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Milind Kamble @ 2022-10-31 3:38 UTC (permalink / raw)
To: help-guix
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking help to create link to libstdc++.so in /lib64
2022-10-31 3:38 Seeking help to create link to libstdc++.so in /lib64 Milind Kamble
@ 2022-11-01 9:53 ` phodina
2022-11-02 11:59 ` Milind Kamble
2022-11-10 15:42 ` (
2022-11-10 16:37 ` (
2 siblings, 1 reply; 6+ messages in thread
From: phodina @ 2022-11-01 9:53 UTC (permalink / raw)
To: Milind Kamble; +Cc: help-guix
Hi Milind,
> 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")
>
IMHO you can try the following code instead of the Gexp:
`(,gcc "lib")
Hope it helps!
----
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking help to create link to libstdc++.so in /lib64
2022-11-01 9:53 ` phodina
@ 2022-11-02 11:59 ` Milind Kamble
0 siblings, 0 replies; 6+ messages in thread
From: Milind Kamble @ 2022-11-02 11:59 UTC (permalink / raw)
To: phodina; +Cc: help-guix
Thanks for responding Petr. Could you elaborate how to compose it with
the outer function?
I tried this
(operating-system ;; other stuff snipped out
(services
(list
(extra-special-file "/lib64/libstdc++.so.6"
(file-append `(,gcc "lib") "/lib/libstdc++.so.6"))
))))
It gives me this error:
In procedure struct-vtable: Wrong type argument in position 1
(expecting struct): (#<package gcc@10.3.0 gnu/packages/gcc.scm:659
7fb670d7d0b0> "lib")
So file-append does not like/expect a list. It expects a package
object for first argument
-Milind
On Tue, Nov 1, 2022 at 4:54 AM phodina <phodina@protonmail.com> wrote:
>
> Hi Milind,
>
>
>
> > 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")
> >
>
> IMHO you can try the following code instead of the Gexp:
> `(,gcc "lib")
>
> Hope it helps!
>
> ----
> Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking help to create link to libstdc++.so in /lib64
2022-10-31 3:38 Seeking help to create link to libstdc++.so in /lib64 Milind Kamble
2022-11-01 9:53 ` phodina
@ 2022-11-10 15:42 ` (
2022-11-10 16:29 ` phodina
2022-11-10 16:37 ` (
2 siblings, 1 reply; 6+ messages in thread
From: ( @ 2022-11-10 15:42 UTC (permalink / raw)
To: Milind Kamble, help-guix
Heya,
On Mon Oct 31, 2022 at 3:38 AM GMT, Milind Kamble wrote:
> Hello,
> I want to create a link in /lib64 that points to libstdc++.so.
You probably want to use the new
guix shell -CF ...
command; the -F is short for --emulate-fhs.
-- (
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking help to create link to libstdc++.so in /lib64
2022-11-10 15:42 ` (
@ 2022-11-10 16:29 ` phodina
0 siblings, 0 replies; 6+ messages in thread
From: phodina @ 2022-11-10 16:29 UTC (permalink / raw)
To: (; +Cc: Milind Kamble, help-guix
> You probably want to use the new
>
> guix shell -CF ...
>
> command; the -F is short for --emulate-fhs.
>
This is probably the best approach to run it in a container with FHS.
----
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Seeking help to create link to libstdc++.so in /lib64
2022-10-31 3:38 Seeking help to create link to libstdc++.so in /lib64 Milind Kamble
2022-11-01 9:53 ` phodina
2022-11-10 15:42 ` (
@ 2022-11-10 16:37 ` (
2 siblings, 0 replies; 6+ messages in thread
From: ( @ 2022-11-10 16:37 UTC (permalink / raw)
To: Milind Kamble, help-guix
On Mon Oct 31, 2022 at 3:38 AM GMT, Milind Kamble wrote:
> But I don't have the expertise to craft a package definition yet.
It's actually quite easy! If you pop into #guix, i'll help you with it.
-- (
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-10 16:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-31 3:38 Seeking help to create link to libstdc++.so in /lib64 Milind Kamble
2022-11-01 9:53 ` phodina
2022-11-02 11:59 ` Milind Kamble
2022-11-10 15:42 ` (
2022-11-10 16:29 ` phodina
2022-11-10 16:37 ` (
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).