-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-3539: [CI/Packaging] Update scripts to build against vendored jemalloc #2779
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, now I understand =) Thanks
on bionic the build fails with (regardless of this change)
|
@wesm how can I disable parallel make for jemalloc_ep? |
See 1c85e41 |
Thanks! If that resolves the buonic build should I introduce a cmake flag for that? |
However that's another issue. I'm waiting for crossbow builds: https://github.com/kszucs/crossbow/branches/all?utf8=%E2%9C%93&query=build-335 (bionic will fail). |
Hm, do we understand the root cause of the parallel build failure? That seems odd |
Using How about the following? We can use parallel build when we use Ninja CMake generator. diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 15ff5ec8..7540e782 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -309,6 +309,12 @@ if ("${MAKE}" STREQUAL "")
endif()
endif()
+if (${CMAKE_GENERATOR} MATCHES "Makefiles")
+ set(MAKE_BUILD_ARGS "")
+else()
+ set(MAKE_BUILD_ARGS "-j")
+endif()
+
# ----------------------------------------------------------------------
# Find pthreads
@@ -736,9 +742,9 @@ if (ARROW_JEMALLOC)
CONFIGURE_COMMAND ./autogen.sh "--prefix=${JEMALLOC_PREFIX}" "--with-jemalloc-prefix=je_arrow_" "--with-private-namespace=je_arrow_private_" "--disable-tls"
${EP_LOG_OPTIONS}
BUILD_IN_SOURCE 1
- BUILD_COMMAND ${MAKE} -j
+ BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS}
BUILD_BYPRODUCTS "${JEMALLOC_STATIC_LIB}" "${JEMALLOC_SHARED_LIB}"
- INSTALL_COMMAND ${MAKE} -j1 install)
+ INSTALL_COMMAND ${MAKE} install)
# Don't use the include directory directly so that we can point to a path
# that is unique to our codebase. |
@kou Doesn't jinja do parallel builds by default? |
|
Yes ninja :) Then do We need |
Yes. Ninja users like fast build. So we should use |
I mean |
Yes. But |
if (${CMAKE_GENERATOR} MATCHES "Makefiles") | ||
set(MAKE_BUILD_ARGS "") | ||
else() | ||
# limit the maximum number of jobs for ninja |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may misunderstand. This argument is used by make
not ninja
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, so the problem was using make -j
instead make -jN
, I'll update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou No, I don't fully understand :)
My conclusion from your reasoning and patch was to not parallelize make
at all, and parallelize but limit the number of jobs for ninja -j4
.
BTW The build is passing with the current changeset.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
The CI failure is unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
I'll merge this.
@kszucs This still have WIP label. Do you have more works for this? |
No, removed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM
On ARROW-6437 (#7928) we saw occasional "File exists" errors on `jemalloc_ep` on macOS. Googling the error message led back to ARROW-739 (#456), which fixed this before by forcing install with `-j1`. ARROW-3492 later made it so jemalloc would build (but not install) in parallel. Then ARROW-3539 (#2779) was addressing a problem with that change and, along with fixing the build parallelization issue, unfortunately reverted the original `make -j1 install` fix. This patch restores the fix from ARROW-739. Closes #7995 from nealrichardson/jemalloc-install Authored-by: Neal Richardson <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
On ARROW-6437 (apache#7928) we saw occasional "File exists" errors on `jemalloc_ep` on macOS. Googling the error message led back to ARROW-739 (apache#456), which fixed this before by forcing install with `-j1`. ARROW-3492 later made it so jemalloc would build (but not install) in parallel. Then ARROW-3539 (apache#2779) was addressing a problem with that change and, along with fixing the build parallelization issue, unfortunately reverted the original `make -j1 install` fix. This patch restores the fix from ARROW-739. Closes apache#7995 from nealrichardson/jemalloc-install Authored-by: Neal Richardson <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
On ARROW-6437 (apache#7928) we saw occasional "File exists" errors on `jemalloc_ep` on macOS. Googling the error message led back to ARROW-739 (apache#456), which fixed this before by forcing install with `-j1`. ARROW-3492 later made it so jemalloc would build (but not install) in parallel. Then ARROW-3539 (apache#2779) was addressing a problem with that change and, along with fixing the build parallelization issue, unfortunately reverted the original `make -j1 install` fix. This patch restores the fix from ARROW-739. Closes apache#7995 from nealrichardson/jemalloc-install Authored-by: Neal Richardson <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
On ARROW-6437 (apache#7928) we saw occasional "File exists" errors on `jemalloc_ep` on macOS. Googling the error message led back to ARROW-739 (apache#456), which fixed this before by forcing install with `-j1`. ARROW-3492 later made it so jemalloc would build (but not install) in parallel. Then ARROW-3539 (apache#2779) was addressing a problem with that change and, along with fixing the build parallelization issue, unfortunately reverted the original `make -j1 install` fix. This patch restores the fix from ARROW-739. Closes apache#7995 from nealrichardson/jemalloc-install Authored-by: Neal Richardson <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Actually to not install jemalloc :)