mmottl / postgresql-ocaml

OCaml-bindings for the PostgreSQL database
Other
141 stars 23 forks source link

opam install failing #28

Closed caseybasichis closed 6 years ago

caseybasichis commented 6 years ago

on ocaml 4.06.1 (and 4.07.0) I'm getting an opam install error:

edit: this is on a new xps15 with Mint 19... Maybe there is a package I'm missing?

I also get the error with: opam pin add postgresql git@github.com:mmottl/postgresql-ocaml.gittowards

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[postgresql] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of postgresql failed at "jbuilder build -p postgresql
        -j 4".

#=== ERROR while installing postgresql.4.4.0 ==================================#
# opam-version 1.2.2
# os           linux
# command      jbuilder build -p postgresql -j 4
# path         /home/caseybasichis/.opam/4.06.1/build/postgresql.4.4.0
# compiler     4.06.1
# exit-code    1
# env-file     /home/caseybasichis/.opam/4.06.1/build/postgresql.4.4.0/postgresql-17064-5f1023.env
# stdout-file  /home/caseybasichis/.opam/4.06.1/build/postgresql.4.4.0/postgresql-17064-5f1023.out
# stderr-file  /home/caseybasichis/.opam/4.06.1/build/postgresql.4.4.0/postgresql-17064-5f1023.err
### stderr ###
# -> stdout:
# [...]
#  | ast_impl_magic_number: Caml1999M022
#  | ast_intf_magic_number: Caml1999N022
#  | cmxs_magic_number: Caml1999D022
#  | cmt_magic_number: Caml1999T022
# -> stderr:
# Fatal error: exception End_of_file
# Raised at file "src/import0.ml" (inlined), line 237, characters 22-32
# Called from file "src/configurator.ml", line 511, characters 13-22
# Called from file "src/config/discover.ml", line 6, characters 2-1023

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
  ∗  install postgresql 4.4.0
No changes have been performed

=-=- postgresql.4.4.0 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing.
   `opam depext postgresql.4.4.0' may help you find the correct installation
   for your system.

A postgres test:

caseybasichis@caseybasichis-XPS-15-9570:~$ psql
psql (10.4 (Ubuntu 10.4-0ubuntu0.18.04))
Type "help" for help.

caseybasichis=> 
mmottl commented 6 years ago

@caseybasichis Could you please test the following command:

pg_config --includedir --libdir --version

It should display something similar to:

/opt/local/include/postgresql96
/opt/local/lib/postgresql96
PostgreSQL 9.6.9
mmottl commented 6 years ago

Also, please make sure the developer package containing the client C-library is installed.

caseybasichis commented 6 years ago

That was the issue:

'You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.'

sudo apt-get install postgresql-server-dev-10 solved it.

Thank you Markus!

On Tue, Jul 17, 2018 at 5:30 PM Markus Mottl notifications@github.com wrote:

@caseybasichis https://github.com/caseybasichis Could you please test the following command:

pg_config --includedir --libdir --version

It should display something similar to:

/opt/local/include/postgresql96 /opt/local/lib/postgresql96 PostgreSQL 9.6.9

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mmottl/postgresql-ocaml/issues/28#issuecomment-405770769, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRQqxSzOgyO-2DKNHTKNwBzao0lG3LOks5uHoGLgaJpZM4VSPia .

mmottl commented 6 years ago

Sure, no problem!