Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
`make inconsistent assumptions` error on my OCaml LSP ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
toku
n00b
n00b


Joined: 12 Jan 2019
Posts: 42
Location: Kanagawa, Japan

PostPosted: Wed Jul 31, 2024 12:10 pm    Post subject: `make inconsistent assumptions` error on my OCaml LSP ebuild Reply with quote

Hi. I'm writing an ebuild for OCaml LSP server, and want to push it to the GURU repository, but not going well.

Here is the ebuild (ocaml-lsp-1.18.0.ebuild).

Code:
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit dune

DESCRIPTION="LSP Server for OCaml"
HOMEPAGE="
   https://opam.ocaml.org/packages/ocaml-lsp-server/
   https://github.com/ocaml/ocaml-lsp/
"
SRC_URI="https://github.com/ocaml/ocaml-lsp/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="ISC"

SLOT="0/${PV}"

KEYWORDS="~amd64"
IUSE="ocamlopt test"

RESTRICT="!test? ( test )"

RDEPEND="
   >=dev-lang/ocaml-4.14:= <dev-lang/ocaml-5.2:=
   dev-ml/yojson:=
   dev-ml/base:=
   ~dev-ml/lsp-${PV}:=
   ~dev-ml/jsonrpc-${PV}:=
   >=dev-ml/re-1.5.0:=
   >=dev-ml/ppx_yojson_conv_lib-0.14:=
   >=dev-ml/dune-rpc-3.4.0:=
   >=dev-ml/chrome-trace-3.3.0:=
   dev-ml/dyn:=
   dev-ml/stdune:=
   >=dev-ml/fiber-3.1.1:= <dev-ml/fiber-4.0.0
   dev-ml/xdg:=
   dev-ml/ordering:=
   dev-ml/dune-build-info:=
   dev-ml/spawn:=
   dev-ml/astring:=
   dev-ml/camlp-streams:=
   >=dev-ml/ocamlc-loc-3.7.0:=
   >=dev-ml/pp-1.1.2:=
   >=dev-ml/csexp-1.5:=
   >=dev-ml/ocamlformat-rpc-lib-0.21.0:=
   >=dev-ml/merlin-lib-4.16:= <dev-ml/merlin-lib-5.0
"

DEPEND="
   ${RDEPEND}
   >=dev-ml/dune-3.0:=
"

# Includes testing dependencies of `lsp`.
BDEPEND="
   test? (
      >=dev-ml/ppx_expect-0.15:=
      ~dev-ml/ocamlformat-0.26.2:=

      dev-ml/cinaps:=
   )
"

src_compile() {
   dune-compile ocaml-lsp-server
}


Enabling the GURU repository, creating a local ebuild repository by `sudo eselect repository create local`, copying the ebuild at `/var/db/repos/local/dev-util/ocaml-lsp`, and running `sudo ACCEPT_KEYWORDS='~amd64' emerge -1avt dev-util/ocaml-lsp` raises a few errors like this.

Code:
File "ocaml-lsp-server/vendor/lev-fiber-csexp/lev_fiber_csexp.ml", line 1:
Error: The files /usr/lib64/ocaml/csexp/csexp.cmi
       and /usr/lib64/ocaml/stdune/stdune__Sexp.cmi
       make inconsistent assumptions over interface Csexp


I thought this error occurred because the files had been compiled with inconsistent versions of compilers, and thus I tried `emerge -1 @rebuild-ocaml`, `emerge -1 dev-ml/stdune`, `emerge -1 dev-ml/csexp`, `emerge -1 dev-ml/stdune dev-ml/csexp`, etc., but none of them resolved the error.

How can I fix the errors? Thanks!

Full log and `emerge --info`
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum