[
https://issues.apache.org/jira/browse/IMPALA-12100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17720256#comment-17720256
]
Joe McDonnell commented on IMPALA-12100:
----------------------------------------
Resolved in
https://github.com/cloudera/native-toolchain/commit/93f89038db8314fd8b136266682ab8fc59367944
{noformat}
commit 93f89038db8314fd8b136266682ab8fc59367944
Author: Joe McDonnell <[email protected]>
Date: Mon Apr 24 16:19:43 2023 -0700 IMPALA-12100: Set
REGISTER_INSTALL_PREFIX=Off for gflags build
When building the native-toolchain outside of Docker,
the Kudu build fails with link errors related to
glog's logging.cc having an undefined reference to
FlagRegisterer. This is because Kudu's glog build is
picking up Impala's gflags, which has a different signature
for FlagRegisterer.
It picks up Impala's gflags because gflags registers itself
in the user's home directory under the .cmake directory. Glog
must pick that up somehow. This is controlled by the
REGISTER_INSTALL_PREFIX CMake option for gflags. This sets
REGISTER_INSTALL_PREFIX=Off to avoid this interaction.
This also cleans up gflags' build.sh to remore the old non-CMake
code.
Testing:
- Building the toolchain outside of Docker passed on x86_64
with this change
Change-Id: I682ce40622f4bbad0c412de29006a3a9b4ae4765
Reviewed-on: http://gerrit.cloudera.org:8080/19798
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Joe McDonnell <[email protected]>
{noformat}
> native-toolchain's gflags build should use REGISTER_INSTALL_PREFIX=Off
> ----------------------------------------------------------------------
>
> Key: IMPALA-12100
> URL: https://issues.apache.org/jira/browse/IMPALA-12100
> Project: IMPALA
> Issue Type: Bug
> Components: Infrastructure
> Affects Versions: Impala 4.3.0
> Reporter: Joe McDonnell
> Assignee: Joe McDonnell
> Priority: Major
>
> When building the native-toolchain, the Kudu build failed with odd messages
> about gflags:
> {noformat}
> [ 8%] Linking CXX executable ../../../bin/protoc-gen-insertions
> /home/ubuntu/workspace/ubuntu-16.04-native-toolchain/native-toolchain/source/kudu/kudu-345fd44ca3/thirdparty/src/glog-0.6.0/src/logging.cc:116:
> error: undefined reference to
> 'google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char
> const*, bool*, bool*, bool)'{noformat}
> It seems that glog was built with Impala's gflags rather than Kudu's
> thirdparty gflags. Impala has some patches that modify FlagRegisterer.
> Why would it find Impala's gflags? Well, gflags has a CMake option
> REGISTER_INSTALL_PREFIX, which defaults to true. When true, it installs
> something in the .cmake directory in the user's home directory. From the
> gflags build log:
> {noformat}
> -- Installing:
> /home/ubuntu/.cmake/packages/gflags/2407f150c75a144f5e6c9e90127cb6c1{noformat}
> This seems to be picked up by Kudu's thirdparty build, leading to the error.
> We should set REGISTER_INSTALL_PREFIX=OFF for gflags.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]