Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7CAA1200B7E for ; Tue, 23 Aug 2016 03:08:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 799FD160ABC; Tue, 23 Aug 2016 01:08:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8A585160AB3 for ; Tue, 23 Aug 2016 03:07:59 +0200 (CEST) Received: (qmail 89652 invoked by uid 500); 23 Aug 2016 01:07:58 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 89636 invoked by uid 99); 23 Aug 2016 01:07:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2016 01:07:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D475EC0372 for ; Tue, 23 Aug 2016 01:07:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id wkUnkBhzH5U5 for ; Tue, 23 Aug 2016 01:07:54 +0000 (UTC) Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 0627F5F479 for ; Tue, 23 Aug 2016 01:07:54 +0000 (UTC) Received: by mail-qt0-f172.google.com with SMTP id u25so35359424qtb.1 for ; Mon, 22 Aug 2016 18:07:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=x0G+0sM5Yysmt/6f1woqZh6qp3eXWdCl2GC/+IOAhLg=; b=L1vEUopnCD4Zvq4XcD8EBY8/nYgIz4xsgpAL3KUzwTk1S1/W9CcrHhgsOBnOLmW4gP AHRG4Hs/VMQChGPmCIcTTeGPEKU+ipYBzjeaX2Qz32m3KJYUJj2VcngEcbS7tQdOA/0U /EYO/mtADxqWRes8QCeo8/MEC8KFIlUbpDPg8NF3l8st3Tv2v8L+9WVSxZ1YqyrtiIgs bz37qnEFHjZSu1RAttlWUbjc4UFMLC3a/CZhQ+8Y4PLj0knkCRuDTaupA9Ec4BZnhHnY onbrpnA0aAWa4FIXsvzBwmebiwBn5JQzzabrnOVEf4n3kaLULD06xIUeTa9RnvAzurYF N+0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=x0G+0sM5Yysmt/6f1woqZh6qp3eXWdCl2GC/+IOAhLg=; b=a+xoB8ix+kFLkrc8iUWur/MsvN6SnlNMu8jdRUFEV20kMQ+lK1t17f0DbBUJGxmNVG 2RYLGq83aWs9nQiBZD7G057+KFzkk8CGGzRwnse5Yt9q1WNvaNuibrJcthgP3GLcyZL1 cFFDD0I9FFLR2l2MdZUZS6f6bO00JloO4nFigXlVp6TlELL1ohqyFBDnxIMacWoJSIg1 2UkT5w1lT+rGxXwlHw4MrkvNEIlXVWwxDerQfGqv9CLRBfn+DoYZqfjlYRlgoR5j8xiK mA8mPab0vHqBi347N/JfpPodo03OJeTj2m67wA5dECwC6UUGsLB5M0PWcBLeWXru9tys aUiw== X-Gm-Message-State: AEkoouszPHGocCK7z+7sxBE5yrKkY/Si7dNo/LuOYKLnpgpBbJ2Uez6JtrhcOvqUHvPWejYAt7i1j8O66BRixzZc X-Received: by 10.200.54.28 with SMTP id m28mr26745156qtb.87.1471914472897; Mon, 22 Aug 2016 18:07:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.47.70 with HTTP; Mon, 22 Aug 2016 18:07:32 -0700 (PDT) In-Reply-To: References: From: Yonghyun Hwang Date: Mon, 22 Aug 2016 18:07:32 -0700 Message-ID: Subject: Re: Error linking impalad with -build_shared_libs option To: dev@impala.incubator.apache.org Content-Type: multipart/alternative; boundary=001a113b39e84c4966053ab2cb11 archived-at: Tue, 23 Aug 2016 01:08:00 -0000 --001a113b39e84c4966053ab2cb11 Content-Type: text/plain; charset=UTF-8 I observed the same linking error and digged this into further. The below is what I've found. *1. how to reproduce* # assuming that impala-config.sh is sourced $ cd ${IMPALA_HOME} *$ make -j8 impalad* ... [100%] Built target CodeGen Linking CXX executable ../../build/debug/service/impalad ... ../../build/debug/util/libUtil.so: undefined reference to `google_breakpad::ExceptionHandler::WriteMinidump(std::string const&, bool (*)(google_breakpad::MinidumpDescriptor const&, void*, bool), void*)' ../../build/debug/util/libUtil.so: undefined reference to `snappy::MaxCompressedLength(unsigned long)' ../../build/debug/util/libUtil.so: undefined reference to `my_strlen' ../../build/debug/util/libUtil.so: undefined reference to `LZ4_compress' ../../build/debug/util/libUtil.so: undefined reference to `BZ2_bzDecompress' ... *$ cd ${IMPALA_HOME}/be/src/service* *$ ${IMPALA_HOME}/toolchain/cmake-3.2.3-p1/bin/cmake -E * *cmake_link_script CMakeFiles/impalad.dir/link.txt --verbose=* ... ../../build/debug/util/libUtil.so: undefined reference to ... *../../build/debug/util/libUtil.so: undefined reference to `LZ4_compress'* *../../build/debug/util/libUtil.so: undefined reference to `BZ2_bzDecompress'* ../../build/debug/util/libUtil.so: undefined reference to *`snappy::RawCompress*(char const*, unsigned long, char*, unsigned long*)' ... boost::regex_traits > >::do_assign(char const*, char const*, unsigned int)' ... ../../build/debug/util/libUtil.so: undefined reference to *`snappy::* RawUncompress(char const*, unsigned long, char*)' *2. cause of the failure* $ cd ${IMPALA_HOME}/be/src/service *$ cat CMakeFiles/impalad.dir/link.txt* ${IMPALA_HOME}/toolchain/gcc-4.9.2/bin/g++ -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -fno-strict-aliasing -std=c++14 -Wno-deprecated ... *../../../toolchain/snappy-1.1.3/lib/libsnappy.a ../../../toolchain/lz4-svn/lib/liblz4.a* ... *../../../toolchain/boost-1.57.0/lib/libboost_regex.a* ... *../../build/debug/util/libUtil.so* -lpthread -ldl -lssl -lcrypto Apparently, libUtil.so __should__ show before libsnappy.a and *regex.a. Next step is to find out who creates CMakeFiles/impalad.dir/link.txt and why libUtil.so is placed after libsnappy.a, liblz4.a, and libboost_regex.a Thank you, Yonghyun On Wed, Aug 17, 2016 at 10:13 AM, Henry Robinson wrote: > Only that it's IMPALA-3979. Does anyone have any theories yet? > > On 17 August 2016 at 10:10, Dimitris Tsirogiannis < > dtsirogiannis@cloudera.com> wrote: > > > Hey guys, > > > > When I build from the latest master using the -build_shared_libs option I > > get linking errors (see [1]). Building with static works fine. Any ideas? > > > > Thanks > > Dimitris > > > > > > [1] > > Linking CXX executable ../../build/debug/service/impalad > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'BZ2_bzBuffToBuffCompress' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'snappy::MaxCompressedLength(unsigned long)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'LZ4_compress' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'BZ2_bzDecompressEnd' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'BZ2_bzDecompressInit' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'BZ2_bzBuffToBuffDecompress' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'BZ2_bzDecompress' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'snappy::GetUncompressedLength(char const*, unsigned long, unsigned > > long*)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'snappy::RawUncompress(char const*, unsigned long, char*)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'LZ4_uncompress' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'my_strlen' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'google_breakpad::ExceptionHandler::WriteMinidump(std::string const&, > bool > > (*)(google_breakpad::MinidumpDescriptor const&, void*, bool), void*)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'google_breakpad::ExceptionHandler::ExceptionHandler(google_ > > breakpad::MinidumpDescriptor > > const&, bool (*)(void*), bool (*)(google_breakpad::MinidumpDescriptor > > const&, void*, bool), void*, bool, int)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'ProfilerStart' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'ProfilerStop' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'boost::basic_regex > boost::cpp_regex_traits > >::do_assign(char const*, char const*, > > unsigned int)' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator const*, > > std::string>, > > std::allocator const*, > > std::string> > >, boost::regex_traits boost::cpp_regex_traits > > > >::find()' > > ../../build/debug/util/libUtil.so: error: undefined reference to > > 'boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator const*, > > std::string>, > > std::allocator const*, > > std::string> > >, boost::regex_traits boost::cpp_regex_traits > > > >::construct_init(boost::basic_regex > boost::cpp_regex_traits > > const&, > > boost::regex_constants::_match_flags)' > > /opt/Impala-Toolchain/openldap-2.4.25/lib/libldap.a( > > os-ip.o):os-ip.c:function > > ldap_int_poll: warning: `sys_nerr' is deprecated; use `strerror' or > > `strerror_r' instead > > /opt/Impala-Toolchain/openldap-2.4.25/lib/libldap.a( > > os-ip.o):os-ip.c:function > > ldap_int_poll: warning: `sys_errlist' is deprecated; use `strerror' or > > `strerror_r' instead > > collect2: error: ld returned 1 exit status > > be/src/service/CMakeFiles/impalad.dir/build.make:166: recipe for target > > 'be/build/debug/service/impalad' failed > > make[3]: *** [be/build/debug/service/impalad] Error 1 > > CMakeFiles/Makefile2:3682: recipe for target > > 'be/src/service/CMakeFiles/impalad.dir/all' failed > > make[2]: *** [be/src/service/CMakeFiles/impalad.dir/all] Error 2 > > CMakeFiles/Makefile2:3694: recipe for target > > 'be/src/service/CMakeFiles/impalad.dir/rule' failed > > make[1]: *** [be/src/service/CMakeFiles/impalad.dir/rule] Error 2 > > > > > > -- > Henry Robinson > Software Engineer > Cloudera > 415-994-6679 > --001a113b39e84c4966053ab2cb11--