Hi,
I tried the example on here “https://reasonml.github.io/docs/en/installation” for compiling javascript and receive an error when running the ‘esy’ command. It appears to be a problem with linking OCaml with GCC.
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libcamlrund.a(backtrace_bd.o):/home/user/.esy/3/b/ocaml-4.8.1000-e74c5c0d/runtime/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlruni.a(backtrace_bi.o):/home/user/.esy/3/b/ocaml-4.8.1000-e74c5c0d/runtime/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlrund.a(backtrace_byt_bd.o):/home/user/.esy/3/b/ocaml-4.8.1000-e74c5c0d/runtime/backtrace_byt.c:47: first defined here
libcamlruni.a(backtrace_byt_bi.o):/home/user/.esy/3/b/ocaml-4.8.1000-e74c5c0d/runtime/backtrace_byt.c:47: first defined here
collect2: error: ld returned 1 exit status
I’ve had a search for the issue and thought it might be something to do with this “https://discuss.ocaml.org/t/cannot-install-ocaml-4-07-1-multiple-definition-of-caml-debug-info/5996”, but the discussion therein suggests it was fixed by 4.09.
I am using gcc (Gentoo 10.3.0 p1) 10.3.0
Please advise if I can usefully provide more information or if I have missed anything obvious.
For the hello world example it compiles and works fine and seems to use ocaml@4.10.0@d41d8cd9 rather than ocaml@4.8.1000, which might be the issue?
It sounds like it might be an OCaml bug rather than a Reason bug, but in any event, I thought worth flagging given it appears to affect the examples.