Skip to content

Commit

Permalink
Use --modversion instead of --exists to check library is installed
Browse files Browse the repository at this point in the history
pkg-config --exists also checks dependencies are present on macOS, and
due to some packaging issues with upstream libarchive this is breaking
the build for cheribsd and freebsd.

Closes CTSRD-CHERI#340.

See Homebrew/homebrew-core#120526 for
tracking of this issue as it relates to macOS.
  • Loading branch information
graymalkin committed Jan 17, 2023
1 parent 2204bdc commit f2a7ffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycheribuild/projects/simple_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def check_required_pkg_config(self, package: str, instructions: InstallInstructi
return # already checked
self._validate_cheribuild_target_for_system_deps(instructions.cheribuild_target)
try:
self.run_cmd(["pkg-config", "--exists", package])
self.run_cmd(["pkg-config", "--modversion", package], capture_output=True)
except subprocess.CalledProcessError as e:
self.dependency_error("Required library", package, "is missing:", e, install_instructions=instructions,
cheribuild_target=instructions.cheribuild_target,
Expand Down

0 comments on commit f2a7ffc

Please sign in to comment.