-
Notifications
You must be signed in to change notification settings - Fork 130
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
Fix Windows compilation failure ppx_base
because of base
and ocaml_intrinsics_kernel
symbol clash
#165
Fix Windows compilation failure ppx_base
because of base
and ocaml_intrinsics_kernel
symbol clash
#165
Conversation
Why is moving the stub in another file enough to fix the issue ? |
This was my initial question:
This PR is based on @dra27's explanations:
|
Hmm, it appears I had only tested |
base
and ocaml_intrinsic_kernel
ppx_base
because of base
and ocaml_intrinsics_kernel
symbol clash
Yes, I’ve tested the branch and got the same error. After my comment, I’ve been in doubt if I set up the branch properly when I compiled the package and I’ve removed the comment. (after checking I confirm I was right, but I didn’t had the opportunity to connect here again :) |
Could you confirm that with both patches in base and ocaml_intrinsics_kernel, the compilation of ppx_base succeeds? |
I just tried this morning and with the two branches I’ve been able to build the package properly. (I did not test any code using it but the compilation went fine) |
aeb24fa
to
ea7d8e5
Compare
I've removed the symbol from |
For Windows compatibility, or it conflicts with the symbol provided by ocaml_intrinsics_kernel. Signed-off-by: Antonin Décimo <antonin@tarides.com>
ea7d8e5
to
7901518
Compare
Hi, thanks for your PR! |
Put
CAMLweakdef
function in its own translation unit for Windows compatibility, or it conflicts with other non-weakdef symbols with the same name from other libraries. There's a conflicting symbol inocaml_intrinsics_kernel
at: https://github.com/janestreet/ocaml_intrinsics_kernel/blob/1047d3186d0c6b498f1baa96024901cc3cbc2a19/src/conditional_stubs.c#L23-L26.Also note that the
caml_
prefix for C symbols is reserved by the OCaml runtime. I suggest JS libraries pick another prefix.