[MacPorts] #68463: ocaml-dune build error: error: 'COPYFILE_CLONE' undeclared (first use in this function); did you mean 'COPYFILE_MOVE'?

MacPorts noreply at macports.org
Tue Dec 31 01:49:36 UTC 2024


#68463: ocaml-dune build error: error: 'COPYFILE_CLONE' undeclared (first use in
this function); did you mean 'COPYFILE_MOVE'?
---------------------------+----------------------
  Reporter:  barracuda156  |      Owner:  landonf
      Type:  defect        |     Status:  reopened
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.10.5
Resolution:                |   Keywords:
      Port:  ocaml-dune    |
---------------------------+----------------------
Changes (by barracuda156):

 * status:  closed => reopened
 * version:  2.8.1 => 2.10.5
 * resolution:  fixed =>


Comment:

 We are back to this breakage. Looks like it was just unnoticed, because
 Opam uses Dune opportunistically, and build conflict was dropped in the
 meanwhile. So everything works as long as Dune is available in MacPorts
 prefix, but breaks down otherwise.

 Here is the fix:
 {{{
 post-extract {
     xinstall -d ${worksrcpath}/src_ext/patches/dune-local
     copy ${filespath}/fix-bundled-dune.patch \
                     ${worksrcpath}/src_ext/patches/dune-local
 }
 }}}

 And the patch itself:
 {{{
 --- a/otherlibs/stdune/src/copyfile_stubs.c
 +++ b/otherlibs/stdune/src/copyfile_stubs.c
 @@ -15,6 +15,10 @@
  #include <string.h>
  #include <sys/syslimits.h>

 +#ifndef COPYFILE_CLONE
 +#define COPYFILE_CLONE (1<<24)
 +#endif
 +
  CAMLprim value stdune_copyfile(value v_from, value v_to) {
    CAMLparam2(v_from, v_to);
    caml_unix_check_path(v_from, "copyfile");
 }}}

 The patch is just borrowed from Dune port, see:
 https://github.com/macports/macports-
 ports/commit/0c68154e8b71366705a3df02376b0934eb1f7fae

-- 
Ticket URL: <https://trac.macports.org/ticket/68463#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list