i have set dual-boot intel skylake linux system (debian 8 , manjaro 16.08) shared /home, , use opam configure ocaml. find ocamlc works ocamlopt gives 'operand type mismatch' assembler errors when built on other system. 'opam switch reinstall' creates different format binaries each system. "elf 64-bit lsb executable, x86-64" vs "elf 32-bit lsb executable, intel 80386".
i change $opamroot outside /home , maintain separate versions, wondering system components have change have ocamlopt compatibility between these systems? debian has gcc 4.9.2-10 , manjaro gcc 6.1.1.
you cannot share same opam switch between 2 different operating systems, since have different architectures. can create 2 different switches, 1 per each operating system. use
opam switch <os-name> -a<compiler-version>
where <os-version>
arbitrary name os, e.g., debian
or manjaro
. , <compiler-version>
version of ocaml compiler, want use, e.g., 4.03
or 4.02.3
, etc.
later, can update profile, correct switch activated during bash startup, depending on current operating system.
Comments
Post a Comment