[JDEV] problems compiling

Chris, the Young One cky at pobox.com
Mon Jul 10 10:40:44 CDT 2000


On Mon, Jul 10, 2000 at 04:49:13PM +0200, Michael O Shea wrote:
! configure:1970: gcc -o conftest -g -O2   conftest.c -lpth
! -I/usr/local/include -L/usr/local/lib -lpth   1>&5
! configure:2006: checking for adns_init in -ladns
! configure:2025: gcc -o conftest -g -O2   conftest.c -ladns -LNONE/lib 
! -lpth  1>&5
! /usr/libexec/elf/ld: cannot open -lpth: No such file or directory

Yep, I found the problem. I leave the Jabber coders to fix it, however.

When searching for libpth, configure uses pth-config to find the
required switches (-L/usr/local/lib, in your case). However, after
successfully finding libpth, and adding -lpth to $LIBS, it neglects
to add said required switches as well.

Having said that however, fixing the above only solves the problem of
subsequently finding libpth (which is what the ``cannot open -lpth''
is about). It does not solve the problem of finding libadns.

To solve the bigger problem, to wit finding libraries in /usr/local/lib,
I suggest you set $LIBRARY_PATH in the appropriate login scripts to
include /usr/local/lib; apparently gcc converts items in $LIBRARY_PATH
to -L switches to pass to ld. Similar comments apply if your libadns is
installed somewhere other than /usr/local/lib.

To Eliot et al: I believe that, if you use gcc, setting $LIBRARY_PATH
is a general solution. See *Note (gcc)Environment Variables::.

Hope it helps,
	---Chris K.
-- 
 Chris, the Young One |_ Death is Nature's way of recycling human
  Auckland, New Zealand |_ beings.
http://cloud9.hedgee.com/ |_ 




More information about the JDev mailing list