Saturday, June 22, 2024
HomeApplehomebrew - ln: /usr/bin/clang: Operation not permitted

homebrew – ln: /usr/bin/clang: Operation not permitted


I’m attempting to construct the Apache Doris comply with the doc https://doris.apache.org/docs/set up/source-install/compilation-mac/ in macOS 13.3.1 terminal like this(I’ve already tried to reopen the terminal to make the clang env work):

./construct.sh

the a part of log exhibits error like this:

Compiling as RELEASE
-- outdated Boost_INCLUDE_DIR    : /Customers/xiaoqiangjiang/supply/third-party/doris/thirdparty/put in/embody
-- Discovered Increase: /Customers/xiaoqiangjiang/supply/third-party/doris/thirdparty/put in/lib64/cmake/Increase-1.81.0/BoostConfig.cmake (discovered model "1.81.0")
Increase discovered
-- Boost_INCLUDE_DIR    : /Customers/xiaoqiangjiang/supply/third-party/doris/thirdparty/put in/embody
-- In search of MapViewOfFile
-- In search of MapViewOfFile(0,0,0,0,0) - not discovered
-- In search of _close
-- In search of _close((int)0) - not discovered
-- In search of _read
-- In search of _read((int)0, (void*)0, (unsigned int)0) - not discovered
-- In search of _open
-- In search of _open(0,0,0) - not discovered
-- In search of _write
-- In search of _write((int)0, (const void*)0, (unsigned int)0) - not discovered
-- In search of _unlink
-- In search of _unlink((const char*)0) - not discovered
-- In search of _ftime
-- In search of _ftime(0) - not discovered
-- In search of _mkdir
-- In search of _mkdir((const char*)0) - not discovered
-- Checking assist new float byte<->float conversions
-- Checking assist new float byte<->float conversions - sure
CMake Error at CMakeLists.txt:268 (message):
  Want Clang model not less than 16

I’ve put in the brand new model of clang with homebrew, that is the brand new clang:

> clang --version
Homebrew clang model 18.1.7
Goal: arm64-apple-darwin22.4.0
Thread mannequin: posix
InstalledDir: /choose/homebrew/choose/llvm/bin

however the /usr/bin/clang nonetheless use the legacy model:

> /usr/bin/clang --version
Apple clang model 14.0.3 (clang-1403.0.22.14.1)
Goal: arm64-apple-darwin22.4.0
Thread mannequin: posix
InstalledDir: /Purposes/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

now I need to change the clang to specify to the brand new model of clang like this:

> sudo ln -sf /choose/homebrew/choose/llvm/bin/clang /usr/bin/clang
ln: /usr/bin/clang: Operation not permitted

Am I lacking one thing? is it potential to exchange the system clang in macOS 13.3.1? That is the trail in .zshrc:

export PATH="/choose/homebrew/choose/llvm/bin:$PATH"

that is the which clang present:

➜  doris git:(release-2.0.3) ✗ which clang
/choose/homebrew/choose/llvm/bin/clang

that is the brew clang model:

➜  doris git:(release-2.0.3) ✗ /choose/homebrew/choose/llvm/bin/clang --version

Homebrew clang model 18.1.7
Goal: arm64-apple-darwin22.4.0
Thread mannequin: posix
InstalledDir: /choose/homebrew/choose/llvm/bin

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments