Skip to content

External package not always being used resulting in same package being concretized differently #29930

@kgerheiser

Description

@kgerheiser

Steps to reproduce

I'm seeing some strange differences in concretization where a package is being concretized differently. The only difference being an external pkg-config. Sometimes the external pkg-config is used and for other packages pkgconf is being built from scratch resulting in the same packages being built twice with different hashes.

I was able to reduce this behavior with a simple example.

I have a Spack environment with an external pkg-config:

packages:
  pkg-config:
    externals:
    - spec: [email protected]
      prefix: /usr

A bundle with a single package:

class NcioBundle(BundlePackage):
    version('1.0.0')
    depends_on('ncio')

And a simple spec list:

  specs:
  - ncio-bundle
  - ncio

You can see the full concretization below but the only difference is pkgconf and pkg-config.

I have my environment activated and I run spack concretize and the same spec concretizes differently:

^[email protected]%[email protected] arch=linux-centos7-cascadelake
^[email protected]%[email protected]+internal_glib 

You can see when part of a bundle it's using the external pkg-config, but if not it's building pkgconf.

In my real use-case I have several bundles being built and two contain this ncio package and they being concretized differently exactly like my example.

I can solve this issue by setting pkgconfig buildable: False, or if I modify the built-in packages.yaml to prefer pkg-config, or override it in my own packages.yaml

pkgconfig: [pkgconf, pkg-config]

But why would curl concretize differently because one is in a bundle? Why isn't my external pkg-config always being used?

Error message

Full concretization below, notice how the only difference is pkg-config and pkgconf.

==> Concretized ncio-bundle
 -   7isq7nk  [email protected]%[email protected] arch=linux-centos7-cascadelake
[+]  giuwrww      ^[email protected]%[email protected]~ipo build_type=RelWithDebInfo arch=linux-centos7-cascadelake
[+]  zq5gb6h          ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=linux-centos7-cascadelake
[+]  qzmzrqg              ^[email protected]%[email protected]~symlinks+termlib abi=6 arch=linux-centos7-cascadelake
[+]  wqpzmd4              ^[email protected]%[email protected]~docs certs=system arch=linux-centos7-cascadelake
[+]  di4fmna          ^[email protected]%[email protected]~external-libfabric~ilp64 arch=linux-centos7-cascadelake
[+]  qjwlh4i          ^[email protected]%[email protected]~doc+pic+shared arch=linux-centos7-cascadelake
[+]  jzc2wgy              ^[email protected]%[email protected]+dap~fsync~hdf4~jna+mpi+parallel-netcdf+pic+shared patches=2c88dfbd6d339a0336a43b14a65a1d1df995b853b645e4af612617612a642a53 arch=linux-centos7-cascadelake
[+]  3u4dxij                  ^[email protected]%[email protected] patches=7793209b33013dc0f81208718c68440c5aae80e7a1c4b8d336e382525af791a7 arch=linux-centos7-cascadelake
[+]  y4uegic                      ^[email protected]%[email protected]+sigsegv arch=linux-centos7-cascadelake
[+]  vnjncy4                      ^[email protected]%[email protected]~cpanm+shared+threads patches=0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac,3bbd7d6f9933d80b9571533867b444c6f8f5a1ba0575bfba1fba4db9d885a71a arch=linux-centos7-cascadelake
[+]  cn4xdnq                  ^[email protected]%[email protected] arch=linux-centos7-cascadelake
[+]  m62w6ev                  ^[email protected]%[email protected]~gssapi~ldap~libidn2~librtmp~libssh~libssh2~nghttp2 tls=openssl arch=linux-centos7-cascadelake
[+]  h3n2aln                      ^[email protected]%[email protected]+internal_glib patches=49ffcd644e190dc5efcb2fab491177811ea746c1a526f75d77118c2706574358 arch=linux-centos7-cascadelake
[+]  ioczwxv                      ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos7-cascadelake
[+]  j5nqr2n                  ^[email protected]%[email protected]~cxx+fortran+hl~ipo~java+mpi+shared~szip+threadsafe+tools api=default build_type=RelWithDebInfo arch=linux-centos7-cascadelake
[+]  b7fa37y                      ^[email protected]%[email protected] patches=4e1d78cbbb85de625bad28705e748856033eaafab92a66dffd383a3d7e00cc94,62fc8a8bf7665a60e8f4c93ebbd535647cebf74198f7afafec4c085a8825c006,ff37630df599cfabf0740518b91ec8daaf18e8f288b19adaae5364dc1f6b2296 arch=linux-centos7-cascadelake
[+]  ycssfzg                          ^[email protected]%[email protected] arch=linux-centos7-cascadelake
[+]  at325hc                  ^[email protected]%[email protected]~burstbuffer+cxx+fortran+pic+shared arch=linux-centos7-cascadelake

