From owner-freebsd-hackers@freebsd.org Tue Jul 5 11:51:08 2016 Return-Path: Delivered-To: freebsd-hackers@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 DEBE1B21180 for ; Tue, 5 Jul 2016 11:51:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F39F122E for ; Tue, 5 Jul 2016 11:51:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u65BowoR023945 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 5 Jul 2016 14:50:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u65BowoR023945 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u65BovOp023944; Tue, 5 Jul 2016 14:50:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 5 Jul 2016 14:50:57 +0300 From: Konstantin Belousov To: Willem Jan Withagen Cc: FreeBSD Hackers Subject: Re: Problem during dlopen() Message-ID: <20160705115057.GO38613@kib.kiev.ua> References: <5e29e535-f91f-35fb-2a7e-324bb19b658f@digiware.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e29e535-f91f-35fb-2a7e-324bb19b658f@digiware.nl> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 11:51:09 -0000 On Tue, Jul 05, 2016 at 01:13:42PM +0200, Willem Jan Withagen wrote: > Hi, > > I'm banging my head agains the wall because I cannot seem to get this > working. > > The problem is due to changing from automake to cmake building. > > But all my dlopens start failing with something like: > load failed dlopen(build/lib/compressor/libceph_snappy.so) or > dlopen(build/lib/libceph_snappy.so): build/lib/libceph_snappy.so: > Undefined symbol "_ZN4ceph6buffer4list8iterator7advanceEl" > > If do a lookup for the name: > nm build/lib/libceph_snappy.so |grep ceph6buffer4list8iterator7advanceEl > > if give me: > U _ZN4ceph6buffer4list8iterator7advanceEl > > The parent/calling executable however has: > 0000000000513de0 T _ZN4ceph6buffer4list8iterator7advanceEl Are you sure ? In which symbol table (dynamic or debug) the referenced symbol appear ? Check with nm -D. If it is in debug table, you need --export-dynamic linker switch when creating the binary defining the symbols. > > Clearly dlopen is not able to match these 2 and succeed. Why are you sure that the dynamic linker at fault ? > > Question: > So on which part of the building is what switch missing. > > Thanx, > --WjW > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"