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

[dune-configurator] PKG_CONFIG_PATH is ignored on macos #10805

Open
dmtrKovalenko opened this issue Aug 6, 2024 · 3 comments
Open

[dune-configurator] PKG_CONFIG_PATH is ignored on macos #10805

dmtrKovalenko opened this issue Aug 6, 2024 · 3 comments

Comments

@dmtrKovalenko
Copy link

dmtrKovalenko commented Aug 6, 2024

Expected Behavior

When providing custom PKG_CONFIG_PATH variable dependencies

Actual Behavior

PKG_CONFIG_PATH is ignored in favor of brew https://github.com/ocaml/dune/blob/main/otherlibs/configurator/src/v1.ml

Reproduction

  1. Get a mac
  2. Add a folder with custom pkg-config, e.g. vcpkg install libpng
  3. Run PKG_CONFIG= dune build
  4. Observe error

Specifications

  • Version of dune (output of dune --version): 3.16.0
  • Version of ocaml (output of ocamlc --version): 5.2.0
  • Operating system (distribution and version): MacOS 14.5

Additional information

Despite the code looks correct it is for some reason still not running, would be also good to log the modified PKG_CONFIG_PATH

@dmtrKovalenko dmtrKovalenko changed the title [dune-configurator] PKG_CONFIG_PATH is not resolved on macos [dune-configurator] PKG_CONFIG_PATH is ignored on macos Aug 6, 2024
@rgrinberg
Copy link
Member

Do you want to send a PR? I don't think many of the dune devs use homebrew, so we need help from somebody that knows about brew and is willing to test things.

@anmonteiro
Copy link
Collaborator

anmonteiro commented Oct 20, 2024

I don't think this is true since Nix relies pretty heavily on PKG_CONFIG_PATH.

EDIT: looking at the code there does seem to be some special handling of PKG_CONFIG_PATH when brew is present. I suppose that could be improved.

@dmtrKovalenko
Copy link
Author

Yeah I do handle it differently in my projects, so can make a PR porting my changes

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

No branches or pull requests

3 participants