Opened 5 years ago

Closed 5 years ago

#58689 closed defect (fixed)

llvm-devel@365158: build error on < 10.7 due to missing definition for COPYFILE_CLONE

Reported by: kencu (Ken) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: snowleopard leopard tiger Cc: larryv (Lawrence Velázquez)
Port: llvm-devel

Description

In file included from /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_lang_llvm-devel/llvm-devel/work/trunk/lib/Support/Path.cpp:1113:
/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_lang_llvm-devel/llvm-devel/work/trunk/lib/Support/Unix/Path.inc:1164:14: error: use of undeclared identifier 'COPYFILE_CLONE'
      Flag = COPYFILE_CLONE;
             ^
1 error generated.
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o] Error 1

a simple replacement patch fixes this error:

in:
lib/Support/Unix/Path.inc

this small patch:
#include <copyfile.h>
+#ifndef COPYFILE_CLONE
+#define COPYFILE_CLONE		(1<<24)
+#endif
#elif defined(__DragonFly__)

I'll come up with a patch to add to llvm-devel for this in due course.

Change History (1)

comment:1 Changed 5 years ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In 270282e61b0df685147d10c49ad64c3fa942abe1/macports-ports (master):

llvm/clang-devel: move copyfile_clone fix to llvm patches

it is required to build llvm as well on some systems
when building with newer clang versions ( clang > 5.0 )
closes: #58689

Note: See TracTickets for help on using tickets.