[MacPorts] #60121: git-lfs @2.10.0 build cannot find <sys/clonefile.h> on macOS 10.11

MacPorts noreply at macports.org
Sun Feb 23 11:43:33 UTC 2020


#60121: git-lfs @2.10.0 build cannot find <sys/clonefile.h> on macOS 10.11
-----------------------+----------------------
 Reporter:  snowflake  |      Owner:  raimue
     Type:  defect     |     Status:  assigned
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.6.99
 Keywords:             |       Port:  git-lfs
-----------------------+----------------------
 The build fails within 5 seconds of starting with this error:
 {{{
 GOOS=darwin GOARCH=amd64 go build -ldflags=" -X github.com/git-lfs/git-
 lfs/config.GitCommit= -s -w " -gcflags="all=-trimpath="$HOME" "
 -asmflags="all=-trimpath="$HOME"" -trimpath -o ./bin/git-lfs ./git-lfs.go
 # github.com/git-lfs/git-lfs/tools
 tools/util_darwin.go:21:10: fatal error: 'sys/clonefile.h' file not found
 #include <sys/clonefile.h>
 }}}

 According to locate, this file does exist in two places for macOS:
 {{{
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/clonefile.h
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/clonefile.h
 }}}

 but it is not in /usr/include/sys

 clonefile is a system call which is implemented in macOS 10.12.x and
 later.

 There may be some logic in trying to include a file which either warns
 that clonefile is not available or which
 may not even exists on even older versions of macOS, but it eludes me at
 the moment.

 My system:
 {{{
 "macports_version": "2.6.99",
     "osx_version": "10.11",
     "os_arch": "i386",
     "os_platform": "darwin",
     "build_arch": "x86_64",
     "cxx_stdlib": "libc++",
     "gcc_version": "9.2.0",
     "xcode_version": "8.2.1",
     "clt_version": "8.2.0.0.1.1480973914"
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/60121>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list