[
https://issues.apache.org/jira/browse/KUDU-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723344#comment-17723344
]
ASF subversion and git services commented on KUDU-3474:
-------------------------------------------------------
Commit 96e648ac4a3d80a5d2194c834d82035fc90039e4 in kudu's branch
refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=96e648ac4 ]
KUDU-3474: Add zlib as dependency of libunwind for ARM
On ARM, libunwind includes support for compressed
.debug_info sections if zlib is available during
compilation. This means that libunwind can require zlib
at link time, but only for ARM architecture.
This modifies the build to add a zlib dependency for
libunwind if the architecture is ARM. It also reorders
the thirdparty build so that zlib is built before
libunwind. This is not strictly necessary, but it means
that libunwind would consistently have support for
compressed .debug_info sections on ARM. This does not
impact x86_64.
Testing:
- Ran an ARM build on Ubuntu 20.04
Change-Id: Iee87b908a5771c2bd7c1a653504a1449d0792280
Reviewed-on: http://gerrit.cloudera.org:8080/19846
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
> Build on Ubuntu 20 ARM fails if zlib is installed
> -------------------------------------------------
>
> Key: KUDU-3474
> URL: https://issues.apache.org/jira/browse/KUDU-3474
> Project: Kudu
> Issue Type: Bug
> Components: build
> Affects Versions: 1.17.0
> Reporter: Joe McDonnell
> Priority: Major
>
> Here is a quick note on a Kudu build failure I saw on an Ubuntu 20 ARM
> machine recently. The Kudu thirdparty builds fine, but then when we get to
> building Kudu it fails with this:
>
> {noformat}
> 21:07:31 [ 7%] Linking CXX executable ../../../bin/protoc-gen-insertions
> 21:07:31
> /home/ubuntu/kudu/thirdparty/src/libunwind-1.5.0/src/dwarf/Gfind_proc_info-lsb.c:140:
> error: undefined reference to 'uncompress'
> 21:07:32 collect2: error: ld returned 1 exit status
> 21:07:32 make[2]: ***
> [src/kudu/util/CMakeFiles/protoc-gen-insertions.dir/build.make:113:
> bin/protoc-gen-insertions] Error 1{noformat}
> Here's what is going on:
>
> # libunwind's .debug_frame support is enabled for ARM/aarch64, but it is
> disabled for other platforms.
> [https://github.com/libunwind/libunwind/blob/master/configure.ac#L262-L276]
> # The .debug_frame support uses zlib uncompress if zlib is available.
> [https://github.com/libunwind/libunwind/blob/master/src/dwarf/Gfind_proc_info-lsb.c#L139-L168]
> [https://github.com/libunwind/libunwind/blob/master/configure.ac#L322-L337]
> # If thirdparty is built on an ARM machine that has zlib installed, then
> CONFIG_DEBUG_FRAME is true and HAVE_ZLIB is true and the uncompress()
> reference is compiled in.
> # The Kudu build doesn't know that libunwind needs zlib, so the list of
> libraries linked in for protoc-gen-insertions doesn't include zlib.
> One potential fix is to add zlib as a dependency for libunwind for
> ARM/aarch64. It might be worth compiling libunwind after zlib in thirdparty
> so that it always has the zlib support on ARM.
> Reproducing steps on Ubuntu 20 ARM machine:
> {noformat}
> export DEBIAN_FRONTEND=noninteractive
> sudo DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf automake curl
> flex g++ gcc gdb git \
> krb5-admin-server krb5-kdc krb5-user libkrb5-dev libsasl2-dev
> libsasl2-modules \
> libsasl2-modules-gssapi-mit libssl-dev libtool lsb-release make ntp \
> openjdk-8-jdk openssl patch pkg-config python rsync unzip vim-common
> libz-devrm -rf kudu
> mkdir kudu
> cd kudu
> git init
> git fetch "${KUDU_REPO_URL}"
> git fetch "${KUDU_REPO_URL}" "${KUDU_REPO_BRANCH}"
> git checkout FETCH_HEAD
> git rev-parse FETCH_HEADthirdparty/build-if-necessary.sh
>
> mkdir -p build/release
> cd build/release
> ../../thirdparty/installed/common/bin/cmake -DCMAKE_BUILD_TYPE=release
> -DNO_TESTS=1 ../..
> make -j{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)