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 fail in Mac #6559

Closed
Lloyd-Pottiger opened this issue Dec 29, 2022 · 2 comments · Fixed by #6560
Closed

build fail in Mac #6559

Lloyd-Pottiger opened this issue Dec 29, 2022 · 2 comments · Fixed by #6560
Assignees
Labels
severity/minor type/bug The issue is confirmed as a bug.

Comments

@Lloyd-Pottiger
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

cmake .. -GNinja
ninja tiflash

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

build success

3. What did you see instead (Required)

FAILED: dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/FunctionsRegexp.cpp.o 
/opt/homebrew/bin/ccache /opt/homebrew/opt/llvm/bin/clang++ -DBOOST_BIND_GLOBAL_PLACEHOLDERS -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB -DBOOST_CONTEXT_STATIC_LINK -DBOOST_FIBER_NO_LIB -DBOOST_FIBER_STATIC_LINK -DBOOST_NO_CXX98_FUNCTION_BASE -DBOOST_SYSTEM_NO_DEPRECATED -DCARES_STATICLIB -DFIU_ENABLE -DLZ4_DISABLE_DEPRECATE_WARNINGS=1 -DMULTIPLE_CONTEXT_GTEST -DPOCO_STATIC -DPOCO_UNBUNDLED_ZLIB -DTIFLASH_COMPILER_VPCLMULQDQ_SUPPORT=0 -DTIFLASH_ENABLE_ASIMD_SUPPORT=1 -DTIFLASH_SOURCE_PREFIX=\"/Users/lloyd/projects/tiflash\" -I/Users/lloyd/projects/tiflash/contrib/libdivide -I/Users/lloyd/projects/tiflash/contrib/libmetrohash/src -I/Users/lloyd/projects/tiflash/contrib/libfarmhash -I/Users/lloyd/projects/tiflash/dbms/src -I/Users/lloyd/projects/tiflash/contrib/tiflash-proxy/raftstore-proxy/ffi/src -I/Users/lloyd/projects/tiflash/build/dbms/src -I/Users/lloyd/projects/tiflash/contrib/double-conversion -I/Users/lloyd/projects/tiflash/contrib/boost -I/Users/lloyd/projects/tiflash/contrib/xxHash -I/Users/lloyd/projects/tiflash/contrib/libpcg-random/include -I/Users/lloyd/projects/tiflash/contrib/libcityhash/include -I/Users/lloyd/projects/tiflash/libs/libcommon/include -I/Users/lloyd/projects/tiflash/build/libs/libcommon/include -I/Users/lloyd/projects/tiflash/libs/libpocoext/include -I/Users/lloyd/projects/tiflash/contrib/poco/Data/include -I/Users/lloyd/projects/tiflash/contrib/poco/Foundation/include -I/Users/lloyd/projects/tiflash/contrib/zlib-ng -I/Users/lloyd/projects/tiflash/build/contrib/zlib-ng -I/Users/lloyd/projects/tiflash/contrib/poco/Util/include -I/Users/lloyd/projects/tiflash/contrib/poco/XML/include -I/Users/lloyd/projects/tiflash/contrib/poco/JSON/include -I/Users/lloyd/projects/tiflash/contrib/poco/Net/include -I/Users/lloyd/projects/tiflash/contrib/cctz/include -I/Users/lloyd/projects/tiflash/contrib/lz4/lib -I/Users/lloyd/projects/tiflash/contrib/zstd/lib -I/Users/lloyd/projects/tiflash/contrib/client-c/third_party/libfiu/libfiu -I/Users/lloyd/projects/tiflash/contrib/prometheus-cpp/core/include -I/Users/lloyd/projects/tiflash/build/contrib/prometheus-cpp-cmake/core/include -I/Users/lloyd/projects/tiflash/contrib/prometheus-cpp/push/include -I/Users/lloyd/projects/tiflash/build/contrib/prometheus-cpp-cmake/push/include -I/Users/lloyd/projects/tiflash/contrib/prometheus-cpp/pull/include -I/Users/lloyd/projects/tiflash/build/contrib/prometheus-cpp-cmake/pull/include -I/Users/lloyd/projects/tiflash/contrib/cpptoml -I/Users/lloyd/projects/tiflash/contrib/magic_enum/include -I/Users/lloyd/projects/tiflash/contrib/poco/NetSSL_OpenSSL/include -I/Users/lloyd/projects/tiflash/contrib/poco/Crypto/include -I/Users/lloyd/projects/tiflash/contrib/xxHash/cmake_unofficial/.. -I/Users/lloyd/projects/tiflash/build/contrib/kvproto/cpp -I/Users/lloyd/projects/tiflash/build/contrib/kvproto/cpp/kvproto -I/Users/lloyd/projects/tiflash/contrib/grpc/include -I/Users/lloyd/projects/tiflash/contrib/abseil-cpp -I/Users/lloyd/projects/tiflash/contrib/client-c/include -I/Users/lloyd/projects/tiflash/build/contrib/grpc/third_party/cares/cares -I/Users/lloyd/projects/tiflash/contrib/grpc/third_party/cares/cares -I/Users/lloyd/projects/tiflash/build/contrib/tipb/cpp -I/Users/lloyd/projects/tiflash/build/dbms/src/Storages/DeltaMerge/File/dtpb -I/Users/lloyd/projects/tiflash/contrib/libbtrie/include -I/Users/lloyd/projects/tiflash/build/contrib/libfarmhash -isystem /Users/lloyd/projects/tiflash/contrib/fmtlib-cmake/../fmtlib/include -isystem /Users/lloyd/projects/tiflash/libs/libsymbolization/include -isystem /Users/lloyd/projects/tiflash/contrib/boringssl/include -isystem /Users/lloyd/projects/tiflash/contrib/protobuf/src -isystem /Users/lloyd/projects/tiflash/contrib/re2 -isystem /Users/lloyd/projects/tiflash/build/contrib/re2-cmake -pipe -march=armv8.2-a+crypto+ssbs+dotprod+simd  -fno-omit-frame-pointer  -Wall -Wno-unused-command-line-argument  -Wnon-virtual-dtor  -Wextra -Werror -g -g3 -ggdb3 -O0 -fverbose-asm -fno-inline  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIC -DDUMMY_BACKTRACE -std=gnu++17 -MD -MT dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/FunctionsRegexp.cpp.o -MF dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/FunctionsRegexp.cpp.o.d -o dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/FunctionsRegexp.cpp.o -c /Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.cpp
In file included from /Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.cpp:17:
In file included from /Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:35:
In file included from /Users/lloyd/projects/tiflash/dbms/src/Functions/Regexps.h:16:
In file included from /Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.h:145:
/Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.inl.h:620:34: error: reinterpret_cast from 'long' to 'Int64' (aka 'long long') is not allowed
        auto skipped_byte_size = reinterpret_cast<Int64>(matched_str.data() - (subject + prior_offset));
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.inl.h:683:16: note: in instantiation of member function 'OptimizedRegularExpressionImpl<false>::replaceAllImpl' requested here
        return replaceAllImpl(subject, subject_size, res_data, res_offset, repl, byte_pos);
               ^
/Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.inl.h:739:5: note: in instantiation of member function 'OptimizedRegularExpressionImpl<false>::replaceImpl' requested here
    replaceImpl(subject, subject_size, res_data, res_offset, repl, byte_pos, occur);
    ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:2108:29: note: in instantiation of member function 'OptimizedRegularExpressionImpl<false>::replace' requested here
                    regexp->replace(expr_ref.data, expr_ref.size, res_data, res_offset, repl_ref, pos, occur);
                            ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:2240:9: note: in instantiation of function template specialization 'DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>::executeRegexpFunc<DB::Param<DB::ParamString<false>, true>, DB::Param<DB::ParamString<false>, true>, DB::Param<DB::ParamString<false>, true>, DB::Param<DB::ParamInt<false>, true>, DB::Param<DB::ParamInt<false>, true>, DB::Param<DB::ParamString<false>, true>>' requested here
        GET_ACTUAL_PARAMS_AND_EXECUTE()
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1936:9: note: expanded from macro 'GET_ACTUAL_PARAMS_AND_EXECUTE'
        GET_EXPR_ACTUAL_PARAM()         \
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1929:78: note: expanded from macro 'GET_EXPR_ACTUAL_PARAM'
        GET_ACTUAL_STRING_PARAM(EXPR_PV_VAR_NAME, EXPR_PARAM_PTR_VAR_NAME, ({GET_PAT_ACTUAL_PARAM()})) \
                                                                             ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1922:76: note: expanded from macro 'GET_PAT_ACTUAL_PARAM'
        GET_ACTUAL_STRING_PARAM(PAT_PV_VAR_NAME, PAT_PARAM_PTR_VAR_NAME, ({GET_REPL_ACTUAL_PARAM()})) \
                                                                           ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1894:90: note: expanded from macro 'GET_MATCH_TYPE_ACTUAL_PARAM'
        GET_ACTUAL_STRING_PARAM(MATCH_TYPE_PV_VAR_NAME, MATCH_TYPE_PARAM_PTR_VAR_NAME, ({EXECUTE_REGEXP_REPLACE()})) \
                                                                                         ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1887:9: note: expanded from macro 'EXECUTE_REGEXP_REPLACE'
        REGEXP_CLASS_MEM_FUNC_IMPL_NAME(RES_ARG_VAR_NAME, *(EXPR_PARAM_PTR_VAR_NAME), *(PAT_PARAM_PTR_VAR_NAME), *(REPL_PARAM_PTR_VAR_NAME), *(POS_PARAM_PTR_VAR_NAME), *(OCCUR_PARAM_PTR_VAR_NAME), *(MATCH_TYPE_PARAM_PTR_VAR_NAME)); \
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:772:41: note: expanded from macro 'REGEXP_CLASS_MEM_FUNC_IMPL_NAME'
#define REGEXP_CLASS_MEM_FUNC_IMPL_NAME executeRegexpFunc
                                        ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:294:37: note: in instantiation of member function 'DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>::executeImpl' requested here
        ::new ((void*)__get_elem()) _Tp(_VSTD::forward<_Args>(__args)...);
                                    ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:953:55: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1948:62: note: in instantiation of function template specialization 'std::make_shared<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>, void>' requested here
    static FunctionPtr create(const Context &) { return std::make_shared<FunctionStringRegexpReplace>(); }
                                                             ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionFactory.h:79:67: note: in instantiation of member function 'DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>::create' requested here
        return std::make_shared<DefaultFunctionBuilder>(Function::create(context));
                                                                  ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionFactory.h:59:37: note: in instantiation of function template specialization 'DB::FunctionFactory::createDefaultFunction<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>>' requested here
            registerFunction(name, &createDefaultFunction<Function>, case_sensitiveness);
                                    ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionFactory.h:52:9: note: in instantiation of function template specialization 'DB::FunctionFactory::registerFunction<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>>' requested here
        registerFunction<Function>(Function::name, case_sensitiveness);
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.cpp:35:13: note: in instantiation of function template specialization 'DB::FunctionFactory::registerFunction<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>>' requested here
    factory.registerFunction<FunctionRegexpReplace>();
            ^
