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

need help in compiling YoJson on Debian/Sid or Ubuntu/23 (x86-64) #170

Open
bstarynk opened this issue Sep 28, 2023 · 2 comments
Open

need help in compiling YoJson on Debian/Sid or Ubuntu/23 (x86-64) #170

bstarynk opened this issue Sep 28, 2023 · 2 comments

Comments

@bstarynk
Copy link

bstarynk commented Sep 28, 2023

Thanks for this JSON parsing library. I (Basile Starynevitch, in France, email [email protected]) am considering using it within the RefPerSys open source inference engine project for Linux (see some GPLv3+ code on github...).

However, installation on a Ubuntu 23 desktop (x86-64 processor) fails with:

rimski.x86_64 /usr/src/Libs 11:14 .0 % git clone [email protected]:ocaml-community/yojson.git
Cloning into 'yojson'...
X11 forwarding request failed on channel 0
remote: Enumerating objects: 2195, done.
remote: Counting objects: 100% (596/596), done.
remote: Compressing objects: 100% (198/198), done.
remote: Total 2195 (delta 431), reused 514 (delta 391), pack-reused 1599
Receiving objects: 100% (2195/2195), 771.24 KiB | 2.06 MiB/s, done.
Resolving deltas: 100% (1080/1080), done.
rimski.x86_64 /usr/src/Libs 11:14 .0 % cd yojson 
rimski.x86_64 src/Libs/yojson 11:14 .0 % ls
bench	    CODEOWNERS	  examples    Makefile	 test.json
bin	    doc		  lib	      README.md  yojson-bench.opam
CHANGES.md  dune-project  LICENSE.md  test	 yojson.opam
rimski.x86_64 src/Libs/yojson 11:14 .0 % make
File "bench/dune", line 6, characters 3-23:
6 |    core_bench.internals sexplib))
       ^^^^^^^^^^^^^^^^^^^^
Error: Library "core_bench.internals" not found.
Hint: try:
  dune external-lib-deps --missing @install @examples
Done: 192/199 (jobs: 1)make: *** [Makefile:3: all] Error 1
rimski.x86_64 src/Libs/yojson 11:14 .2 % ls
bench	CHANGES.md  dune-project  LICENSE.md  test		 yojson.opam
bin	CODEOWNERS  examples	  Makefile    test.json
_build	doc	    lib		  README.md   yojson-bench.opam
rimski.x86_64 src/Libs/yojson 11:15 .0 % less README.md 
rimski.x86_64 src/Libs/yojson 11:17 .0 % make
File "bench/dune", line 6, characters 3-23:
6 |    core_bench.internals sexplib))
       ^^^^^^^^^^^^^^^^^^^^
Error: Library "core_bench.internals" not found.
Hint: try:
  dune external-lib-deps --missing @install @examples
Done: 0/0 (jobs: 0)make: *** [Makefile:3: all] Error 1
rimski.x86_64 src/Libs/yojson 11:17 .2 % dune external-lib-deps --missing @install @examples
Done: 0/0 (jobs: 0)Error: The following libraries are missing in the default context:
- core
- core_bench
- core_bench.internals
- core_unix.command_unix
Hint: try:
  opam install core core_bench core_unix
rimski.x86_64 src/Libs/yojson 11:22 .1 % opam install core core_bench core_unix
[ERROR] No package named core_unix found.
opam install core core_bench core_unix  3.51s user 1.90s system 60% cpu 8.927 total

With ocaml --version giving The OCaml toplevel, version 4.13.1. It is in $HOME/.opam/default/bin/ocaml

Your help is appreciated. Feel free to contact me (Basile Starynkevitch) by email to [email protected]

Contributors to RefPerSys are also welcome.

@panglesd
Copy link
Collaborator

You are missing some dependencies.

It is strange that core_unix is not found. Try opam update ?

A handy command is opam install . --deps-only to install all dependencies of a git-cloned opam package.

You can also build and install yojson directly with opam: opam install yojson.

@Leonidas-from-XIV
Copy link
Member

There is also the option to avoid core_bench by just picking the main Yojson package and not building the benchmarks:

$ dune build --only-packages yojson

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

3 participants