Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build MyTime.cpp.o failed because of mpp.pb.h not found randomly #4318

Closed
guo-shaoge opened this issue Mar 17, 2022 · 2 comments · Fixed by #4301 or #4331
Closed

Build MyTime.cpp.o failed because of mpp.pb.h not found randomly #4318

guo-shaoge opened this issue Mar 17, 2022 · 2 comments · Fixed by #4301 or #4331
Assignees
Labels
affects-6.0 severity/major type/bug The issue is confirmed as a bug.

Comments

@guo-shaoge
Copy link
Contributor

guo-shaoge commented Mar 17, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Sometimes we got the following compilation error. The full log is in build_failed.txt

[2022-03-16T07:33:12.674Z] FAILED: dbms/CMakeFiles/clickhouse_common_io.dir/src/Common/MyTime.cpp.o 
[2022-03-16T07:33:12.674Z] /usr/local/bin/clang++ -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB -DBOOST_CONTEXT_STATIC_LINK -DBOOST_FIBER_NO_LIB -DBOOST_FIBER_STATIC_LINK -DBOOST_SYSTEM_NO_DEPRECATED -DLZ4_DISABLE_DEPRECATE_WARNINGS=1 -DPOCO_STATIC -DPOCO_UNBUNDLED_ZLIB -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DTIFLASH_COMPILER_VPCLMULQDQ_SUPPORT=1 -DTIFLASH_ENABLE_AVX512_SUPPORT=1 -DTIFLASH_ENABLE_AVX_SUPPORT=1 -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/libs/libcommon/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/release-centos7-llvm/build-release/libs/libcommon/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/double-conversion -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/boost -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/kvproto/cpp -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/tipb/cpp -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/protobuf/src -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/grpc/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/client-c/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/xxHash -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/dbms/src -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/release-centos7-llvm/build-release/dbms/src -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/libpcg-random/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/libcityhash/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/libs/libpocoext/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/Data/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/Foundation/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/zlib-ng -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/release-centos7-llvm/build-release/contrib/zlib-ng -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/Util/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/XML/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/JSON/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/Net/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/cctz/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/jemalloc-cmake/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/jemalloc-cmake/include_linux_x86_64 -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/cpu_features/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/libcpuid/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/lz4/lib -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/zstd/lib -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/client-c/third_party/libfiu/libfiu -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/prometheus-cpp/core/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/release-centos7-llvm/build-release/contrib/prometheus-cpp-cmake/core/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/prometheus-cpp/push/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/release-centos7-llvm/build-release/contrib/prometheus-cpp-cmake/push/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/prometheus-cpp/pull/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/release-centos7-llvm/build-release/contrib/prometheus-cpp-cmake/pull/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/cpptoml -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/NetSSL_OpenSSL/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/poco/Crypto/include -I/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/xxHash/cmake_unofficial/.. -isystem /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/fmtlib-cmake/../fmtlib/include -isystem /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/contrib/boringssl/include -D__GLIBCXX_BITSIZE_INT_N_0=128 -D__GLIBCXX_TYPE_INT_N_0=__int128  -D_GLIBCXX_USE_CXX11_ABI=1 -pipe -msse4.1 -msse4.2 -mpopcnt  -fno-omit-frame-pointer  -Wall -Wno-unused-command-line-argument -Wno-unused-private-field  -Wnon-virtual-dtor  -stdlib=libc++ -Wextra -Werror -O2 -g -DNDEBUG -O3  -fPIC -DDUMMY_BACKTRACE -std=gnu++17 -MD -MT dbms/CMakeFiles/clickhouse_common_io.dir/src/Common/MyTime.cpp.o -MF dbms/CMakeFiles/clickhouse_common_io.dir/src/Common/MyTime.cpp.o.d -o dbms/CMakeFiles/clickhouse_common_io.dir/src/Common/MyTime.cpp.o -c /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/dbms/src/Common/MyTime.cpp
[2022-03-16T07:33:12.675Z] In file included from /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/dbms/src/Common/MyTime.cpp:18:
[2022-03-16T07:33:12.675Z] In file included from /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/dbms/src/Functions/FunctionsDateTime.h:32:
[2022-03-16T07:33:12.675Z] /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tics/dbms/src/Flash/Coprocessor/DAGContext.h:22:10: fatal error: 'kvproto/mpp.pb.h' file not found
[2022-03-16T07:33:12.675Z] #include <kvproto/mpp.pb.h>
[2022-03-16T07:33:12.675Z]          ^~~~~~~~~~~~~~~~~~

It's introduced by #4183. #4301 tried to fix it. Looks like it's ok now. But IMO the root cause is not located( because It's hard to reproduce this problem. Here is a build_succ.txt)

2. What did you expect to see? (Required)

build success.

3. What did you see instead (Required)

fatal error: 'kvproto/mpp.pb.h' file not found

4. What is your TiFlash version? (Required)

master dfed057

@guo-shaoge guo-shaoge added the type/bug The issue is confirmed as a bug. label Mar 17, 2022
@guo-shaoge guo-shaoge self-assigned this Mar 17, 2022
@JaySon-Huang
Copy link
Contributor

I think we should not make the lib common_io depends on these headers ${kvproto_SOURCE_DIR} ${tipb_SOURCE_DIR} ${Protobuf_INCLUDE_DIR} ${gRPC_INCLUDE_DIRS}.
It is because we include Functions/FunctionsDateTime.h in MyTime.cpp that cause this problem. Can we move the logic of AddSecondsImpl to somewhere in Common/xxx so that we can remove those headers from common_io and remove Functions/FunctionsDateTime.h from MyTime.cpp

@solotzg
Copy link
Contributor

solotzg commented Mar 17, 2022

If include the header files of one lib, you'd better link it so that cmake can reorder dependence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.0 severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
4 participants