From owner-freebsd-toolchain@freebsd.org Sun Mar 3 12:35:48 2019 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A378B1508E27 for ; Sun, 3 Mar 2019 12:35:48 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay108.isp.belgacom.be (mailrelay108.isp.belgacom.be [195.238.20.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9EEE8333D; Sun, 3 Mar 2019 12:35:47 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CgAABuyXtc/0RF8lFlHAEBAQQBAQc?= =?us-ascii?q?EAQGBUwUBAQsBgg9XEXESJ4QIiHmKaAEBggw1AYlxjXqBezCESQKEICM2Bw0?= =?us-ascii?q?BAQMBAQMBAwJtHAyFSwEFIzMjEAkCGAICBSECAg8qHgYTgyOBeQuNHZtmgS+?= =?us-ascii?q?JFIEOgQskAYs+gX+DbjWDHgQYgSEmgwqCVwKKCYg+kT0Jh0OLJSWCTJBWkD+?= =?us-ascii?q?OPQkogVZNMAg7gmwJiwOBXYNjPgMwAY52gkwBAQ?= X-IPAS-Result: =?us-ascii?q?A2CgAABuyXtc/0RF8lFlHAEBAQQBAQcEAQGBUwUBAQsBg?= =?us-ascii?q?g9XEXESJ4QIiHmKaAEBggw1AYlxjXqBezCESQKEICM2Bw0BAQMBAQMBAwJtH?= =?us-ascii?q?AyFSwEFIzMjEAkCGAICBSECAg8qHgYTgyOBeQuNHZtmgS+JFIEOgQskAYs+g?= =?us-ascii?q?X+DbjWDHgQYgSEmgwqCVwKKCYg+kT0Jh0OLJSWCTJBWkD+OPQkogVZNMAg7g?= =?us-ascii?q?mwJiwOBXYNjPgMwAY52gkwBAQ?= Received: from 68.69-242-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.242.69.68]) by relay.skynet.be with ESMTP; 03 Mar 2019 13:34:37 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x23CYaSe002683; Sun, 3 Mar 2019 13:34:36 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Sun, 3 Mar 2019 13:34:35 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Willem Jan Withagen Cc: FreeBSD Toolchain , Ed Maste Subject: Re: Linking problem with lld Message-ID: <20190303133435.2de4636d@kalimero.tijl.coosemans.org> In-Reply-To: <492f6e8c-166d-a3ba-c4ed-f042a9c73072@digiware.nl> References: <71079fbc-c3c0-9b93-0ae4-8ceda5d1f751@digiware.nl> <20190222223456.5d7840b7@kalimero.tijl.coosemans.org> <29a75c78-f2df-e80b-d013-631584e0fc71@digiware.nl> <20190302162142.2bf23551@kalimero.tijl.coosemans.org> <9f659c4b-d542-b610-8e29-1341a00b43b7@digiware.nl> <20190302183501.478d29e8@kalimero.tijl.coosemans.org> <492f6e8c-166d-a3ba-c4ed-f042a9c73072@digiware.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: B9EEE8333D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.88 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.88)[-0.885,0]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2019 12:35:48 -0000 On Sun, 3 Mar 2019 12:50:03 +0100 Willem Jan Withagen wrote: > On 2-3-2019 18:35, T=C4=B3l Coosemans wrote: > > On Sat, 2 Mar 2019 17:49:25 +0100 Willem Jan Withagen > > wrote: =20 > >> On 2-3-2019 16:21, T=C4=B3l Coosemans wrote: =20 > >>> On Sat, 2 Mar 2019 14:21:57 +0100 Willem Jan Withagen > >>> wrote: =20 > >>>> Now if I look in librados.so for rados_create that gives: > >>>> =3D=3D=3D=3D =20 > >>>> > objdump -t librados.so.2.0.0 | grep rados_create =20 > >>> You want to look at dynamic symbols so "objdump -T". =20 > >> Right, that list is empty. > >> > >> So I'm wondering what I can do to get them in that list. =20 > > Try the command that creates librados.so.2.0.0 without the > > --version-script argument. =20 >=20 > Right, When I see the output, I know I tried that before. But then the=20 > versioning goes > wrong, I think... > Might need to rewrite the map-file? >=20 > --WjW >=20 > [ 43%] Linking CXX shared library ../../lib/librados.so > cd /home/jenkins/workspace/ceph-master/build/src/librados &&=20 > /usr/local/bin/cmake -E cmake_link_script=20 > CMakeFiles/librados.dir/link.txt --verbose=3D1 > ccache /usr/bin/c++ -fPIC=C2=A0 -Wall -Wtype-limits -Wignored-qualifiers= =20 > -Winit-self -Wpointer-arith -Werror=3Dformat-security -fno-strict-aliasin= g=20 > -fsigned-char -Wno-unknown-pragmas -Wno-unused-function=20 > -Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator=20 > -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register=20 > -ftemplate-depth-1024 -Wnon-virtual-dtor -Wno-unknown-pragmas=20 > -Wno-ignored-qualifiers -Wno-inconsistent-missing-override=20 > -Wno-mismatched-tags -Wno-unused-private-field=20 > -Wno-address-of-packed-member -DCEPH_DEBUG_MUTEX=20 > -fdiagnostics-color=3Dauto -fno-builtin-malloc -fno-builtin-calloc=20 > -fno-builtin-realloc -fno-builtin-free=C2=A0 -O0 -g -fvisibility=3Ddefaul= t=C2=A0=20 > -Wl,--exclude-libs,ALL -shared -Wl,-soname,librados.so.2 -o=20 > ../../lib/librados.so.2.0.0 CMakeFiles/librados.dir/librados_c.cc.o=20 > CMakeFiles/librados.dir/librados_cxx.cc.o=20 > ../common/CMakeFiles/common_buffer_obj.dir/buffer.cc.o -L/usr/local/lib=20 > -Wl,-rpath,/usr/local/lib:/home/jenkins/workspace/ceph-master/build/lib:/= usr/local/lib/nss:=20 > ../../lib/liblibrados_impl.a ../../lib/libosdc.a=20 > ../../lib/libceph-common.so.0 ../../lib/libcls_lock_client.a=20 > /usr/local/lib/nss/libssl3.so /usr/local/lib/nss/libsmime3.so=20 > /usr/local/lib/nss/libnss3.so /usr/local/lib/nss/libnssutil3.so=20 > /usr/local/lib/libplds4.so /usr/local/lib/libplc4.so=20 > /usr/local/lib/libnspr4.so /usr/local/lib/libcrypto.so -lrt=20 > ../../lib/libjson_spirit.a ../../lib/libcommon_utf8.a=20 > ../../lib/liberasure_code.a ../../lib/libcrc32.a ../../lib/libarch.a=20 > /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_chrono.so=20 > /usr/local/lib/libboost_atomic.so /usr/local/lib/libboost_random.so=20 > /usr/local/lib/libboost_system.so=20 > /usr/local/lib/libboost_program_options.so=20 > /usr/local/lib/libboost_date_time.so=20 > /usr/local/lib/libboost_iostreams.so /usr/local/lib/libboost_regex.so=20 > /usr/lib/libexecinfo.so /usr/local/lib/nss/libssl3.so=20 > /usr/local/lib/nss/libsmime3.so /usr/local/lib/nss/libnss3.so=20 > /usr/local/lib/nss/libnssutil3.so /usr/local/lib/libplds4.so=20 > /usr/local/lib/libplc4.so /usr/local/lib/libnspr4.so -lpthread > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_append@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_cancel@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_cmpext@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_create_completion@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_exec@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_flush@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_flush_async@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_get_return_value@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_get_version@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_getxattr@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_getxattrs@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_ioctx_selfmanaged_snap_create@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_ioctx_selfmanaged_snap_remove@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_is_complete@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_is_complete_and_cb@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_is_safe@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_is_safe_and_cb@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_notify@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_read@@ has undefined version > ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol=20 > rados_aio_read_op_operate@@ has undefined version > ld: error: too many errors emitted, stopping now (use -error-limit=3D0 to= =20 > see all errors) > c++: error: linker command failed with exit code 1 (use -v to see=20 > invocation) You could start with a simple version map: LIBRADOS_14.2.0 { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 global: *; }; If symbols are visible in objdump -T output with this, you can then expand the map bit by bit and see at what point it goes wrong. My guess is the "local: *" in the beginning is matching everything so nothing remains visible. See also https://bugs.llvm.org/show_bug.cgi?id=3D40176