-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Continuing my ofStart.sh script issues, with compiling ofGen/compile.sh now.
Still on osx 10.15 / intel = xcode 12.4 max = limited to c++17.
Posting my findings. Maybe all this is because I'm edge-case.
The chalet bundle command from ofGen/compile.sh complained : ERROR: Could not find a suitable toolchain that matches 'apple-llvm'. Try configuring one manually, or ensuring the compiler is searchable from PATH. .
Setting up a chalet toolkit
Manually checking the toolkit: chalet configure -t apple-llvm returned the same.
xcode-select is correctly set to the toolkit. I even tried re-installing CommandLineTools 12.4.
chalet configure -t llvm worked but can't find std includes when building/bundling. It used clang-18.
Issue:
I have clang-18 installed from source with cmake.
which clang --> /usr/local/bin/clang but should be /usr/bin/clang.
Some trial & error:
rm /usr/local/bin/clang && rm /usr/local/bin/clang++ (aliases created by cmake/clang install)
Then I could configure chalet configure -t apple-llvm -a x86_64, but build fails due to broken toolchain.
Probably still the "cmake clang install" messing the default chalet toolchain.
Temporarily moving anything clang-18 out of /usr/local/bin/ still makes chalet configure ... fail.
Output : ERROR: .chaletrc: The requested toolchain of 'apple-llvm' (arch: x86_64) could either not be detected from PATH, or contained invalid tools. ERROR: .chaletrc: The toolchain's archive utility was blank or could not be found..
So I went for a custom chalet toolkit to ensure everything is ok:
# File : ~/.chalet/config.json
{
"options": {
# ...
},
"toolchains": {
"apple-llvm-custom": {
"version": "12.0.0",
"strategy": "native",
"buildPathStyle": "target-triple",
"compilerCpp": "/Library/Developer/CommandLineTools/usr/bin/clang++",
"compilerC": "/Library/Developer/CommandLineTools/usr/bin/clang",
"compilerWindowsResource": "",
"linker": "/Library/Developer/CommandLineTools/usr/bin/ld",
"archiver": "/Library/Developer/CommandLineTools/usr/bin/libtool",
"profiler": "",
"disassembler": "/Library/Developer/CommandLineTools/usr/bin/otool",
"cmake": "/usr/local/bin/cmake",
"make": "/Library/Developer/CommandLineTools/usr/bin/make",
"ninja": "/usr/local/bin/ninja"
}
},
# ...
}Then run: chalet clean --all and chalet configure -t apple-llvm-custom -a x86_64.
Everything fine with the toolkit.
Maybe we could pre-check for broken apple-llvm toolkit on mac ? (chalet check -p toolchain-name or chalet check -t apple-llvm ?)
Compiling with c++17
Now I pass the toolkit check for chalet build, but I get stuck on c++ errors, probably due to c++17, which I have forced here.