Fixed ld error and override warning when compiling xbcloud-t. (when using the -DWITH_UNIT_TESTS:BOOL=TRUE
cmake flag)
#1676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to reproduce
Used CMake flags
CMAKE_SRC_CONFIGURE_PARAMS=( -DBUILD_CONFIG:STRING=xtrabackup_release -DINSTALL_LAYOUT:STRING="RPM" -DENABLED_PROFILING:BOOL=TRUE -DENABLE_GCOV:BOOL=FALSE -DENABLE_GPROF:BOOL=FALSE -DENABLED_LOCAL_INFILE:BOOL=TRUE -DWITH_ASAN:BOOL=FALSE -DWITH_EXTRA_CHARSETS:STRING=all -DWITH_EDITLINE:STRING=system -DWITH_UNIT_TESTS:BOOL=TRUE -DWITH_VALGRIND:BOOL=FALSE -DWITH_ZLIB:STRING=system -DWITH_SSL:STRING=system -DWITH_CLIENT_PROTOCOL_TRACING:BOOL=FALSE -DWITH_LZ4:STRING=system -DWITH_MSAN:BOOL=FALSE -DWITH_PROTOBUF:STRING=bundled -DWITH_TEST_TRACE_PLUGIN:BOOL=FALSE -DWITH_UBSAN:BOOL=FALSE -DWITH_XTRABACKUP:BOOL=TRUE -DWITH_FIDO=system -DWITH_ICU=system -DWITH_RAPIDJSON:STRING=bundled -DWITH_MAN_PAGES=OFF )
Configure
cmake -B build ${CMAKE_SRC_CONFIGURE_PARAMS[@]}
Compile
cmake --build build -j$(nproc)
Install (optional)
Results
The warning appears at 26% of the compilation:

And the error at 27% of the compilation:

Notes
Also... I'm wondering, how I can run the unit tests after compilation?