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

Consider implementing/mocking pkgutil #435

Open
ivan-aksamentov opened this issue Oct 21, 2024 · 1 comment
Open

Consider implementing/mocking pkgutil #435

ivan-aksamentov opened this issue Oct 21, 2024 · 1 comment

Comments

@ivan-aksamentov
Copy link

When cross-compiling OpenBLAS using osxcross, I receive this error:

pkgutil: not found

Relevant makefile snippet in OpenBLAS:

https://github.com/OpenMathLib/OpenBLAS/blob/8a0cd5fcef1194b94b5c2469b4a0e1c88050f36d/Makefile.system#L429-L432

Would be nice if osxcross added a mock, or a true implementation of this tool.

@ivan-aksamentov
Copy link
Author

For the time being, as a workaround, for OpenBLAS I managed to mock the executable with a bash script:

#!/usr/bin/env sh

# This script mocks 'pkgutil' macOS tool to provide predefined outputs for Xcode package information

if [ "$1" = "--pkg-info" ]; then
  if [ "$2" = "com.apple.pkg.Xcode" ]; then
    echo "version: 12.3.1"
  elif [ "$2" = "com.apple.pkg.CLTools_Executables" ]; then
    echo "version: 15.0.0"
  else
    echo "No package info available."
  fi
fi

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

No branches or pull requests

1 participant