Opened 4 years ago

Closed 4 years ago

#61349 closed defect (fixed)

ccache @4.0: error: use of undeclared identifier 'CLONE_NOOWNERCOPY'

Reported by: chrstphrchvz (Christopher Chavez) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: sierra Cc:
Port: ccache

Description

Build fails on macOS 10.12. During configuration, sys/clonefile.h is detected:

-- Looking for sys/clonefile.h
-- Looking for sys/clonefile.h - found

…but fails to compile:

[ 60%] Building CXX object src/CMakeFiles/ccache_lib.dir/cleanup.cpp.o
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/build/src && /usr/bin/clang++ -DUSE_XXH_DISPATCH -DXXH_STATIC_LINKING_ONLY -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/build -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/. -isystem /opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.12 -Wdouble-promotion -std=c++11 -o CMakeFiles/ccache_lib.dir/cleanup.cpp.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/cleanup.cpp
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/Util.cpp:259:44: error: use of undeclared identifier 'CLONE_NOOWNERCOPY'
  if (clonefile(src.c_str(), dest.c_str(), CLONE_NOOWNERCOPY) != 0) {
                                           ^

CLONE_NOOWNERCOPY was introduced in macOS 10.13; not sure if it can be used at all on 10.12, or if ccache should instead pretend sys/clonefile.h isn't available on 10.12 and use its fallback implementation in this case.

This is separate from the issue in #61347, since sys/clonefile.h is correctly not detected on macOS 10.11 and earlier.

Change History (2)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: sierra added
Status: assignedaccepted
Summary: ccache 4.0: error: use of undeclared identifier 'CLONE_NOOWNERCOPY'ccache @4.0: error: use of undeclared identifier 'CLONE_NOOWNERCOPY'

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In e50074d719c4b850c5dc6e467d20275b8ffd4872/macports-ports (master):

ccache: Fix build on macOS 10.12

Closes: #61349

Note: See TracTickets for help on using tickets.