From owner-freebsd-toolchain@freebsd.org Wed Sep 21 12:25:37 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37833BE1209 for ; Wed, 21 Sep 2016 12:25:37 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (gtw.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E287EA56 for ; Wed, 21 Sep 2016 12:25:36 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 01DAE295F9; Wed, 21 Sep 2016 14:25:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZzMVdfbRHl5V; Wed, 21 Sep 2016 14:25:21 +0200 (CEST) Received: from [192.168.10.67] (opteron [192.168.10.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 7DAD8295F8 for ; Wed, 21 Sep 2016 14:25:21 +0200 (CEST) Subject: Fwd: Linking error with rocksdb References: <17b328e5-93d0-2004-f928-3331a645fc1f@digiware.nl> To: FreeBSD Toolchain From: Willem Jan Withagen X-Forwarded-Message-Id: <17b328e5-93d0-2004-f928-3331a645fc1f@digiware.nl> Message-ID: Date: Wed, 21 Sep 2016 14:25:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <17b328e5-93d0-2004-f928-3331a645fc1f@digiware.nl> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2016 12:25:37 -0000 Hi I seem to remember running into this before. But cannot find the old messages. I'm trying the latest Ceph master which has compiled and linked before, but now runs into a snag that cannot seem to understand. rocksdb is build in the ceph tree, but as a standalone task in Cmake. resulting in a libsrocks.a in the rocksdb root directory. Binding against it results in missing declarations. librocksdb.a is recent: > ll src/rocksdb/librocksdb.a 80012 -rw-rw-r-- 1 wjw tegenbosch 305720086 Sep 21 10:40 src/rocksdb/librocksdb.a And it seems defined: > nm -e src/rocksdb/librocksdb.a | grep NewLRU U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd 0000000000001fd0 T _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd U _ZN7rocksdb11NewLRUCacheEmibd Strange thing that this is a routine that is only added recently. Which suggests that it tries to bind against an older librocksdb ..?? Then I checkout a completely fresh head in a nes directory, still the same error. So I've deleted anything in /usr/local/ that looks like a librocksdb-library. But still it hits error. Any suggestions where to look further. --WjW /usr/bin/CC -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -Wno-inconsistent-missing-override -Wno-mismatched-tags -Wno-unused-function -Wno-unused-local-typedef -Wno-inconsistent-missing-override -Wno-unused-private-field -Wno-varargs -Wno-gnu-designator -Wno-mismatched-tags -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register -ftemplate-depth-1024 -Wno-invalid-offsetof -Wnon-virtual-dtor -fdiagnostics-color=auto -I/usr/local/include/nss/nss -I/usr/local/include/nspr -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -O0 -Wl,-export-dynamic CMakeFiles/ceph-mon.dir/ceph_mon.cc.o CMakeFiles/common_texttable_obj.dir/common/TextTable.cc.o -o ../bin/ceph-mon -L/usr/local/lib ../lib/libmon.a ../lib/libcommon.a ../lib/libos.a ../lib/libglobal.a -lrt /usr/local/lib/libatomic_ops.a /usr/local/lib/libtcmalloc.so ../lib/libkv.a /usr/local/lib/libleveldb.so ../../src/rocksdb/librocksdb.a -lsnappy -lz -lbz2 /usr/local/lib/liblz4.so ../lib/libcommon.a ../lib/libjson_spirit.a ../lib/libcommon_utf8.a ../lib/liberasure_code.a /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_random.so /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_date_time.so /usr/local/lib/libboost_iostreams.so /usr/local/lib/libboost_chrono.so /usr/local/lib/libboost_atomic.so -lexecinfo /usr/local/lib/nss/libssl3.so /usr/local/lib/nss/libsmime3.so /usr/local/lib/nss/libnss3.so /usr/local/lib/nss/libnssutil3.so /usr/local/lib/libplds4.so /usr/local/lib/libplc4.so /usr/local/lib/libnspr4.so -lpthread -lrt -Wl,-rpath,/usr/local/lib:/usr/local/lib/nss: ../lib/libmon.a(RocksDBStore.cc.o): In function `RocksDBStore::do_open(std::__1::basic_ostream >&, bool)': /home/wjw/Ceph/master/ceph/src/kv/RocksDBStore.cc:(.text+0x5253): undefined reference to `rocksdb::NewLRUCache(unsigned long, int)' ../lib/libmon.a(RocksDBStore.cc.o): In function `rocksdb::Status::InvalidArgument(rocksdb::Slice const&, rocksdb::Slice const&)': /home/wjw/Ceph/master/ceph/src/kv/RocksDBStore.cc:(.text._ZN7rocksdb6Status15InvalidArgumentERKNS_5SliceES3_[_ZN7rocksdb6Status15InvalidArgumentERKNS_5SliceES3_]+0x2f): undefined reference to `rocksdb::Status::Status(rocksdb::Status::Code, rocksdb::Slice const&, rocksdb::Slice const&)' ../lib/libmon.a(RocksDBStore.cc.o):(.data.rel.ro._ZTVN12RocksDBStore19MergeOperatorRouterE[_ZTVN12RocksDBStore19MergeOperatorRouterE]+0x20): undefined reference to `rocksdb::AssociativeMergeOperator::FullMerge(rocksdb::Slice const&, rocksdb::Slice const*, std::__1::deque, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > const&, std::__1::basic_string, std::__1::allocator >*, rocksdb::Logger*) const' c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [src/CMakeFiles/ceph-mon.dir/build.make:129: bin/ceph-mon] Error 1 gmake[3]: Leaving directory '/usr/srcs/Ceph/master/ceph/build' gmake[2]: *** [CMakeFiles/Makefile2:569: src/CMakeFiles/ceph-mon.dir/all] Error 2 gmake[2]: Leaving directory '/usr/srcs/Ceph/master/ceph/build' gmake[1]: *** [CMakeFiles/Makefile2:581: src/CMakeFiles/ceph-mon.dir/rule] Error 2 gmake[1]: Leaving directory '/usr/srcs/Ceph/master/ceph/build' gmake: *** [Makefile:264: ceph-mon] Error 2 12.527u 6.015s 0:18.51 100.1% 2902+225k 2141+53502io 1pf+0w