In file included from /Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.cpp:17:
In file included from /Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:35:
In file included from /Users/lloyd/projects/tiflash/dbms/src/Functions/Regexps.h:16:
In file included from /Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.h:145:
/Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.inl.h:661:29: error: reinterpret_cast from 'long' to 'Int64' (aka 'long long') is not allowed
    auto prefix_byte_size = reinterpret_cast<Int64>(matched_str.data() - subject);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.inl.h:685:16: note: in instantiation of member function 'OptimizedRegularExpressionImpl<false>::replaceOneImpl' requested here
        return replaceOneImpl(subject, subject_size, res_data, res_offset, repl, byte_pos, occur);
               ^
/Users/lloyd/projects/tiflash/dbms/src/Common/OptimizedRegularExpression.inl.h:739:5: note: in instantiation of member function 'OptimizedRegularExpressionImpl<false>::replaceImpl' requested here
    replaceImpl(subject, subject_size, res_data, res_offset, repl, byte_pos, occur);
    ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:2108:29: note: in instantiation of member function 'OptimizedRegularExpressionImpl<false>::replace' requested here
                    regexp->replace(expr_ref.data, expr_ref.size, res_data, res_offset, repl_ref, pos, occur);
                            ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:2240:9: note: in instantiation of function template specialization 'DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>::executeRegexpFunc<DB::Param<DB::ParamString<false>, true>, DB::Param<DB::ParamString<false>, true>, DB::Param<DB::ParamString<false>, true>, DB::Param<DB::ParamInt<false>, true>, DB::Param<DB::ParamInt<false>, true>, DB::Param<DB::ParamString<false>, true>>' requested here
        GET_ACTUAL_PARAMS_AND_EXECUTE()
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1936:9: note: expanded from macro 'GET_ACTUAL_PARAMS_AND_EXECUTE'
        GET_EXPR_ACTUAL_PARAM()         \
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1929:78: note: expanded from macro 'GET_EXPR_ACTUAL_PARAM'
        GET_ACTUAL_STRING_PARAM(EXPR_PV_VAR_NAME, EXPR_PARAM_PTR_VAR_NAME, ({GET_PAT_ACTUAL_PARAM()})) \
                                                                             ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1922:76: note: expanded from macro 'GET_PAT_ACTUAL_PARAM'
        GET_ACTUAL_STRING_PARAM(PAT_PV_VAR_NAME, PAT_PARAM_PTR_VAR_NAME, ({GET_REPL_ACTUAL_PARAM()})) \
                                                                           ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1894:90: note: expanded from macro 'GET_MATCH_TYPE_ACTUAL_PARAM'
        GET_ACTUAL_STRING_PARAM(MATCH_TYPE_PV_VAR_NAME, MATCH_TYPE_PARAM_PTR_VAR_NAME, ({EXECUTE_REGEXP_REPLACE()})) \
                                                                                         ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1887:9: note: expanded from macro 'EXECUTE_REGEXP_REPLACE'
        REGEXP_CLASS_MEM_FUNC_IMPL_NAME(RES_ARG_VAR_NAME, *(EXPR_PARAM_PTR_VAR_NAME), *(PAT_PARAM_PTR_VAR_NAME), *(REPL_PARAM_PTR_VAR_NAME), *(POS_PARAM_PTR_VAR_NAME), *(OCCUR_PARAM_PTR_VAR_NAME), *(MATCH_TYPE_PARAM_PTR_VAR_NAME)); \
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:772:41: note: expanded from macro 'REGEXP_CLASS_MEM_FUNC_IMPL_NAME'
#define REGEXP_CLASS_MEM_FUNC_IMPL_NAME executeRegexpFunc
                                        ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:294:37: note: in instantiation of member function 'DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>::executeImpl' requested here
        ::new ((void*)__get_elem()) _Tp(_VSTD::forward<_Args>(__args)...);
                                    ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:953:55: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
                                                      ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.h:1948:62: note: in instantiation of function template specialization 'std::make_shared<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>, void>' requested here
    static FunctionPtr create(const Context &) { return std::make_shared<FunctionStringRegexpReplace>(); }
                                                             ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionFactory.h:79:67: note: in instantiation of member function 'DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>::create' requested here
        return std::make_shared<DefaultFunctionBuilder>(Function::create(context));
                                                                  ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionFactory.h:59:37: note: in instantiation of function template specialization 'DB::FunctionFactory::createDefaultFunction<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>>' requested here
            registerFunction(name, &createDefaultFunction<Function>, case_sensitiveness);
                                    ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionFactory.h:52:9: note: in instantiation of function template specialization 'DB::FunctionFactory::registerFunction<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>>' requested here
        registerFunction<Function>(Function::name, case_sensitiveness);
        ^
/Users/lloyd/projects/tiflash/dbms/src/Functions/FunctionsRegexp.cpp:35:13: note: in instantiation of function template specialization 'DB::FunctionFactory::registerFunction<DB::FunctionStringRegexpReplace<DB::NameRegexpReplace>>' requested here
    factory.registerFunction<FunctionRegexpReplace>();
            ^
2 errors generated.
[664/867] Building CXX object dbms/src/Functions/CMakeFiles/clickhouse_functions.dir/FunctionsTiDBConversion.cpp.o
ninja: build stopped: subcommand failed.

4. What is your TiFlash version? (Required)

master

@Lloyd-Pottiger Lloyd-Pottiger added the type/bug The issue is confirmed as a bug. label Dec 29, 2022
@Lloyd-Pottiger
Copy link
Contributor Author

/assign @xzhangxian1008

@xzhangxian1008
Copy link
Contributor

Before fixing this bug, you can comment this code for the workaround purpose

@LittleFall LittleFall added type/bug The issue is confirmed as a bug. and removed type/bug The issue is confirmed as a bug. labels Dec 29, 2022
ti-chi-bot pushed a commit that referenced this issue Dec 29, 2022
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this issue Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants