From owner-freebsd-toolchain@freebsd.org Fri Feb 22 22:47:05 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 6E66514FD341 for ; Fri, 22 Feb 2019 22:47:05 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.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 A93918B8F0; Fri, 22 Feb 2019 22:47:04 +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 2EEFD18F1D; Fri, 22 Feb 2019 23:47:01 +0100 (CET) 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 2tj3YRlrEk5b; Fri, 22 Feb 2019 23:47:00 +0100 (CET) Received: from [192.168.10.9] (vaio [192.168.10.9]) (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 44CAF18F1C; Fri, 22 Feb 2019 23:47:00 +0100 (CET) Subject: Re: Linking problem with lld To: =?UTF-8?Q?T=c4=b3l_Coosemans?= Cc: FreeBSD Toolchain , Ed Maste References: <71079fbc-c3c0-9b93-0ae4-8ceda5d1f751@digiware.nl> <20190222223456.5d7840b7@kalimero.tijl.coosemans.org> From: Willem Jan Withagen Message-ID: <29a75c78-f2df-e80b-d013-631584e0fc71@digiware.nl> Date: Fri, 22 Feb 2019 23:47:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190222223456.5d7840b7@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: nl 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: Fri, 22 Feb 2019 22:47:05 -0000 On 22-2-2019 22:34, Tijl Coosemans wrote: > On Fri, 22 Feb 2019 16:09:09 +0100 Willem Jan Withagen > wrote: >> Hi Ed ea, >> >> In het ceph project, they started to use library versioning, so it seems. >> >> But compiling/linking that now with Clang and lld I run into trouble >> building the ceph-tools. >> >> This is what I get back of one of the Devs: >> -------------- >> My guess is that your linker doesn't support the new symbol versioning >> exports and since the symbols are hidden by default they aren't visible >> in the shared library. Previously there was a bug (since Luminous and >> the switch the cmake) where every public and private symbol was exported >> by librados. >> >> We just need to know the magic words to use for your compiler/linker to >> change the symbol visibility to public for the API methods. >> >> -------------- >> >> Now I looked thru the options on both Clang and lld, but nothing >> obviously springs into focus, as to add to change.... >> >> This is how librados is build: >> /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 >> -Wno-unused-command-line-argument -fuse-ld=/usr/bin/ld.lld >> -Wl,--exclude-libs,ALL >> -Wl,--version-script=/home/jenkins/workspace/ceph-master/src/librados/librados.map > Can you provide this librados.map file? https://github.com/ceph/ceph/blob/master/src/librados/librados.map: ------ LIBRADOS_PRIVATE {         local:  *; }; LIBRADOS_14.2.0 {         global:                 extern "C++" {                         ceph::buffer::v14_2_0::*;                         librados::v14_2_0::*;                         "typeinfo for librados::v14_2_0::ObjectOperation";                         "typeinfo name for librados::v14_2_0::ObjectOperation";                         "vtable for librados::v14_2_0::ObjectOperation";                         "typeinfo for librados::v14_2_0::ObjectReadOperation";                         "typeinfo name for librados::v14_2_0::ObjectReadOperation";                         "vtable for librados::v14_2_0::ObjectReadOperation";                         "typeinfo for librados::v14_2_0::ObjectWriteOperation";                         "typeinfo name for librados::v14_2_0::ObjectWriteOperation";                         "vtable for librados::v14_2_0::ObjectWriteOperation";                         "typeinfo for librados::v14_2_0::WatchCtx";                         "typeinfo name for librados::v14_2_0::WatchCtx";                         "vtable for librados::v14_2_0::WatchCtx";                         "typeinfo for librados::v14_2_0::WatchCtx2";                         "typeinfo name for librados::v14_2_0::WatchCtx2";                         "vtable for librados::v14_2_0::WatchCtx2";                 }; } LIBRADOS_PRIVATE; ------ --WjW