==> Concretized ncio
 -   xfpfe3x  [email protected]%[email protected]~ipo build_type=RelWithDebInfo arch=linux-centos7-cascadelake
[+]  zq5gb6h      ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=linux-centos7-cascadelake
[+]  qzmzrqg          ^[email protected]%[email protected]~symlinks+termlib abi=6 arch=linux-centos7-cascadelake
[+]  wqpzmd4          ^[email protected]%[email protected]~docs certs=system arch=linux-centos7-cascadelake
[+]  di4fmna      ^[email protected]%[email protected]~external-libfabric~ilp64 arch=linux-centos7-cascadelake
[+]  nitel6p      ^[email protected]%[email protected]~doc+pic+shared arch=linux-centos7-cascadelake
[+]  jueep3f          ^[email protected]%[email protected]+dap~fsync~hdf4~jna+mpi+parallel-netcdf+pic+shared patches=2c88dfbd6d339a0336a43b14a65a1d1df995b853b645e4af612617612a642a53 arch=linux-centos7-cascadelake
[+]  3u4dxij              ^[email protected]%[email protected] patches=7793209b33013dc0f81208718c68440c5aae80e7a1c4b8d336e382525af791a7 arch=linux-centos7-cascadelake
[+]  y4uegic                  ^[email protected]%[email protected]+sigsegv arch=linux-centos7-cascadelake
[+]  vnjncy4                  ^[email protected]%[email protected]~cpanm+shared+threads patches=0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac,3bbd7d6f9933d80b9571533867b444c6f8f5a1ba0575bfba1fba4db9d885a71a arch=linux-centos7-cascadelake
[+]  cn4xdnq              ^[email protected]%[email protected] arch=linux-centos7-cascadelake
[+]  m62w6ev              ^[email protected]%[email protected]~gssapi~ldap~libidn2~librtmp~libssh~libssh2~nghttp2 tls=openssl arch=linux-centos7-cascadelake
[+]  5j7y6ul                  ^[email protected]%[email protected] arch=linux-centos7-cascadelake
[+]  ioczwxv                  ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos7-cascadelake
[+]  uxvdtkv              ^[email protected]%[email protected]~cxx+fortran+hl~ipo~java+mpi+shared~szip+threadsafe+tools api=default build_type=RelWithDebInfo arch=linux-centos7-cascadelake
[+]  b7fa37y                  ^[email protected]%[email protected] patches=4e1d78cbbb85de625bad28705e748856033eaafab92a66dffd383a3d7e00cc94,62fc8a8bf7665a60e8f4c93ebbd535647cebf74198f7afafec4c085a8825c006,ff37630df599cfabf0740518b91ec8daaf18e8f288b19adaae5364dc1f6b2296 arch=linux-centos7-cascadelake
[+]  ycssfzg                      ^[email protected]%[email protected] arch=linux-centos7-cascadelake
[+]  at325hc              ^[email protected]%[email protected]~burstbuffer+cxx+fortran+pic+shared arch=linux-centos7-cascadelake

Information on your system

  • Spack: 0.16.1-6587-6f2df33
  • Python: 3.9.7
  • Platform: linux-centos7-cascadelake
  • Concretizer: clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions