Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issue: elfutils #36710

Closed
4 tasks done
jmcarcell opened this issue Apr 8, 2023 · 10 comments · Fixed by #36758
Closed
4 tasks done

Installation issue: elfutils #36710

jmcarcell opened this issue Apr 8, 2023 · 10 comments · Fixed by #36758

Comments

@jmcarcell
Copy link
Contributor

jmcarcell commented Apr 8, 2023

Steps to reproduce the issue

$ spack spec -I spack spec -I elfutils@0.189%gcc@11.2.0~bzip2+debuginfod+nls~xz~zstd build_system=autotools arch=linux-centos7-x86_64
Input spec
--------------------------------
 -   elfutils@0.189%gcc@11.2.0~bzip2+debuginfod+nls~xz~zstd build_system=autotools arch=linux-centos7-x86_64

Concretized
--------------------------------
 -   elfutils@0.189%gcc@11.2.0~bzip2+debuginfod+nls~xz~zstd build_system=autotools arch=linux-centos7-x86_64
[+]      ^curl@7.88.1%gcc@11.2.0~gssapi~ldap+libidn2~librtmp~libssh~libssh2~nghttp2 build_system=autotools libs=shared,static tls=openssl arch=linux-centos7-x86_64
[+]          ^libidn2@2.3.4%gcc@11.2.0 build_system=autotools arch=linux-centos7-x86_64
[+]              ^libunistring@1.1%gcc@11.2.0 build_system=autotools arch=linux-centos7-x86_64
[+]          ^openssl@1.1.1t%gcc@11.2.0~docs~shared build_system=generic certs=mozilla arch=linux-centos7-x86_64
[+]              ^ca-certificates-mozilla@2023-01-10%gcc@11.2.0 build_system=generic arch=linux-centos7-x86_64
[+]              ^perl@5.36.0%gcc@11.2.0+cpanm+open+shared+threads build_system=generic arch=linux-centos7-x86_64
[+]                  ^berkeley-db@18.1.40%gcc@11.2.0+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-centos7-x86_64
[+]                  ^gdbm@1.23%gcc@11.2.0 build_system=autotools arch=linux-centos7-x86_64
[+]          ^pkgconf@1.8.0%gcc@11.2.0 build_system=autotools arch=linux-centos7-x86_64
[+]      ^gettext@0.21.1%gcc@11.2.0+bzip2+curses+git~libunistring+libxml2+tar+xz build_system=autotools arch=linux-centos7-x86_64
[+]          ^bzip2@1.0.8%gcc@11.2.0~debug~pic+shared build_system=generic arch=linux-centos7-x86_64
[+]          ^libiconv@1.17%gcc@11.2.0 build_system=autotools libs=shared,static arch=linux-centos7-x86_64
[+]          ^libxml2@2.10.3%gcc@11.2.0~python build_system=autotools arch=linux-centos7-x86_64
[+]          ^ncurses@6.4%gcc@11.2.0~symlinks+termlib abi=none build_system=autotools arch=linux-centos7-x86_64
[+]          ^tar@1.34%gcc@11.2.0 build_system=autotools zip=pigz arch=linux-centos7-x86_64
[+]              ^pigz@2.7%gcc@11.2.0 build_system=makefile arch=linux-centos7-x86_64
[+]          ^xz@5.4.1%gcc@11.2.0~pic build_system=autotools libs=shared,static arch=linux-centos7-x86_64
[+]      ^libarchive@3.6.2%gcc@11.2.0+iconv build_system=autotools compression=bz2lib,lz4,lzma,lzo2,zlib,zstd crypto=mbedtls libs=shared,static programs=none xar=libxml2 arch=linux-centos7-x86_64
[+]          ^lz4@1.9.4%gcc@11.2.0 build_system=makefile libs=shared,static arch=linux-centos7-x86_64
[+]          ^lzo@2.10%gcc@11.2.0 build_system=autotools libs=shared,static arch=linux-centos7-x86_64
[+]          ^mbedtls@2.28.2%gcc@11.2.0+pic build_system=makefile build_type=Release libs=static arch=linux-centos7-x86_64
[+]          ^zstd@1.5.4%gcc@11.2.0+programs build_system=makefile compression=none libs=shared,static arch=linux-centos7-x86_64
[+]      ^libmicrohttpd@0.9.70%gcc@11.2.0~https build_system=autotools arch=linux-centos7-x86_64
[+]      ^m4@1.4.19%gcc@11.2.0+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-centos7-x86_64
[+]          ^diffutils@3.8%gcc@11.2.0 build_system=autotools arch=linux-centos7-x86_64
[+]          ^libsigsegv@2.13%gcc@11.2.0 build_system=autotools arch=linux-centos7-x86_64
[+]      ^sqlite@3.40.1%gcc@11.2.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-centos7-x86_64
[+]          ^readline@8.2%gcc@11.2.0 build_system=autotools patches=bbf97f1 arch=linux-centos7-x86_64
[+]      ^zlib@1.2.13%gcc@11.2.0+optimize+pic+shared build_system=makefile arch=linux-centos7-x86_64

Error message

Error message
==> Installing elfutils-0.189-rflm2fga7fem45hsysiex7jmzs54wjoj
==> No binary for elfutils-0.189-rflm2fga7fem45hsysiex7jmzs54wjoj found: installing from source
==> Using cached archive: /home/gitlab-runner/Build/release/spack/var/spack/cache/_source-cache/archive/39/39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8.tar.bz2
==> Ran patch() for elfutils
==> elfutils: Executing phase: 'autoreconf'
==> elfutils: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
    '/tmp/gitlab-runner/spack-stage/spack-stage-elfutils-0.189-rflm2fga7fem45hsysiex7jmzs54wjoj/spack-src/configure' '--prefix=/cvmfs/sw.hsf.org/spackages7/elfutils/0.189/x86_64-centos7-gcc11.2.0-opt/rflm2' '--without-bzlib' '--without-lzma' '--without-zstd' '--with-zlib=/cvmfs/sw.hsf.org/spackages7/zlib/1.2.13/x86_64-centos7-gcc11.2.0-opt/2wmsk' 'LDFLAGS=-Wl,--no-as-needed -L/cvmfs/sw.hsf.org/spackages7/gettext/0.21.1/x86_64-centos7-gcc11.2.0-opt/4mu7e/lib -lintl' '--enable-debuginfod' '--enable-libdebuginfod'

1 error found in build log:
     133    checking for pkg-config... (cached) /bin/pkg-config
     134    checking pkg-config is at least version 0.9.0... yes
     135    checking for libmicrohttpd... yes
     136    checking for oldlibmicrohttpd... no
     137    checking for sqlite3... yes
     138    checking for libarchive... no
  >> 139    configure: error: dependencies not found, use --disable-debuginfod to disable.

Information on your system

* **Spack:** 0.20.0.dev0
* **Python:** 3.6.8
* **Platform:** linux-centos7-cascadelake
* **Concretizer:** clingo

Additional information

@mwkrentel

spack-build-out.txt
spack-build-env.txt

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate
@G-Ragghianti
Copy link
Contributor

I've also encountered this. It is caused by the +debuginfod option requiring libarchive, but the configure script for elfutils fails to find libarchive because when using pkgconfig, it complains that libarchive requires iconv. Here is the relevant config.log:

