Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 2019 14:45:01 +0100
From:      Willem Jan Withagen <wjw@digiware.nl>
To:        =?UTF-8?Q?T=c4=b3l_Coosemans?= <tijl@FreeBSD.org>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Ed Maste <emaste@freebsd.org>
Subject:   Re: Linking problem with lld
Message-ID:  <cb7836b6-4e90-0a1e-0407-010c4f3a51bb@digiware.nl>
In-Reply-To: <20190303133435.2de4636d@kalimero.tijl.coosemans.org>
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> <20190303133435.2de4636d@kalimero.tijl.coosemans.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3-3-2019 13:34, Tijl Coosemans wrote:
> On Sun, 3 Mar 2019 12:50:03 +0100 Willem Jan Withagen <wjw@digiware.nl>
> wrote:
>> On 2-3-2019 18:35, Tijl Coosemans wrote:
>>> On Sat, 2 Mar 2019 17:49:25 +0100 Willem Jan Withagen <wjw@digiware.nl>
>>> wrote:
>>>> On 2-3-2019 16:21, Tijl Coosemans wrote:
>>>>> On Sat, 2 Mar 2019 14:21:57 +0100 Willem Jan Withagen <wjw@digiware.nl>
>>>>> wrote:
>>>>>> Now if I look in librados.so for rados_create that gives:
>>>>>> ====
>>>>>>     > objdump -t librados.so.2.0.0 | grep rados_create
>>>>> You want to look at dynamic symbols so "objdump -T".
>>>> Right, that list is empty.
>>>>
>>>> So I'm wondering what I can do to get them in that list.
>>> Try the command that creates librados.so.2.0.0 without the
>>> --version-script argument.
>> Right, When I see the output, I know I tried that before. But then the
>> versioning goes
>> wrong, I think...
>> Might need to rewrite the map-file?
>>
>> --WjW
>>
>> [ 43%] Linking CXX shared library ../../lib/librados.so
>> cd /home/jenkins/workspace/ceph-master/build/src/librados &&
>> /usr/local/bin/cmake -E cmake_link_script
>> CMakeFiles/librados.dir/link.txt --verbose=1
>> ccache /usr/bin/c++ -fPIC  -Wall -Wtype-limits -Wignored-qualifiers
>> -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing
>> -fsigned-char -Wno-unknown-pragmas -Wno-unused-function
>> -Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator
>> -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register
>> -ftemplate-depth-1024 -Wnon-virtual-dtor -Wno-unknown-pragmas
>> -Wno-ignored-qualifiers -Wno-inconsistent-missing-override
>> -Wno-mismatched-tags -Wno-unused-private-field
>> -Wno-address-of-packed-member -DCEPH_DEBUG_MUTEX
>> -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc
>> -fno-builtin-realloc -fno-builtin-free  -O0 -g -fvisibility=default
>> -Wl,--exclude-libs,ALL -shared -Wl,-soname,librados.so.2 -o
>> ../../lib/librados.so.2.0.0 CMakeFiles/librados.dir/librados_c.cc.o
>> CMakeFiles/librados.dir/librados_cxx.cc.o
>> ../common/CMakeFiles/common_buffer_obj.dir/buffer.cc.o -L/usr/local/lib
>> -Wl,-rpath,/usr/local/lib:/home/jenkins/workspace/ceph-master/build/lib:/usr/local/lib/nss:
>> ../../lib/liblibrados_impl.a ../../lib/libosdc.a
>> ../../lib/libceph-common.so.0 ../../lib/libcls_lock_client.a
>> /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 /usr/local/lib/libcrypto.so -lrt
>> ../../lib/libjson_spirit.a ../../lib/libcommon_utf8.a
>> ../../lib/liberasure_code.a ../../lib/libcrc32.a ../../lib/libarch.a
>> /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_chrono.so
>> /usr/local/lib/libboost_atomic.so /usr/local/lib/libboost_random.so
>> /usr/local/lib/libboost_system.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_regex.so
>> /usr/lib/libexecinfo.so /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
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_append@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_cancel@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_cmpext@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_create_completion@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_exec@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_flush@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_flush_async@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_get_return_value@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_get_version@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_getxattr@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_getxattrs@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_ioctx_selfmanaged_snap_create@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_ioctx_selfmanaged_snap_remove@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_is_complete@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_is_complete_and_cb@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_is_safe@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_is_safe_and_cb@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_notify@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_read@@ has undefined version
>> ld: error: CMakeFiles/librados.dir/librados_c.cc.o: symbol
>> rados_aio_read_op_operate@@ has undefined version
>> ld: error: too many errors emitted, stopping now (use -error-limit=0 to
>> see all errors)
>> c++: error: linker command failed with exit code 1 (use -v to see
>> invocation)
> You could start with a simple version map:
>
> LIBRADOS_14.2.0 {
>           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.
I agree with that, but up till now all attempts I made failed....
So more trial and error ;-)
> See also https://bugs.llvm.org/show_bug.cgi?id=40176
I also "used"
   https://sourceware.org/binutils/docs/ld/VERSION.html
which in itself explains some things, but the actual detailed 
functioning has to be infered


Thanx,
--WjW




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb7836b6-4e90-0a1e-0407-010c4f3a51bb>