* bug#55793: Issue with elfutils libdw pkg-config's inputs
@ 2022-06-04 9:54 Ioannis Kappas
2024-01-18 3:20 ` Maxim Cournoyer
0 siblings, 1 reply; 2+ messages in thread
From: Ioannis Kappas @ 2022-06-04 9:54 UTC (permalink / raw)
To: 55793
Hi,
there appears to be an issue with the elfutils package that is missing
a dependency after it is installed.
To reproduce, on a profile without `xz' installed:
$ guix install elfutils
$ pkg-config --cflags libdw
Package liblzma was not found in the pkg-config search path.
Perhaps you should add the directory containing `liblzma.pc'
to the PKG_CONFIG_PATH environment variable
Package 'liblzma', required by 'libdw', not found
or using gstreamer which depends on elfutils
$ guix shell --check gstreamer pkg-config --pure
$ pkg-config --cflags libdw
Package liblzma was not found in the pkg-config search path.
Perhaps you should add the directory containing `liblzma.pc'
to the PKG_CONFIG_PATH environment variable
Package 'liblzma', required by 'libdw', not found
This is because elfutils has discovered an installation of the `xz'
library during the configure phase (log @
http://ci.guix.gnu.org/log/jp6027624wl2f4xx5yz1vjzd2b9yvwl9-elfutils-0.183)
...
checking for library containing gzdirect... -lz
checking for library containing BZ2_bzdopen... -lbz2
checking for library containing lzma_auto_decoder... -llzma
checking for library containing ZSTD_decompress... no
...
even though it is not part of the package inputs
gnu/packages/elf.scm:
(define-public elfutils
(package
(name "elfutils")
(version "0.183")
;; ...
(native-inputs (list m4))
(inputs (list zlib))
;; ...
))
The `xz' package is most likely coming as an implicit input from the
commencement module's %final-inputs and thus picked up by the
configure script, but is never propagated.
Assuming the above analysis is correct, potential solutions could be:
1. Declare `xz` as a propagated input in elfutils.
2. Pass --without-lzma to the configure script.
3. Change the build scripts so that build inputs that are only used
for unpacking sources are only visible to unpack phase.
Looking closer at the configure output, it appears there is an
additional implicit input that is picked up by the configure script
`bzip2`, thus this should also be considered.
Furthermore, the configure script recommends that all compression
methods should be installed
RECOMMENDED FEATURES (should all be yes)
gzip support : yes
bzip2 support : yes
lzma/xz support : yes
zstd support : no
libstdc++ demangle support : yes
File textrel check : yes
Symbol versioning : yes
so perhaps option#1 above should be the preferred solution, and should
also include zstd as a dep? If so, I've created the following draft
to demonstrate its use
From 158b3f67fdd43b4e9b6ac1d46d27169e4f67c4de Mon Sep 17 00:00:00 2001
Subject: [PATCH] Include elfutils recommended inputs for libdw pc
---
gnu/packages/elf.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 414d6a2856..cfe3bd466a 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -109,6 +109,10 @@ (define-public elfutils
(native-inputs (list m4))
(inputs (list zlib))
+ ;; libdw dependencies
+ (propagated-inputs `(("xz" ,xz)
+ ("lbzip2" ,lbzip2)
+ ("zstd:lib" ,zstd "lib")))
(home-page "https://sourceware.org/elfutils/")
(synopsis "Collection of utilities and libraries to handle ELF files and
DWARF data")
--
2.34.0
Testing with gstreamer
$ pre-inst-env guix shell --check gstreamer pkg-config --pure
guix shell: checking the environment variables visible from shell '/bin/bash'...
guix shell: All is good! The shell gets correct environment variables.
$ pkg-config --cflags libdw
-I/gnu/store/yvf3j3gd3321k9n1wd9ycfaz7blbp8v6-elfutils-0.183/include
-I/gnu/store/aggsb6j1svxp70xlll4rqnx5f2pzz794-xz-5.2.5/include
-I/gnu/store/3x3dl71d4xm6y4hjwq110hmfyfx0xc6j-zstd-1.5.0-lib/include
-I/gnu/store/yvf3j3gd3321k9n1wd9ycfaz7blbp8v6-elfutils-0.183/include
-I/gnu/store/8qv5kb2fgm4c3bf70zcg9l6hkf3qzpw9-zlib-1.2.11/include
Thanks
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#55793: Issue with elfutils libdw pkg-config's inputs
2022-06-04 9:54 bug#55793: Issue with elfutils libdw pkg-config's inputs Ioannis Kappas
@ 2024-01-18 3:20 ` Maxim Cournoyer
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2024-01-18 3:20 UTC (permalink / raw)
To: Ioannis Kappas; +Cc: 55793
Hello,
Ioannis Kappas <ioannis.kappas@gmail.com> writes:
> Hi,
>
> there appears to be an issue with the elfutils package that is missing
> a dependency after it is installed.
>
> To reproduce, on a profile without `xz' installed:
>
> $ guix install elfutils
> $ pkg-config --cflags libdw
>
> Package liblzma was not found in the pkg-config search path.
> Perhaps you should add the directory containing `liblzma.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'liblzma', required by 'libdw', not found
>
> or using gstreamer which depends on elfutils
>
> $ guix shell --check gstreamer pkg-config --pure
> $ pkg-config --cflags libdw
> Package liblzma was not found in the pkg-config search path.
> Perhaps you should add the directory containing `liblzma.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'liblzma', required by 'libdw', not found
>
> This is because elfutils has discovered an installation of the `xz'
> library during the configure phase (log @
> http://ci.guix.gnu.org/log/jp6027624wl2f4xx5yz1vjzd2b9yvwl9-elfutils-0.183)
>
> ...
> checking for library containing gzdirect... -lz
> checking for library containing BZ2_bzdopen... -lbz2
> checking for library containing lzma_auto_decoder... -llzma
> checking for library containing ZSTD_decompress... no
> ...
>
> even though it is not part of the package inputs
>
> gnu/packages/elf.scm:
> (define-public elfutils
> (package
> (name "elfutils")
> (version "0.183")
> ;; ...
> (native-inputs (list m4))
> (inputs (list zlib))
> ;; ...
> ))
>
> The `xz' package is most likely coming as an implicit input from the
> commencement module's %final-inputs and thus picked up by the
> configure script, but is never propagated.
>
> Assuming the above analysis is correct, potential solutions could be:
>
> 1. Declare `xz` as a propagated input in elfutils.
> 2. Pass --without-lzma to the configure script.
> 3. Change the build scripts so that build inputs that are only used
> for unpacking sources are only visible to unpack phase.
>
> Looking closer at the configure output, it appears there is an
> additional implicit input that is picked up by the configure script
> `bzip2`, thus this should also be considered.
>
> Furthermore, the configure script recommends that all compression
> methods should be installed
>
> RECOMMENDED FEATURES (should all be yes)
> gzip support : yes
> bzip2 support : yes
> lzma/xz support : yes
> zstd support : no
> libstdc++ demangle support : yes
> File textrel check : yes
> Symbol versioning : yes
>
> so perhaps option#1 above should be the preferred solution, and should
> also include zstd as a dep? If so, I've created the following draft
> to demonstrate its use
>
>>From 158b3f67fdd43b4e9b6ac1d46d27169e4f67c4de Mon Sep 17 00:00:00 2001
> Subject: [PATCH] Include elfutils recommended inputs for libdw pc
>
> ---
> gnu/packages/elf.scm | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
> index 414d6a2856..cfe3bd466a 100644
> --- a/gnu/packages/elf.scm
> +++ b/gnu/packages/elf.scm
> @@ -109,6 +109,10 @@ (define-public elfutils
>
> (native-inputs (list m4))
> (inputs (list zlib))
> + ;; libdw dependencies
> + (propagated-inputs `(("xz" ,xz)
> + ("lbzip2" ,lbzip2)
> + ("zstd:lib" ,zstd "lib")))
> (home-page "https://sourceware.org/elfutils/")
> (synopsis "Collection of utilities and libraries to handle ELF files and
> DWARF data")
Thank you for the detailed analysis and report! I think it'd make sense
to apply your patch. I won't do so myself at the moment as core-updates
is being frozen, but perhaps after it gets merged or a temporary branch
of core-updates is created to refine it there.
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-18 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-04 9:54 bug#55793: Issue with elfutils libdw pkg-config's inputs Ioannis Kappas
2024-01-18 3:20 ` Maxim Cournoyer
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).