Skip to content

Commit

Permalink
apacheGH-39517: [C++] Disable parallelism for jemalloc external proje…
Browse files Browse the repository at this point in the history
…ct (apache#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: apache#39517

Authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
  • Loading branch information
assignUser authored and zanmato1984 committed Feb 28, 2024
1 parent 0bdbeaf commit c93d677
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2040,10 +2040,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}
Expand Down

0 comments on commit c93d677

Please sign in to comment.