From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.comp.gnu.libtool.general,gmane.lisp.guile.devel Subject: Re: How can I link with libguile? Date: Mon, 13 Jan 2003 10:16:04 -0800 Organization: Home Sender: libtool-bounces+gnu-libtool=m.gmane.org@gnu.org Message-ID: <3E230264.15103E64@veritas.com> References: <3E220722.14AC0473@veritas.com> <20030113172430.GA36037@spuckler.il.thewrittenword.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1042481331 9249 80.91.224.249 (13 Jan 2003 18:08:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 13 Jan 2003 18:08:51 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Y90y-0002Ov-00 for ; Mon, 13 Jan 2003 19:08:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Y91U-0000IB-0A for gnu-libtool@m.gmane.org; Mon, 13 Jan 2003 13:09:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18Y90R-00084m-00 for libtool@gnu.org; Mon, 13 Jan 2003 13:08:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Y90C-0007WZ-00 for libtool@gnu.org; Mon, 13 Jan 2003 13:08:02 -0500 Original-Received: from bay-bridge.veritas.com ([143.127.3.10] helo=mtvmime03.VERITAS.COM) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Y900-0006y5-00; Mon, 13 Jan 2003 13:07:48 -0500 Original-Received: from megami (unverified) by mtvmime03.VERITAS.COM ; Mon, 13 Jan 2003 10:07:54 -0800 Original-Received: from veritas.com([172.22.12.210]) (3746 bytes) by megami via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Mon, 13 Jan 2003 10:07:46 -0800 (PST) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.18-4GB i686) X-Accept-Language: en Original-To: libtool@gnu.org, guile development X-BeenThere: libtool@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Discussion list for the GNU libtool shared library maintenance tool List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: libtool-bounces+gnu-libtool=m.gmane.org@gnu.org Xref: main.gmane.org gmane.comp.gnu.libtool.general:1200 gmane.lisp.guile.devel:1870 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1870 Albert Chin wrote: > > On Sun, Jan 12, 2003 at 04:24:02PM -0800, Bruce Korb wrote in http://mail.gnu.org/archive/html/libtool/2003-01/msg00035.html : > > ``libguile'' lives in a place where LD_LIBRARY_PATH must be set > > (viz., /opt/sfw/lib). What is wrong? What should I be doing to > > tell libtool that it has to add a ``-R/opt/sfw/lib'' or something? > > If I use ``guile-config'' first, I'll override ``--with-libguile''. > > So much pain. :-( > > We solve this by building like so: > $ LDFLAGS="-R[path to guile library]" ./configure > > And, in the specific case of guile, we modify guile-config to output > -L[path to guile libraries] *and* -R[path to guile libraries]. :-( Several problems: 1. There seems to be something funny about the way links work on the Source Forge compile farm. The linker (invoked as "gcc") knows where to find free software libraries ("/opt/fsw/lib"), but it doesn't pass this knowledge along to the run time loader. Is this expected behavior, or a Source Forge issue? Should my link test be changed to a run test? Doing that would trigger the invocation of "guile-config". In any event, on the compile farm, my test believes that it can compile and link without anything more special than ``-lguile'' on the link line (no "-I" either). 2. On Solaris, libtool ought to take "-L" args and duplicate them as "-R" args, yes? Or, is that too simple? 3. As the author of a *-config script, how would I know when to add the "-R" thingey? Would libtool strip it if it weren't needed on a particular platform? Do you (Albert) add the -R/path/to/libopts on my script, too? Is there a configure test to check for the need of adding "-R"? 4. Your solutions work well for your environment: you are in control of the production of your binaries. My problem is that I am trying (with amazing amounts of frustration ;) to produce scripts that allow my clients to build and install products with: ( gunzip -c product*.tar.gz | tar -xvf - ) && \ cd product* && \ ./configure && \ make && \ make install without having to know or understand the configury of Guile and the magical linker options for any particular platform. In theory, that is what autoconf/automake/libtool are all about. :( P.S.: Dan Kegel asked: > Is guile-config reliably installed for versions of guile > later than some number X? Answer: No. It is a special issue with Red Hat. They set the prefix to "/usr" so that no special configury is required, so nobody needs to consult "guile-config". That means that just because you cannot find "guile-config" it doesn't mean that Guile has not been installed. SO: step 1, let someone tell you where to find it. Failing that, step 2, try to use it anyway. If *that* fails, then, finally, go find "guile-config". Maybe I should switch steps 2 and 3, but it led to such a complicated shell script/autoconf macro....Red Hat should distribute the script.