pingcap / tiflash

The analytical engine for TiDB and TiDB Cloud. Try free: https://tidbcloud.com/free-trial
https://docs.pingcap.com/tidb/stable/tiflash-overview
Apache License 2.0
937 stars 409 forks source link

tiflash failed to be built on mac #9101

Closed JaySon-Huang closed 1 month ago

JaySon-Huang commented 1 month ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

tiflash failed to be built on mac

ninja gtests_dbms tiflash -j4
...
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/dbms/src/Common/MemoryAllocTrace.cpp:29:5: error: no matching function for call to 'je_mallctl'
    je_mallctl("thread.allocatedp", reinterpret_cast<void *>(&ptr1), &size1, nullptr, 0);
    ^~~~~~~~~~
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/release-darwin/build-release/contrib/jemalloc-cmake/include/jemalloc/jemalloc_rename.h:11:20: note: expanded from macro 'je_mallctl'
#define je_mallctl je_mallctl
                   ^~~~~~~~~~
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/contrib/jemalloc-cmake/include/jemalloc/jemalloc_protos.h:53:38: note: candidate function not viable: no known conversion from 'uint64_t *' (aka 'unsigned long long *') to 'size_t *' (aka 'unsigned long *') for 3rd argument
JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctl(const char * name,
                                     ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/release-darwin/build-release/contrib/jemalloc-cmake/include/jemalloc/jemalloc_rename.h:11:20: note: expanded from macro 'je_mallctl'
#define je_mallctl je_mallctl
                   ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/dbms/src/Common/MemoryAllocTrace.cpp:32:5: error: no matching function for call to 'je_mallctl'
    je_mallctl("thread.deallocatedp", reinterpret_cast<void *>(&ptr2), &size2, nullptr, 0);
    ^~~~~~~~~~
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/release-darwin/build-release/contrib/jemalloc-cmake/include/jemalloc/jemalloc_rename.h:11:20: note: expanded from macro 'je_mallctl'
#define je_mallctl je_mallctl
                   ^~~~~~~~~~
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/contrib/jemalloc-cmake/include/jemalloc/jemalloc_protos.h:53:38: note: candidate function not viable: no known conversion from 'uint64_t *' (aka 'unsigned long long *') to 'size_t *' (aka 'unsigned long *') for 3rd argument
JEMALLOC_EXPORT int JEMALLOC_NOTHROW je_mallctl(const char * name,
                                     ^
/Users/pingcap/workspace/bp-tiflash-release-darwin-arm64-dnmfl-build-binaries/source/tiflash/release-darwin/build-release/contrib/jemalloc-cmake/include/jemalloc/jemalloc_rename.h:11:20: note: expanded from macro 'je_mallctl'
#define je_mallctl je_mallctl
                   ^
2 errors generated.
make[3]: *** [dbms/CMakeFiles/tiflash_common_io.dir/src/Common/MemoryAllocTrace.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....

4. What is your TiFlash version? (Required)