From owner-freebsd-hackers@freebsd.org Tue Jul 5 11:45:25 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 0AB1FB21E74; Tue, 5 Jul 2016 11:45:25 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mail.ptrcrt.ch (gahr.cloud.tilaa.com [84.22.109.158]) (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 5EF211C9F; Tue, 5 Jul 2016 11:45:22 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from webmail.ptrcrt.ch (www.gahr.ch [192.168.1.2]) by mail.ptrcrt.ch (OpenSMTPD) with ESMTPSA id c381a7a4 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Tue, 5 Jul 2016 11:45:14 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 05 Jul 2016 13:45:13 +0200 From: Pietro Cerutti To: Willem Jan Withagen Cc: FreeBSD Hackers , owner-freebsd-hackers@freebsd.org Subject: Re: Problem during dlopen() Organization: The FreeBSD Project In-Reply-To: <5e29e535-f91f-35fb-2a7e-324bb19b658f@digiware.nl> References: <5e29e535-f91f-35fb-2a7e-324bb19b658f@digiware.nl> Message-ID: <416028b6b2a1dffe4e010b5792c56100@gahr.ch> X-Sender: gahr@FreeBSD.org User-Agent: Roundcube Webmail/1.2.0 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:45:25 -0000 On 2016-07-05 13:13, 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 > > Clearly dlopen is not able to match these 2 and succeed. > > Question: > So on which part of the building is what switch missing. Wild guess: -Wl,-E linking the executable. -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp