Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 2019 13:34:35 +0100
From:      =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org>
To:        Willem Jan Withagen <wjw@digiware.nl>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Ed Maste <emaste@freebsd.org>
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> <cf912b3e-2699-0997-a0f6-4bb75fee4aab@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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Mar 2019 12:50:03 +0100 Willem Jan Withagen <wjw@digiware.nl>
wrote:
> On 2-3-2019 18:35, T=C4=B3l Coosemans wrote:
> > On Sat, 2 Mar 2019 17:49:25 +0100 Willem Jan Withagen <wjw@digiware.nl>
> > 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 <wjw@digiware.n=
l>
> >>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190303133435.2de4636d>