You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/06/04 22:37:47 UTC

[kudu] 02/02: thirdparty: fix memkind build race

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

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit ee2898e18ae87625e2e6180210348ea069de8c5e
Author: Adar Dembo <ad...@cloudera.com>
AuthorDate: Tue Jun 4 14:26:46 2019 -0700

    thirdparty: fix memkind build race
    
    On rare occasions, the libmemkind.a produced by the memkind build was
    missing its jemalloc symbols. This then led to Kudu linkage failures if Kudu
    was using static linkage (i.e. in RELEASE builds).
    
    This turned out to be due to a build race of our own making: we can't ask
    make to run the install-exec and static_lib targets simultaneously. Both
    targets depend on libmemkind.a, but static_lib performs some important
    post-processing on libmemkind.a that must complete before install-exec
    copies libmemkind.a into the installed directory. And by offering both
    targets on the command line, make can run them in parallel once their common
    dependency (libmemkind.a) is built.
    
    Change-Id: I1242e733e7d282d1e7471656ea81349be427aa1f
    Reviewed-on: http://gerrit.cloudera.org:8080/13513
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 thirdparty/build-definitions.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 4df64f6..406603b 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -805,7 +805,8 @@ build_memkind() {
   # Building unit tests and memkind examples in memkind with clang will prevent some
   # header files from being included which will lead to failures. So we do a minimal
   # installation here.
-  make -j$PARALLEL $EXTRA_MAKEFLAGS static_lib install-exec install-data
+  make -j$PARALLEL $EXTRA_MAKEFLAGS static_lib
+  make -j$PARALLEL $EXTRA_MAKEFLAGS install-exec install-data
   # install jemalloc header files
   cd $MEMKIND_BDIR/jemalloc/obj && make -j$PARALLEL $EXTRA_MAKEFLAGS install_include