From: Albert Chin <libtool@thewrittenword.com>
Cc: guile development <guile-devel@gnu.org>
Subject: Re: How can I link with libguile?
Date: Mon, 13 Jan 2003 13:25:08 -0600 [thread overview]
Message-ID: <20030113192508.GA39691@spuckler.il.thewrittenword.com> (raw)
In-Reply-To: <3E230264.15103E64@veritas.com>
On Mon, Jan 13, 2003 at 10:16:04AM -0800, Bruce Korb wrote:
> 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).
Run with gcc -v and see what's happening. If during the build of
autogen you must run a program which depends on libguile, change your
link to a test.
> 2. On Solaris, libtool ought to take "-L" args and duplicate them
> as "-R" args, yes? Or, is that too simple?
*ICK* *ICK* *ICK*!
> 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"?
I add -R/path/to/libopts for *every* *-config script (ditto for
pkgconfig scripts). Testing for -R won't help you on Tru64 UNIX, IRIX,
Redhat Linux, AIX, etc. Libtool does accept -R/path/to/lib and will
convert -R to the proper switch for the platform in question. However,
this doesn't help during ./configure.
> 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.
I think you should do the following:
1. Try to link and run against -lguile.
2. Look for guile-config and repeat #1.
3. Fail with a decent AC_ERROR.
At the same time, I'd add the following autoconf options:
--with-guile-config=[path to guile-config]
--with-guile=[base path of guile installation]
--with-guile-includes=[path to guile includes]
--with-guile-libraries=[path to guile libraries]
--with-guile would:
CPPFLAGS="$CPPFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
--with-guile-includes would:
CPPFLAGS="$CPPFLAGS -I$withval/include"
--with-guile-libraries would:
LDFLAGS="$LDFLAGS -L$withval/lib"
--with-guile is of course optional if you choose --with-guile-includes
and --with-guile-libraries.
BTW, this is OT for libtool.
--
albert chin (china@thewrittenword.com)
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
prev parent reply other threads:[~2003-01-13 19:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3E220722.14AC0473@veritas.com>
[not found] ` <20030113172430.GA36037@spuckler.il.thewrittenword.com>
2003-01-13 18:16 ` How can I link with libguile? Bruce Korb
2003-01-13 19:25 ` Albert Chin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030113192508.GA39691@spuckler.il.thewrittenword.com \
--to=libtool@thewrittenword.com \
--cc=guile-devel@gnu.org \
--cc=libtool@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).