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

C library on byte architectures? #71

Open
Niols opened this issue Mar 1, 2019 · 1 comment
Open

C library on byte architectures? #71

Niols opened this issue Mar 1, 2019 · 1 comment

Comments

@Niols
Copy link
Member

Niols commented Mar 1, 2019

Currently, we don't build the C library on byte architecture. Before Dune, we were building it incorrectly. Now we simply don't build it at all. Is there a good reason for that, @yurug?

@Niols
Copy link
Member Author

Niols commented Mar 6, 2019

To reproduce:

  • Put your self in a bytecode-only environment. For instance using OPAM:

    • opam switch create 4.04.2+bytecode-only
    • eval $(opam env)
    • Check that you don't have an other annoying ocamlopt with which ocamlopt
  • Make sure to have the right dependencies. With OPAM:

    • opam install . --deps-only
    • Menhir will cause a problem. You'll have to:
      • Download the release from https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz
      • Untar it: tar xf archive.tar.gz && cd menhir-20181113-*
      • Build it: make PREFIX=~/.opam/4.04.2+bytecode-only/ TARGET=byte
      • Install it: make install PREFIX=~/.opam/4.04.2+bytecode-only/ TARGET=byte
      • (Optionnal) Make OPAM believe everything went fine: opam install --fake menhir
  • Make Morbig build the C library.

    • Either by checking out on a previous commit: get checkout 69a3f8c,
    • Or by copying src/c/dune.native into src/c/dune.
  • Try to build: make


dune build @install
      ocamlc src/cstub.exe.o (exit 2)
(cd _build/default && /home/niols/.opam/4.04.2+bytecode-only/bin/ocamlc -w @a-4-29-40-41-42-44-45-48-58-59-60-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o src/cstub.exe.o -output-complete-obj -I /home/niols/.opam/4.04.2+bytecode-only/lib/biniou -I /home/niols/.opam/4.04.2+bytecode-only/lib/easy-format -I /home/niols/.opam/4.04.2+bytecode-only/lib/menhirLib -I /home/niols/.opam/4.04.2+bytecode-only/lib/ppx_deriving -I /home/niols/.opam/4.04.2+bytecode-only/lib/ppx_deriving_yojson/runtime -I /home/niols/.opam/4.04.2+bytecode-only/lib/result -I /home/niols/.opam/4.04.2+bytecode-only/lib/visitors -I /home/niols/.opam/4.04.2+bytecode-only/lib/yojson -I src /home/niols/.opam/4.04.2+bytecode-only/lib/easy-format/easy_format.cma /home/niols/.opam/4.04.2+bytecode-only/lib/biniou/biniou.cma /home/niols/.opam/4.04.2+bytecode-only/lib/yojson/yojson.cma /home/niols/.opam/4.04.2+bytecode-only/lib/result/result.cma /home/niols/.opam/4.04.2+bytecode-only/lib/ppx_deriving/ppx_deriving_runtime.cma /home/niols/.opam/4.04.2+bytecode-only/lib/ppx_deriving_yojson/runtime/ppx_deriving_yojson_runtime.cma /home/niols/.opam/4.04.2+bytecode-only/lib/visitors/VisitorsRuntime.cma /home/niols/.opam/4.04.2+bytecode-only/lib/ocaml/str.cma /home/niols/.opam/4.04.2+bytecode-only/lib/menhirLib/menhirLib.cmo src/morbig.cma src/CAPI.cma src/.cstub.eobjs/byte/cstub.cmo)
File "_none_", line 1:
Error: Cannot overwrite existing file /tmp/camlobj407363.c
make: *** [Makefile:12: build] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant