First of all, I am new to OCaml so apologies in advance if I’ve missed something terribly obvious. I am super excited to be able to work on OCaml and FreeBSD!
I also acknowledge this is a FreeBSD specific topic but I’ve not been able to find anything in that community that addresses this issue. I promise that I will write up anything I learn and share it with both communities. I do believe there is nothing currently that addresses this topic specifically, but am happy to be shown that my search skills are weak .
That said, I am working on the Tezos project and work primarily in FreeBSD. There are a number of libraries that are used that frequently have GNU/Linux specific linker flags which cause difficulties. In the past I have installed the binutils package and this has seemed to fix things.
After spending more time on this and looking into it a bit further, I’m sure I’m not doing the right thing. I’ve come across issues  that indicate just throwing some GNU tools at the problem is not sufficient (and is likely causing issues).
I do have a specific example  that I’m working through now and I’m hoping to come out of this exercise with a solid understanding of how I should be building OCaml libraries on FreeBSD.
As it says in  I just symlinked ld to get the package to build, but this is clearly not a long term solution. Can someone help me understand how OCaml (or dune?) can potentially choose between different toolchains/tools?
Thanks so much for any advice.