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


I’m attempting to construct the Apache Doris observe 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 reveals error like this:

Compiling as RELEASE
-- previous 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: /decide/homebrew/decide/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: /Functions/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 /decide/homebrew/decide/llvm/bin/clang /usr/bin/clang
ln: /usr/bin/clang: Operation not permitted

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

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

that is the which clang present:

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

that is the brew clang model:

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

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

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles