From owner-freebsd-hackers@freebsd.org Tue Jul 5 12:23:27 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 7EAD9B715A6 for ; Tue, 5 Jul 2016 12:23:27 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [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 4A44B17CA for ; Tue, 5 Jul 2016 12:23:27 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id ED757153402; Tue, 5 Jul 2016 14:23:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S7BUwGztjqfR; Tue, 5 Jul 2016 14:22:48 +0200 (CEST) Received: from [192.168.10.67] (opteron [192.168.10.67]) (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 D9AA315340A; Tue, 5 Jul 2016 14:22:48 +0200 (CEST) Subject: Re: Problem during dlopen() To: Konstantin Belousov References: <5e29e535-f91f-35fb-2a7e-324bb19b658f@digiware.nl> <20160705115057.GO38613@kib.kiev.ua> Cc: FreeBSD Hackers From: Willem Jan Withagen Message-ID: <3570efcb-f106-95ba-52da-972a55d2fc33@digiware.nl> Date: Tue, 5 Jul 2016 14:22:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160705115057.GO38613@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 12:23:27 -0000 On 5-7-2016 13:50, Konstantin Belousov wrote: > 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. You are getting the other half of the point that Pietro got. I did a blunt nm not excluding any tables... Thanx, --WjW