Skip to content

Commit cd5faaf

Browse files
authored
GH-39955: [C++] Use make -j1 to install bundled bzip2 (#39956)
### Rationale for this change It seems that parallel "make install" isn't stable with "-G 'Unix Makefiles'" ("read jobs pipe: Bad file descriptor. Stop." is the important part): [ 19%] Performing install step for 'bzip2_ep' CMake Error at /tmp/Rtmp5v99SJ/file70b591df48f/bzip2_ep-prefix/src/bzip2_ep-stamp/bzip2_ep-install-RELEASE.cmake:37 (message): Command failed: 2 '/bin/make' 'install' 'PREFIX=/tmp/Rtmp5v99SJ/file70b591df48f/bzip2_ep-install' 'CC=/bin/gcc' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/r-base-4.3.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC' 'AR=/bin/ar' 'RANLIB=/bin/ranlib' See also /tmp/Rtmp5v99SJ/file70b591df48f/bzip2_ep-prefix/src/bzip2_ep-stamp/bzip2_ep-install-*.log -- stdout output is: -- stderr output is: make[3]: *** read jobs pipe: Bad file descriptor. Stop. make[3]: *** Waiting for unfinished jobs.... bzip2.c: In function ‘applySavedFileAttrToOutputFile’: bzip2.c:1073:11: warning: ignoring return value of ‘fchown’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 1073 | (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CMake Error at /tmp/Rtmp5v99SJ/file70b591df48f/bzip2_ep-prefix/src/bzip2_ep-stamp/bzip2_ep-install-RELEASE.cmake:47 (message): Stopping after outputting logs. make[2]: *** [CMakeFiles/bzip2_ep.dir/build.make:104: bzip2_ep-prefix/src/bzip2_ep-stamp/bzip2_ep-install] Error 1 make[1]: *** [CMakeFiles/Makefile2:1205: CMakeFiles/bzip2_ep.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... ### What changes are included in this PR? Force to disable parallel processing for `make install`. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: #39955 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 0993b36 commit cd5faaf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ macro(build_bzip2)
26292629
BUILD_IN_SOURCE 1
26302630
BUILD_COMMAND ${MAKE} libbz2.a ${MAKE_BUILD_ARGS}
26312631
${BZIP2_EXTRA_ARGS}
2632-
INSTALL_COMMAND ${MAKE} install PREFIX=${BZIP2_PREFIX}
2632+
INSTALL_COMMAND ${MAKE} install -j1 PREFIX=${BZIP2_PREFIX}
26332633
${BZIP2_EXTRA_ARGS}
26342634
INSTALL_DIR ${BZIP2_PREFIX}
26352635
URL ${ARROW_BZIP2_SOURCE_URL}

0 commit comments

Comments
 (0)