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

Detect pkgconf on Windows/mingw #61

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

mtelvers
Copy link
Contributor

Using the Opam 2.2.0 release candidate 1 to install sqlite3-ocaml on Windows I ran into this problem

$ dune build
File "src/dune", lines 10-12, characters 0-93:
10 | (rule
11 |   (targets c_flags.sexp c_library_flags.sexp)
12 |   (action (run ./config/discover.exe)))
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.
read_lines_from_cmd: failed reading line 1, cmd: ' pkg-config --cflags sqlite3'Fatal error: exception End_of_file

The compiler flags can be obtained by running, for example:

$ pkgconf --personality=x86_64-w64-mingw32 --libs sqlite3
-lsqlite3

This PR updates discover.ml to use this syntax on Windows.

Copy link

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, fwiw! :)

Being able to merger and release this would let us unblock ocaml/opam-repository#26146 . Let me know if there is anything I could do to support, @mmottl!

@mmottl mmottl merged commit a2cd3c1 into mmottl:master Jul 31, 2024
@mmottl
Copy link
Owner

mmottl commented Jul 31, 2024

Thanks for the contribution!

@mtelvers mtelvers deleted the discover-mingw branch August 1, 2024 08:17
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

Successfully merging this pull request may close these issues.

3 participants