From: David Michael Kusters (none)
Subject: gcl, tk, and linking
Date: 
Message-ID: <669sq5$kfj$1@isnews.csc.calpoly.edu>
To start with, I have no knowledge of LISP.  I was assigned, however,
to install GNU Common LISP on an HP/UX 10.20 system with tcl 7.5 and
tk 4.1.  The compile of gcl went without incident (save a few warnings).
Once I started gcl, I decided to use some simple tests.  I added two and
three to get five.  I then tried

(si::tkconnect)

to link in tk libraries.  I got the following errors.  Keep in mind 
that I installed gcl to a base directory of /home/a1a/bugs.

<start of errors>

>(si::tkconnect)
Loading /home/a1a/bugs/lib/gcl-2.2.2/gcl-tk/tkl.o
/usr/ccs/bin/ld: Duplicate symbol "bcmp" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "bcopy" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "bzero" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "calloc" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "cfree" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Found 5 duplicate symbol(s)
/usr/ccs/bin/ld: (Warning) Linker features were used that may not be 
supported in future releases. The +vallcompatwarnings option can be used
to display more details, and the ld(1) man page contains additional
information. This warning can be suppressed with the +vnocompatwarnings
option.
/usr/ccs/bin/ld: Duplicate symbol "bcmp" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "bcopy" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "bzero" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "calloc" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Duplicate symbol "cfree" in files
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl and
/home/a1a/bugs/lib/gcl-2.2.2/unixport/saved_gcl
/usr/ccs/bin/ld: Found 5 duplicate symbol(s)
/usr/ccs/bin/ld: Entry symbol "init_tkl" not found

Error: The linkage editor failed.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by EVAL.
Broken at EVAL.  Type :H for Help.

<end of errors>

I looked in the GNU documentation and found the following

<start of GNU documentation>

7) (si::tkconnect) fails:
   a) Make sure DISPLAY variable set before
starting gcl.
   b) gcltkaux (subsidiary process) uses shared libraries and
you would need LD_LIBRARY_PATH set on say suns, to say where those are
if they are not in default places. [make sure "wish" would work]

<end of GNU documentation>

I did the following:

1.  Made sure I compiled gcl with the correct path for tclConfig.sh and
tkConfig.sh

2.  Made sure the DISPLAY variable was set correctly.

3.  Made sure that tkl.o was accessable.

4.  Grepped through both the gcl-tk directory in the gcl distribution and
the tk4.1 directory in /usr/local/lib for init_tkl but could not find it.

I am unsure of the LD_LIBRARY_PATH variable.  I assume they are talking
about an environment variable, but I could be mistaken.  

To restate my troubles, I am having two linking errors.  The first is
duplicate symbols.  This does not disconcert me too much.  The second
is that init_tkl is not found which kills the linking with tkl.o.

Is there any one out there that could possible help me track down the 
problems I am having?

Thank you in advance.

--
Dave Kusters. 
········@polymail.calpoly.edu

Practice kind acts of randomness and beautiful acts of senility.