configure:13983: checking for libarchive
configure:13990: $PKG_CONFIG --exists --print-errors "libarchive >= 3.1.2"
Package iconv was not found in the pkg-config search path.
Perhaps you should add the directory containing `iconv.pc'
to the PKG_CONFIG_PATH environment variable
Package 'iconv', required by 'libarchive', not found

@G-Ragghianti
Copy link
Contributor

This problem prevents gdb from building.

@mwkrentel
Copy link
Member

I tried a few old revs, including 0.179 when +debuginfod was first added.
They all failed the same way.

@hainest IIRC, you added +debuginfod. Did this ever work?

I'm not that familiar with pkgconfig.
Should I blame libarchive, pkgconfig or elfutils or what?
Elfutils configure.ac just says this, it never mentions iconv.

PKG_CHECK_MODULES([libarchive],[libarchive >= 3.1.2],[],[enable_debuginfod=no])

@tmadlener
Copy link
Contributor

Running into the same thing. Apart from libarchive there is in principle another configuration error:

configure:13770: checking for libmicrohttpd
configure:13777: $PKG_CONFIG --exists --print-errors "libmicrohttpd >= 0.9.33"
configure:13780: $? = 0
configure:13794: $PKG_CONFIG --exists --print-errors "libmicrohttpd >= 0.9.33"
configure:13797: $? = 0
configure:13811: result: no
Package 'gnutls', required by 'libmicrohttpd', not found
configure:13841: checking for oldlibmicrohttpd
configure:13848: $PKG_CONFIG --exists --print-errors "libmicrohttpd < 0.9.51"
Package dependency requirement 'libmicrohttpd < 0.9.51' could not be satisfied.
Package 'libmicrohttpd' has version '0.9.70', required version is '< 0.9.51'
configure:13851: $? = 1
configure:13865: $PKG_CONFIG --exists --print-errors "libmicrohttpd < 0.9.51"
Package dependency requirement 'libmicrohttpd < 0.9.51' could not be satisfied.
Package 'libmicrohttpd' has version '0.9.70', required version is '< 0.9.51'
configure:13868: $? = 1
configure:13882: result: no
Package dependency requirement 'libmicrohttpd < 0.9.51' could not be satisfied.
Package 'libmicrohttpd' has version '0.9.70', required version is '< 0.9.51'

So also this would need fixing (+adding versions of libmicrohttp that make it possible to satisfy this constraint).

depends_on("libmicrohttpd@0.9.33:0.9.70", type="link", when="+debuginfod")

@tmadlener
Copy link
Contributor

Adding a suitable version for libmicrohttpd solves that issue. Unfortunately the libarchive issue is a bit more involved, and it seems to be a collection of several smaller issues:

  • libarchive has iconv as Requires.private in its .pc file. This can be fixed by defining a suitable setup_dependent_build_environment for libarchive to add iconv to PATH.
  • elfutils uses the --static flag when invoking pkg-config which apparently makes it search for a .pc file for iconv (which doesn't provide one as far as I can tell). The pkg-config call works without --static if iconv is on PATH.

I am no autotools expert, so I am really not sure if this is an issue in libarchive "exporting" a private dependency, or whether it is an elfutils issue of requiring --static when invoking pkg-config.

@G-Ragghianti
Copy link
Contributor

I can confirm that the problem initially presented itself with libarchive@3.6.2. Using the previous version allows elfutils to build. However, all older versions of libarchive are deprecated for some reason. One can also turn off the iconv variant for libarchive. How about making "libarchive~iconv" a requirement for elfutils?

@hainest
Copy link
Contributor

hainest commented Apr 10, 2023

This is a known issue with libarchive (libarchive/libarchive#1819). I'm not sure what the best course of action would be here.

@hpcnpatel
Copy link
Contributor

For the reference, the issue is resurfaced again building elfutils using develop branch.

@scheibelp
Copy link
Member

@hpcnpatel I think a new issue would be best which explicitly lists out

  • The system where you did this, (and the output of spack debug --report so we know the Spack version you are using etc.)
  • It would be helpful to know if the install succeeds with eb45525 - that would help us determine whether (a) it was working and we've since had a regression or (b) if you have a separate issue
    • For example: from a quick look at this commit, it might be that a new libarchive version was added, and we need to expand conflicts("^libarchive@3.6.2 +iconv", when="+debuginfod")

@hpcnpatel
Copy link
Contributor

@scheibelp apologies for not being clear about the error, Here is more info that might be helpful.

> spack debug report
* **Spack:** 0.21.0.dev0 (bec873aec97c8c2f77353a2bc3b84d00335bf849)
* **Python:** 3.6.15
* **Platform:** linux-sles15-sapphirerapids
* **Concretizer:** clingo

I am trying to build gdb, which concretises with elfutils + debuginfod, here is the error, if that helps,

> spack install elfutils+debuginfod
1 error found in build log:
     144    checking pkg-config is at least version 0.9.0... yes
     145    checking for libmicrohttpd... yes
     146    checking for oldlibmicrohttpd... yes
     147    checking for sqlite3... yes
     148    checking for libarchive... no
  >> 149    configure: error: dependencies not found, use --disable-debuginfod to disable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants