Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
06:54 • Ticket [218303ffff] tcl/tk build fails when "-lc" on link comm... artifact: 7d48f3460c user: dgp
2000-10-26
08:18 • Closed ticket [218303ffff]. artifact: 8d22951511 user: welch
00:55 • New ticket [218303ffff]. artifact: 9fb89b4b07 user: nobody

tcl/tk build fails when "-lc" on link commandline

Closed / Fixed218303ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:55:55
OriginalBugID: 3655 Bug
Version: 8.2.1
SubmitDate: '1999-11-23'
LastModified: '1999-12-14'
Severity: SER
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: HP-UX
OSVersion: HP-UX xxx A.08.07 A 9000/710 2013592596
FixedDate: '2000-10-25'
ClosedDate: '1999-12-14'


Name: Jeff Epler

Comments:
if this is necessary on some platforms, configure should detect the fact
a similar patch to tk8.2.1/unix/Makefile.in is necessary

ReproducibleScript:
When building tcl/tk 8.2.1 on 
   HP-UX xxx A.08.07 A 9000/710 2013592596
the link process for tclsh (and subsequently wish) fails:
   gcc  tclAppInit.o -L/sds2/tcl8/src/tcl8.2.1/unix -ltcl8.2 -lm -lc -o tclsh
   collect2: ld returned 1 exit status
   /bin/ld: Unsatisfied symbols:
      atexit (code)
When "-lc" is removed from the gcc commandline, the link proceeds.

ObservedBehavior:
tcl/tk cannot be built

DesiredBehavior:
tcl/tk can successfully be built and installed

Patch:
--- Makefile.in.orig    Tue Nov 16 08:19:36 1999
+++ Makefile.in Tue Nov 16 08:19:42 1999
@@ -189,8 +189,8 @@

 # Libraries to use when linking.  This definition is determined by the
 # configure script.
-LIBS = @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
-WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
+LIBS = @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@
+WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@

 # The symbol below provides support for dynamic loading and shared
 # libraries.  See configure.in for a description of what it means.

PatchFiles:
unix/Makefile.in



Tcl 8.2.1/2 builds find for us with gcc 2.7.2.3 on HP 10.20, with
the -lc.  'atexit' is a standard C function, and I am able to find
it in /usr/lib/libc.sl. 
-- 12/14/1999 hobbs
welch Closed ticket [218303ffff]. [History diff]2000-10-26 08:18:59
dgp Ticket [218303ffff]: 4 changes [History diff]2001-04-05 06:54:27
Log in (anonymous is fine) to add a comment.