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

opam install fails (pg_query 0.9.7, arch linux, ocaml 5.1.0, opam 2.3.0) #18

Closed
jake-miles opened this issue Jan 8, 2025 · 1 comment

Comments

@jake-miles
Copy link

jake-miles commented Jan 8, 2025

$ opam install pg_query

The following actions will be performed:
=== install 1 package
  ∗ pg_query 0.9.7

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved pg_query.0.9.7  (cached)
[ERROR] The compilation of pg_query.0.9.7 failed at "dune build -p pg_query -j 15 @install".

#=== ERROR while compiling pg_query.0.9.7 =====================================#
# context              2.3.0 | linux/x86_64 | ocaml.5.1.0 | https://opam.ocaml.org#cd5853b9a4dc5dfdb5f53cee126a86701c2b2d12
# path                 ~/src/devmap/_opam/.opam-switch/build/pg_query.0.9.7
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p pg_query -j 15 @install
# exit-code            1
# env-file             ~/.opam/log/pg_query-69766-e11519.env
# output-file          ~/.opam/log/pg_query-69766-e11519.out
### output ###
# [...]
# compiling src/postgres/src_port_snprintf.c
# which: no protoc-gen-c in (/home/jmiles/src/devmap/_opam/.opam-switch/build/pg_query.0.9.7/_build/install/default/bin:/home/jmiles/src/devmap/_opam/bin:/home/jmiles/bin:/home/jmiles/.local/gprolog/gprolog-1.6.0/bin/:/home/jmiles/.opam/ocaml.5.1.0/bin:/home/jmiles/.opam/ocaml.5.1.0/bin:/home/jmiles/bin:/home/jmiles/.local/gprolog/gprolog-1.6.0/bin/:/home/jmiles/.opam/ocaml.5.1.0/bin:/home/jmil[...]
# src/postgres/src_port_snprintf.c:374:1: error: conflicting types for ‘strchrnul’; have ‘const char *(const char *, int)’
#   374 | strchrnul(const char *s, int c)
#       | ^~~~~~~~~
# In file included from ./src/postgres/include/c.h:61,
#                  from src/postgres/src_port_snprintf.c:62:
# /usr/include/string.h:286:14: note: previous declaration of ‘strchrnul’ with type ‘char *(const char *, int)’
#   286 | extern char *strchrnul (const char *__s, int __c)
#       |              ^~~~~~~~~
# make: *** [Makefile:140: src/postgres/src_port_snprintf.o] Error 1
                                     



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build pg_query 0.9.7
└─ 
╶─ No changes have been performed
@jake-miles jake-miles changed the title opam install of fails (pg_query 0.9.7, arch linux, ocaml 5.1.0, opam 2.3.0) opam install fails (pg_query 0.9.7, arch linux, ocaml 5.1.0, opam 2.3.0) Jan 8, 2025
@anmonteiro
Copy link
Collaborator

working on a release here ocaml/opam-repository#27216

follow that PR / opam pin add pg_query --dev-repo while it isn't merged.

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