tiflash: Building from source failed on mac M1

Hello!

I try to build tiflash from source on my mac m1, and I got some errors when configuring.

When I run cmake ../tiflash, I got CMake Error at contrib/zlib-ng/CMakeLists.txt:477 (message): sizeof(void *) is neither 32 nor 64 bit. And I also found this error in there(ClickHouse repo), so I follow this issue to modify the CMakeLists.

if (USE_STATIC_LIBRARIES AND HAVE_NO_PIE)
#    set (CMAKE_CXX_FLAGS                 "${CMAKE_CXX_FLAGS} ${FLAG_NO_PIE}")
#    set (CMAKE_C_FLAGS                   "${CMAKE_C_FLAGS} ${FLAG_NO_PIE}")
    set (CMAKE_CXX_FLAGS                 "${CMAKE_CXX_FLAGS}")
    set (CMAKE_C_FLAGS                   "${CMAKE_C_FLAGS}")
endif ()

But it does not work…

In case it’s a problem with xcode CommandLineTools, I also reinstalled xcode-select.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (7 by maintainers)

Most upvoted comments

https://github.com/pingcap/tiflash/blob/master/CMakeLists.txt#L274, would you check if this code block is wrongly executed?

e.g. adding message(FATAL_ERROR "this should not be executed") inside?

This code block is not executed.