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

configurator: absolute paths in $PKG_CONFIG are mishandled #11170

Closed
sauclovian opened this issue Nov 30, 2024 · 3 comments
Closed

configurator: absolute paths in $PKG_CONFIG are mishandled #11170

sauclovian opened this issue Nov 30, 2024 · 3 comments
Assignees

Comments

@sauclovian
Copy link

Expected Behavior

If $PKG_CONFIG contains an absolute path, that path will be used to run pkg-config.

Actual Behavior

It tries to splice the absolute path given to each entry in $PATH and then fails because (in normal circumstances) none of them exist.

Reproduction

In a package that depends on pkg-config (this came up with lablgtk), do export PKG_CONFIG=/usr/bin/pkg-config (or wherever), then run dune build.

Specifications

  • Version of dune (output of dune --version): 3.11.1, which is old; but the relevant code is the same on head
  • Version of ocaml (output of ocamlc --version) 4.12.2 (but irrelevant)
  • Operating system (distribution and version): NetBSD -current (also irrelevant, though our package system tickled the bug)

Fix

Check for an absolute path in which in otherlibs/configurator/src/v1.ml, e.g. with Filename.is_relative.

@sauclovian
Copy link
Author

Downstream patch is here: https://mail-index.netbsd.org/pkgsrc-changes/2024/11/30/msg311600.html

(but it doesn't use Filename.is_relative, which would probably be better for upstream)

@anmonteiro anmonteiro self-assigned this Nov 30, 2024
@anmonteiro
Copy link
Collaborator

I looked into this and I think this was fixed by #10937

@anmonteiro
Copy link
Collaborator

released in 3.17 too

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

2 participants