janestreet / base

Standard library for OCaml
MIT License
848 stars 124 forks source link

Cannot build on system with only ocaml and dune installed. #144

Closed kant2002 closed 1 year ago

kant2002 commented 1 year ago

I do attempt to bring up base libraries for OCaml on the new arch (Loongarch64) and what's what I see

$ make
dune build
File "src/dune", line 11, characters 41-49:
11 |  (libraries base_internalhash_types caml sexplib0 shadow_stdlib)
                                              ^^^^^^^^
Error: Library "sexplib0" not found.
-> required by library "base" in _build/default/src
-> required by _build/default/META.base
-> required by _build/install/default/lib/base/META
-> required by _build/default/base.install
-> required by alias install
-> required by alias default
File "src/discover/dune", line 1, characters 41-58:
1 | (executables (names discover) (libraries dune-configurator)
                                             ^^^^^^^^^^^^^^^^^
Error: Library "dune-configurator" not found.
-> required by _build/default/src/discover/discover.exe
-> required by _build/default/src/mpopcnt.sexp
-> required by _build/default/src/am_testing.o
-> required by _build/default/src/dllbase_stubs.so
-> required by _build/install/default/lib/stublibs/dllbase_stubs.so
-> required by _build/default/base.install
-> required by alias install
-> required by alias default
make: *** [Makefile:4:default] 错误 1

is there something easy which can be done to at least partially build? I think I need to build this, in order to have bytes package which is required or building opam.

ceastlund commented 1 year ago

base.opam lists four dependencies to build base:

depends: [
  "ocaml" {>= "4.10.0"}
  "sexplib0"
  "dune"              {>= "2.0.0"}
  "dune-configurator"
]

So if what you have is ocaml and dune, you'll also need sexplib0 and dune-configurator. I don't know about building opam or a bytes package, but these are what you need for building base.