[GRASS5] Configure Warning

On Monday, January 29, 2001, at 09:17 PM, Eric G . Miller wrote:

On Mon, Jan 29, 2001 at 07:05:01PM -0800, Jeshua Lacock wrote:
> Hi Eric,
>
> FYI, this snip from my config output seems odd to me:
>
> checking Tcl include dirs... -I/usr/local/include
> checking Tk include dirs... -I/usr/local/include
> checking Tcl/Tk library dirs... -L/usr/local/lib
> checking for Tk_MainWindow in -ltk8.0... no
> configure: warning: *** Failed to find Tcl/Tk libraries
>
> It finds the Tcl/Tk libs, but reports it doesn't.

An unending burr in my britches... :wink:

I'm guessing you get that with a clean slate (i.e. does removing
config.cache and re-running ./configure make a difference) ?

Eric, yes, you are correct. Removing config.cache and re-running ./configure does not make a difference.

Probably another library is needed for 'ld' in the test script that is
generated. Is Tk tied into the native GUI on OS X? or is it tied to
XFree86? Could make a difference...

Maybe:

$ ldd /usr/lib/libtk8.0.so

will tell you (won't work on ar archives [*.a]).

Mmm, I have a /usr/lib/libtk8.0.a, not /usr/lib/libtk8.0.so. And I do not have a "ldd" program. I tired:

$ ld /usr/lib/libtk8.0.a

And it reports: "ld: no object files loaded"

But as you pointed out, it won't work on archives.

Regards,

Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Mon, Jan 29, 2001 at 10:10:56PM -0800, Jeshua Lacock wrote:
[snip]

> > It finds the Tcl/Tk libs, but reports it doesn't.
>
> An unending burr in my britches... :wink:
>
> I'm guessing you get that with a clean slate (i.e. does removing
> config.cache and re-running ./configure make a difference) ?

Eric, yes, you are correct. Removing config.cache and re-running
./configure does not make a difference.

Figures...

> Probably another library is needed for 'ld' in the test script that
> is generated. Is Tk tied into the native GUI on OS X? or is it tied
> to XFree86? Could make a difference...
>
> Maybe:
>
> $ ldd /usr/lib/libtk8.0.so
>
> will tell you (won't work on ar archives [*.a]).
>

Mmm, I have a /usr/lib/libtk8.0.a, not /usr/lib/libtk8.0.so. And I do
not have a "ldd" program. I tired:

$ ld /usr/lib/libtk8.0.a

No shared, just static then... ?? Still, don't know why the configure
script is failing here. I can't imagine that the library isn't being
found, so the only other thing that I've seen to be a consistent problem
with these library checks is missing dependencies to other libraries for
the configure code compile check (can your say alliteration ;). Anyway,
it's just a matter of finding out the minimal set of other libraries
needing to be referenced in order to compile a trivial piece of code
that will successfully link to libtk.

Example:

char * TkMainWindow();
int main (void)
{
    TkMainWindow();
    return 0;
}

Then:
$ $(CC) trivial_code.c -L/usr/X11R6/lib -lXt -ltk8.0 -ltcl8.0

Try compiling that, optionally adding -lSM -lX11 -lICE. If adding one
of these options makes it work where it didn't work before, I think I
know how to fix this problem (add $(X_PRE_LIBS) to ld_flags...).

And it reports: "ld: no object files loaded"

ld != ldd. Confused? ld is the linker (puts the object files together
and resolves library dependencies during compilation). ldd is a program
to show shared library dependencies. Static libraries don't have
dependency info (external references are unresolved) so it doesn't work
on them...

--
Eric G. Miller <egm2@jps.net>

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'