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

conf-postgresql - update depexts package name for macos + homebrew (#23912) #24105

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

haochenx
Copy link
Collaborator

@haochenx haochenx commented Jul 14, 2023

@haochenx
Copy link
Collaborator Author

It seems that postgres installation via brew itself was successful, but since the installed packages (namely, postgresql@15) is a so called "keg-only" formula, binaries that come with the package are not exposed and the detection command (namely, pg_config) fails.

I'll investigate into options to work around this.

Log:

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of conf-postgresql.1 failed at "pg_config".

#=== ERROR while compiling conf-postgresql.1 ==================================#
# context              2.1.5 | macos/x86_64 | ocaml-base-compiler.4.14.1 | pinned
# path                 ~/.opam/4.14.1/.opam-switch/build/conf-postgresql.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build pg_config
# exit-code            10
# env-file             ~/.opam/log/conf-postgresql-90902-0cb162.env
# output-file          ~/.opam/log/conf-postgresql-90902-0cb162.out
### output ###
# [ERROR] Command not found: pg_config

@haochenx
Copy link
Collaborator Author

To "link" keg-only formulas, one can run brew link postgresql@15.

But I have no idea how to achieve that in the opam file.
@avsm @mseri @kit-ty-kate could you provide some advice?

Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

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

Sorry for the delay.

The behaviour by homebrew is a bit annoying to map in opam but we could do a couple of things:

We could also try to bake this behaviour in opam as a more long term solution. Could you open a ticket in the opam bugtracker to at least get the conversation started? https://github.com/ocaml/opam/issues

For now i think we could go with the second solution with a message looking like that? What do you think?

Co-authored-by: Kate <kit-ty-kate@outlook.com>
@kit-ty-kate
Copy link
Member

Thanks!

@kit-ty-kate kit-ty-kate merged commit 0e9fd3a into ocaml:master Aug 9, 2023
1 check failed
@haochenx haochenx deleted the conf-postgresql-macos-homebrew branch August 11, 2023 01:57
@haochenx
Copy link
Collaborator Author

Many thanks @kit-ty-kate! I have created the issue in ocaml/opam to kick off the discussion as advised.

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

Successfully merging this pull request may close these issues.

conf-postgres depext needs to be updated for homebrew
2 participants