You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2022/08/24 23:09:39 UTC

[kudu] branch master updated: Fix glog linker flags for ARM Mac

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0e7a5ec69 Fix glog linker flags for ARM Mac
0e7a5ec69 is described below

commit 0e7a5ec6991ba86965c81a5b3c337753ee5f395e
Author: Marton Greber <gr...@gmail.com>
AuthorDate: Wed Aug 24 15:28:58 2022 +0200

    Fix glog linker flags for ARM Mac
    
    "-L$PREFIX/lib" in the glog build definitions was causing SIGBUS when
    doing Kudu startup, on M1 Mac. The issue is reproducible with the
    logging-test:
    @ 0x1a09f84e4 _sigtramp
    @ 0x1a0947afc std::__1::basic_ostream<>::operator<<()
    @ 0x101de0fc0 kudu::operator<<()
    @ 0x100b70ab4 kudu::LoggingTest_TestThrottledLogging_Test::TestBody()
    @ 0x10191ceb8 testing::internal::HandleExceptionsInMethodIfSupported<>()
    @ 0x10191ce00 testing::Test::Run()
    @ 0x10191e460 testing::TestInfo::Run()
    @ 0x10191ed78 testing::TestSuite::Run()
    @ 0x10192c85c testing::internal::UnitTestImpl::RunAllTests()
    @ 0x10192c0b8 testing::internal::HandleExceptionsInMethodIfSupported<>()
    @ 0x10192c01c testing::UnitTest::Run()
    @ 0x100e20920 RUN_ALL_TESTS()
    @ 0x100e20650 main
    Bus error: 10
    Investigations on Linux: Removing "-L$PREFIX/lib" does not affect the
    glog link process. The thirdparty libunwind.so and libgflags.so are
    linked correctly as well. Only the runpath has to be specified, else ldd
    shows not found for libunwind.so and libgflags.so.
    By removing "-L$PREFIX/lib" from the glog build definitions Kudu works
    fine on my M1 Mac.
    
    Change-Id: I3771a086dfb7caf89e9a7fc0f328e77ee7049ec5
    Reviewed-on: http://gerrit.cloudera.org:8080/18902
    Tested-by: Kudu Jenkins
    Reviewed-by: Alexey Serbin <al...@apache.org>
---
 thirdparty/build-definitions.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index a4ecfb7e3..eb6b94690 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -451,9 +451,9 @@ build_glog() {
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_INSTALL_PREFIX=$PREFIX \
       -DCMAKE_CXX_FLAGS="$EXTRA_CXXFLAGS -I$PREFIX/include" \
-      -DCMAKE_EXE_LINKER_FLAGS="$EXTRA_LDFLAGS $EXTRA_LIBS -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" \
-      -DCMAKE_MODULE_LINKER_FLAGS="$EXTRA_LDFLAGS $EXTRA_LIBS -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" \
-      -DCMAKE_SHARED_LINKER_FLAGS="$EXTRA_LDFLAGS $EXTRA_LIBS -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" \
+      -DCMAKE_EXE_LINKER_FLAGS="$EXTRA_LDFLAGS $EXTRA_LIBS -Wl,-rpath,$PREFIX/lib" \
+      -DCMAKE_MODULE_LINKER_FLAGS="$EXTRA_LDFLAGS $EXTRA_LIBS -Wl,-rpath,$PREFIX/lib" \
+      -DCMAKE_SHARED_LINKER_FLAGS="$EXTRA_LDFLAGS $EXTRA_LIBS -Wl,-rpath,$PREFIX/lib" \
       -DBUILD_SHARED_LIBS=$SHARED \
       -DBUILD_TESTING=OFF \
       $EXTRA_CMAKE_FLAGS \