From owner-freebsd-ports@FreeBSD.ORG Mon May 7 21:16:45 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47F501065673; Mon, 7 May 2012 21:16:45 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 21D288FC16; Mon, 7 May 2012 21:16:45 +0000 (UTC) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 9FFE45081A; Mon, 7 May 2012 14:16:38 -0700 (PDT) To: Konstantin Belousov In-Reply-To: <20120426080649.GO2358@deviant.kiev.zoral.com.ua> Date: Mon, 07 May 2012 14:16:38 -0700 Message-ID: <28678.1336425398@tristatelogic.com> From: "Ronald F. Guilmette" Cc: pav@freebsd.org, freebsd-gnome@freebsd.org, freebsd-ports@freebsd.org, Shawn Webb Subject: Re: Need a little help with a dynamic linking problem X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 21:16:45 -0000 Sorry for my late reply... I was tied up on other projects. A few days ago, in a galaxy not far away... In message <20120426080649.GO2358@deviant.kiev.zoral.com.ua>, Konstantin Belousov wrote: >You need to pass --export-dynamic to the linker when linking binary that >is supposed to export its own symbols. Yes! Thank you Konstantin. Using that linker option... or more accurately it's gcc equivalent (-rdynamic) did indeed clear up the problem I was having with gthumb's (dynamic plug-in?) extension modules not seeing the symbols in the main exectuable. I'm not at all sure why this option wasn't already integrated into the relevant Makefiles (for gthumb). I will be looking into that further. Regards, rfg P.S. If it were me, I think I would have implemented that linker option the other way around, i.e. made the default that symbols in the main executable _are_ externally visible by default, and then I would have provided an option to make them non-visible, when and if that is/was ever useful. Sigh. Oh well. I wasn't there at the time. It's just water under the bridge now.