How to fix caml_out_channel_pos_fd primitive missing without adding '--disable genprim' option?

I got some warning when building a OCaml project as follows:

There are some missing primitives
Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime.
You can prevent the generation of dummy implementations with the commandline option '--disable genprim'
Missing primitives:

By adding --disable genprim in dune file such as facebook flow’s dune does would hide the warning.

    (flags --disable genprim))

Besides using the --disable genprim option, I was wondering if there may be any alternative way to fix the problem?

I’ve read this thread, it seems that not applying to my specific case.

I tried to Google “caml_out_channel_pos_fd”, and Goole only yield this result Don't bundle ppx_inline_test tests in release mode · Issue #897 · ocaml/dune · GitHub

There isn’t any result when Googling “expect_test_collector_after_test” or “expect_test_collector_before_test”