Skip to content

Windows rpath support (#31930) breaks "find_libraries" #32651

@mwkrentel

Description

@mwkrentel

Steps to reproduce the issue

spack install dyninst

Error message

==> dyninst: Executing phase: 'cmake'
==> Error: NoLibrariesError: Unable to recursively locate libiberty libraries in /scratch/krentel/libiberty/install/linux-rhel8-x86_64/gcc-8.5.0/libiberty-2.37-d42oua4hpsotsfjijg6zhvlvswpowekx

/scratch/krentel/libiberty/spack-repo/var/spack/repos/builtin/packages/dyninst/package.py:118, in cmake_args:
        115            "-DElfUtils_ROOT_DIR=%s" % spec["elf"].prefix,
        116            "-DLibIberty_ROOT_DIR=%s" % spec["libiberty"].prefix,
        117            "-DTBB_ROOT_DIR=%s" % spec["tbb"].prefix,
  >>    118            self.define("LibIberty_LIBRARIES", spec["libiberty"].libs),
        119        ]
        120

Information on your system

  • Spack: 0.19.0.dev0 (53a7b49)
  • Python: 3.6.8
  • Platform: linux-rhel8-zen2
  • Concretizer: clingo

Additional information

Something in this commit breaks the build for dyninst.

commit 53a7b49619671a318274cdec43952a1d59f77ff0 (HEAD)
Author: John W. Parent <45471568+johnwparent@users.noreply.github.com>
Date:   Tue Sep 13 13:28:29 2022 -0400

    Windows rpath support (#31930)

Dyninst uses the following line to find the libiberty.a library:

self.define("LibIberty_LIBRARIES", spec["libiberty"].libs),

Dyninst needs LibIberty_LIBRARIES to be set to the path to libiberty.a.
This used to work, but after the above commit, the build for dyninst
fails as:

==> dyninst: Executing phase: 'cmake'
==> Error: NoLibrariesError: Unable to recursively locate libiberty libraries in /scratch/krentel/libiberty/install/linux-rhel8-x86_64/gcc-8.5.0/libiberty-2.37-d42oua4hpsotsfjijg6zhvlvswpowekx

/scratch/krentel/libiberty/spack-repo/var/spack/repos/builtin/packages/dyninst/package.py:118, in cmake_args:
        115            "-DElfUtils_ROOT_DIR=%s" % spec["elf"].prefix,
        116            "-DLibIberty_ROOT_DIR=%s" % spec["libiberty"].prefix,
        117            "-DTBB_ROOT_DIR=%s" % spec["tbb"].prefix,
  >>    118            self.define("LibIberty_LIBRARIES", spec["libiberty"].libs),
        119        ]
        120

The build for dyninst fails, but I think the real problem is in core
in the default searching for libraries. Or, maybe there's a disagreement
whether the library search should return the library or the directory
containing the library. I'm not sure (but it used to work).

@johnwparent @hainest

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions