[TiFlash Usage Environment] Linux release 8.7/linux kernel 5.18.19
[TiFlash Version] v7.3.0
[Reproduction Path] After cloning the source code, download dependencies and execute the command cmake … -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_COMPILER=/usr/bin/clang-14 -DCMAKE_CXX_COMPILER=/usr/bin/clang+±14 -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DENABLE_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_FAILPOINTS=OFF -DJEMALLOC_NARENAS=-1 -Wno-dev -DUSE_CCACHE=OFF -DUSE_INTERNAL_SSL_LIBRARY=ON -DRUN_HAVE_STD_REGEX=0 -DTHINLTO_JOBS=224 -DENABLE_PCH=ON
[Encountered Problem: Phenomenon and Impact] Using the above command to compile version v6.5.1 has no issues, but it fails to compile in v7.3.0. How do you compile the TiFlash source code?
[Resource Configuration]
Most of the contents in the contrib directory are directly referenced from other projects.
You used to be able to compile it, but now you can’t. This is because the fmtlib package originally had a bug and has since been updated.
Related issue:
I can’t see the reason why you can’t compile it now because your stack trace information is incomplete.
At least I can be sure that compile.h should not be the problem because, according to the associated fmtlib version, this file hasn’t been updated for 2 years. It’s unlikely that it suddenly stopped working.
I think you can try following the suggestion to set use -ftemplate-backtrace-limit= to see all
and see which file the final error message points to, and whether that file has been updated. This might give you some clues.
Alternatively, try compiling fmtlib separately with the current compiler parameters. If the fmtlib project compiles without issues on its own, integrating it into TiFlash should also work.
I have tried compiling fmtlib separately without any issues. The fmtlib library is also compiled during the overall compilation of TiFlash. Therefore, I suspect that the compilation halt might be due to improper function calls to the fmtlib library by other modules.
It’s a bit strange. The error message is related to files under the dbms/src directory, and the content doesn’t even involve any calls, just a simple include. Yet, it still reports an error.
I just compiled it a few days ago, maybe it will help. The official TiFlash is also constantly being compiled, but your OS/CMake/Clang versions are different. Try aligning the versions and see if it works. If it still doesn’t work, I suggest asking here: https://internals.tidb.io/
Okay, apart from the version inconsistency, all other operations remain the same, but the aforementioned issue still occurs. I’ll keep looking for the cause.
I found the cause of the problem. LLVM must be manually compiled and installed. Previously, I installed LLVM and its devel package through yum, but a functional library was missing after installation, which led to the above issue.
There is another question. I have read some documents, and actually, TiFlash is derived from ClickHouse. In addition to system cache, ClickHouse can also configure application-level cache. Does TiFlash have related parameters to adjust the size of the application-level cache?