I've already tried to fix it in a local pin by adding -fPIC to the _tags file and then by setting "export CFLAGS=-fPIC", but without success. However, this was just a try, since I don't have any deeper knowledge about the build process or ocamlbuild yet :-)
Just let me know if you need more details about my setup.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux testing (stretch)
Release: testing
Codename: stretch
$ uname -a
Linux k0ld 4.7.0-1-amd64 #1 SMP Debian 4.7.8-1 (2016-10-19) x86_64 GNU/Linux
ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package ocb-stubblr myocamlbuild.ml /home/lobo/.opam/4.03.0/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
+ ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package ocb-stubblr myocamlbuild.ml /home/lobo/.opam/4.03.0/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(startup_aux.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(fail.o): relocation R_X86_64_32 against symbol `caml_exn_Failure' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(roots.o): relocation R_X86_64_32 against symbol `caml_frametable' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(globroots.o): relocation R_X86_64_32 against symbol `caml_global_roots' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(signals.o): relocation R_X86_64_32S against undefined symbol `caml_pending_signals' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(signals_asm.o): relocation R_X86_64_32S against symbol `caml_system__code_end' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(freelist.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(misc.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(major_gc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(minor_gc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(memory.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(alloc.o): relocation R_X86_64_32S against undefined symbol `caml_atom_table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(compare.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(ints.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(floats.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(str.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(array.o): relocation R_X86_64_32 against undefined symbol `caml_atom_table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(io.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(extern.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(intern.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(hash.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(sys.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(parsing.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(gc_ctrl.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(obj.o): relocation R_X86_64_32S against undefined symbol `caml_atom_table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(lexing.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(printexc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(callback.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(weak.o): relocation R_X86_64_32 against symbol `caml_ephe_ref_table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(compact.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(finalise.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(custom.o): relocation R_X86_64_32 against symbol `caml_custom_table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(unix.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(backtrace.o): relocation R_X86_64_32 against symbol `caml_backtrace_last_exn' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/lobo/.opam/4.03.0/lib/ocaml/libasmrun.a(startup.o): relocation R_X86_64_32S against symbol `caml_data_segments' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
Command exited with code 2.
I've already tried to fix it in a local pin by adding -fPIC to the _tags file and then by setting "export CFLAGS=-fPIC", but without success. However, this was just a try, since I don't have any deeper knowledge about the build process or ocamlbuild yet :-)
Just let me know if you need more details about my setup.
~/.opam/4.03.0/build/cpuid.dev~mirage/cpuid-20385-af57d6.out
~/.opam/4.03.0/build/cpuid.dev~mirage/cpuid-20385-af57d6.err
_tags