You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by as...@apache.org on 2024/01/09 22:30:00 UTC

(arrow) 05/05: GH-39517: [C++] Disable parallelism for jemalloc external project (#39522)

This is an automated email from the ASF dual-hosted git repository.

assignuser pushed a commit to branch maint-14.0.2-cran
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit b704eac4184130c33a055a99563a20e67e3c4fea
Author: Jacob Wujciak-Jens <ja...@wujciak.de>
AuthorDate: Tue Jan 9 04:26:23 2024 +0100

    GH-39517: [C++] Disable parallelism for jemalloc external project (#39522)
    
    ### Rationale for this change
    
    With CMake > 3.28 the generated Makefile fails on the jemalloc_ep due to 'bad file descriptor'.
    
    ### What changes are included in this PR?
    
    For a sequential build for jemalloc by setting -j1.
    
    ### Are these changes tested?
    
    CI
    
    ### Are there any user-facing changes?
    
    No.
    * Closes: #39517
    
    Authored-by: Jacob Wujciak-Jens <ja...@wujciak.de>
    Signed-off-by: Jacob Wujciak-Jens <ja...@wujciak.de>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 4ea7066aa7..27190f7081 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2025,10 +2025,17 @@ macro(build_jemalloc)
     # Enable jemalloc debug checks when Arrow itself has debugging enabled
     list(APPEND JEMALLOC_CONFIGURE_COMMAND "--enable-debug")
   endif()
+
   set(JEMALLOC_BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS})
+  # Paralleism for Make fails with CMake > 3.28 see #39517
+  if(${CMAKE_GENERATOR} MATCHES "Makefiles")
+    list(APPEND JEMALLOC_BUILD_COMMAND "-j1")
+  endif()
+
   if(CMAKE_OSX_SYSROOT)
     list(APPEND JEMALLOC_BUILD_COMMAND "SDKROOT=${CMAKE_OSX_SYSROOT}")
   endif()
+
   externalproject_add(jemalloc_ep
                       ${EP_COMMON_OPTIONS}
                       URL ${JEMALLOC_SOURCE_URL}