- list-licenses.sh assumed GNU versions (e.g. the "-printf" flag of
find) but Mac ships with a non-GNU version
- this led to error
[8677/8942] Generating StorageSystemLicenses.generated.cpp
find: -printf: unknown primary or operator
find: -printf: unknown primary or operator
find: -printf: unknown primary or operator
find: -printf: unknown primary or operator
during build and as a result, an empty system.licenses table
- As a fix, force the GNU versions of find and grep on Mac
WEVERYTHING enables on Clang literally every warning. People on the
internet are divided if this is a good thing or not but ClickHouse
compiles with -Weverything + some exceptions for noisy warnings since at
least a year.
I tried to build with WEVERYTHING = OFF and the build was badly broken.
It seems nobody actually turns WEVERYTHING off. Actually, why would one
if the CI builds (configured with WEVERYTHING = ON) potentially generate
errors not generated in local development.
To simplify the build scripts and to remove the need to maintain two
sets of compiler warnings, I made WEVERYTHING the default and threw
WEVERYTHING = OFF out.
On Darwin, the build script tries to
1. use llvm-objcopy/llvm-strip from $PATH,
2. if not found by 1., use standard objcopy/strip from $PATH
The brew install instructions recommends to set $PATH to brew's binary
dir, so 2. will find something (assuming binutils is installed from
brew). If $PATH additionally points to brew's LLVM binary dir (which is
different from brew's binary dir), 1. will find the llvm versions of the
tools.
This commit removes additional logic which repeats above steps in a more
implicit way by calling brew internally and figuring out the paths once
more if 1. and 2. cannot find them in the $PATH. This removes
duplication and simplifies the script. Maybe it even helps with
reproducibility.
- instead of repeating Homebrew's installation steps (which may become
outdated), just point to their homepage
- Specify CC and CXX env variables instead of internal CMake variables,
CMake figure out paths to ar, ranlib and objcopy automatically
- use -S and -B parameters available in recent CMake versions to build
directly from the source directory
- the guide talked about 'testmode' but that doesn't seem to exist
anymore (grep for it ...), and the command works w/o 'testmode'
- also replaced parameter '-n' by its full form '--multiquery' for
readability
'