Comments (3)
Creating a switch with ocaml-base-compiler
v4.14.1 solved the issue.
before creating the switch :
~ $ opam switch list
# switch compiler description
→ default ocaml.5.0.0 default
~ $ opam switch create 4.14.1
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml-base-compiler" {= "4.14.1"} | "ocaml-system" {= "4.14.1"}]
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-options-vanilla.1
⬇ retrieved ocaml-base-compiler.4.14.1 (https://opam.ocaml.org/cache)
∗ installed ocaml-base-compiler.4.14.1
∗ installed ocaml-config.2
∗ installed ocaml.4.14.1
Done.
~ $ opam switch
# switch compiler description
→ 4.14.1 ocaml-base-compiler.4.14.1 4.14.1
default ocaml.5.0.0 default
and finally :
~ $ opam install utop
The following actions will be performed:
∗ install dune 3.10.0 [required by utop]
∗ install ocamlfind 1.9.6 [required by utop]
∗ install ocamlbuild 0.14.2 [required by logs]
∗ install xdg 3.10.0 [required by utop]
∗ install trie 1.0.0 [required by mew]
∗ install result 1.5 [required by zed]
∗ install csexp 1.5.2 [required by dune-configurator]
∗ install cppo 1.6.9 [required by utop]
∗ install base-bytes base [required by ocplib-endian]
∗ install uchar 0.0.2 [required by zed]
∗ install topkg 1.0.7 [required by logs]
∗ install mew 0.1.0 [required by mew_vi]
∗ install dune-configurator 3.10.0 [required by lwt]
∗ install ocplib-endian 1.2 [required by lwt]
∗ install uutf 1.0.3 [required by zed]
∗ install react 1.2.2 [required by utop]
∗ install lwt 5.7.0 [required by utop]
∗ install uucp 15.0.0 [required by zed]
∗ install mew_vi 0.5.0 [required by lambda-term]
∗ install lwt_react 1.2.0 [required by utop]
∗ install logs 0.7.0 [required by utop]
∗ install uuseg 15.0.0 [required by zed]
∗ install zed 3.2.3 [required by utop]
∗ install lambda-term 3.3.2 [required by utop]
∗ install utop 2.13.1
===== ∗ 25 =====
Do you want to continue? [Y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved cppo.1.6.9 (cached)
⬇ retrieved csexp.1.5.2 (cached)
⬇ retrieved lambda-term.3.3.2 (cached)
⬇ retrieved logs.0.7.0 (cached)
⬇ retrieved lwt.5.7.0 (cached)
⬇ retrieved lwt_react.1.2.0 (cached)
⬇ retrieved mew.0.1.0 (cached)
⬇ retrieved mew_vi.0.5.0 (cached)
⬇ retrieved ocamlbuild.0.14.2 (cached)
⬇ retrieved dune.3.10.0 (cached)
⬇ retrieved dune-configurator.3.10.0 (cached)
⬇ retrieved ocamlfind.1.9.6 (cached)
⬇ retrieved ocplib-endian.1.2 (cached)
⬇ retrieved react.1.2.2 (cached)
⬇ retrieved result.1.5 (cached)
⬇ retrieved trie.1.0.0 (cached)
⬇ retrieved topkg.1.0.7 (cached)
⬇ retrieved uchar.0.0.2 (cached)
⬇ retrieved utop.2.13.1 (cached)
⬇ retrieved uuseg.15.0.0 (cached)
⬇ retrieved uutf.1.0.3 (cached)
⬇ retrieved zed.3.2.3 (cached)
⬇ retrieved uucp.15.0.0 (cached)
⬇ retrieved xdg.3.10.0 (cached)
∗ installed ocamlfind.1.9.6
∗ installed base-bytes.base
∗ installed ocamlbuild.0.14.2
∗ installed uchar.0.0.2
∗ installed topkg.1.0.7
∗ installed uutf.1.0.3
∗ installed react.1.2.2
∗ installed dune.3.10.0
∗ installed csexp.1.5.2
∗ installed cppo.1.6.9
∗ installed result.1.5
∗ installed trie.1.0.0
∗ installed mew.0.1.0
∗ installed ocplib-endian.1.2
∗ installed xdg.3.10.0
∗ installed mew_vi.0.5.0
∗ installed dune-configurator.3.10.0
∗ installed lwt.5.7.0
∗ installed lwt_react.1.2.0
∗ installed logs.0.7.0
∗ installed uucp.15.0.0
∗ installed uuseg.15.0.0
∗ installed zed.3.2.3
∗ installed lambda-term.3.3.2
∗ installed utop.2.13.1
Done.
from utop.
The issue here is that utop requires xdg >= 3.9.0. The one installed in your switch fits, but for some reason you have a system-wide xdg library that takes precedence. One cause of this is that you're using a "system" switch with ocaml installed in /usr/bin
. Using a non-system opam switch (created with opam switch create ...
) should work. I'm not sure if this is supposed to work with a system switch.
from utop.
(I'll ask the opam team their opinion ; potentially that's also an issue with how your distribution packages things)
from utop.
Related Issues (20)
- utop/init.ml does not respect XDG on Windows
- Difference between utop & ocaml w.r.t. double semicolumn HOT 4
- Completion broken when running utop from emacs HOT 3
- doom-emacs *utop* buffer
- dune utop in emacs is not working
- Feature request: automatically reload/recompile changed files in `dune utop`
- utop should't crash when the library you load has the same name as utop's dependencies HOT 1
- Consistent Formatting of UTop/Utop/utop
- OCaml 5.2 support HOT 1
- Freezing on cyclic type abbreviations HOT 2
- Emacs doesn't automatically open .ocamlinit in utop HOT 1
- Inform users `utop` is missing on M-x utop
- type aliases weird behavior HOT 2
- Utop setting Sys.interactive to false when running script
- History silently not saved between sessions if parent directory of history file doesn't exist
- Colors not loaded from `~/.config/utop/utoprc`
- Unable to get `#edit_mode_vi` to work HOT 3
- `#thread;;` does not always work
- A possible workaround for supporting camlp5 on UTop
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utop.