Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1229cd8a4e2da51f3c91a9e71518775cdfe3fe2c
Ticket: 218292ffffffffffffffffffffffffffffffffff
When compiling for Solaris 2.6, the Makefile must be hacked
User & Date: nobody on 2000-10-26 00:55:47
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3510 Bug
    Version: 8.2.1
    SubmitDate: '1999-11-08'
    LastModified: '1999-11-08'
    Severity: MED
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Solaris
    OSVersion: SunOS  5.7 Generic_106541-02 sun4u sparc SUNW,Ultra-5_10System =
    Machine: Sun Ultra-10
    FixedDate: '2000-10-25'
    ClosedDate: '1999-11-08'
    
    
    Name:
    Eric J. Meyer
    
    Comments:
    Solution:  Remove bad switches from AC_FLAGS variable in the Makefile and add "-lsocket" to the Makefile LIBS variable.
    
    ReproducibleScript:
    ./unix/configure 
    # Generated automatically using autoconf version 2.13 
    
    1)  The configure script reported there was no "gettimeofday" function defined even though one existed in my /usr/include/sys/time.h.  This erroneously turns on the -DNO_GETTOD=1 and the  -DGETTOD_NOT_DECLARED=1 switches in the Makefile.
    
    2)  The configure script erroneously adds the -DHAVE_NET_ERRNO_H=1 switch even though there is no errno.h file in my /usr/include/net directory.  There is an errno.h in /usr/include.
    
    3)  The "-lsocket" library switch is not included in the Makefile.  I'm not sure where configure decides this, but it looks to be around line 3696.
    
    ObservedBehavior:
    1)  The bad -DNO_GETTOD=1 and -DGETTOD_NOT_DECLARED=1 switches in the Makefile cause the following compilation error:
    
    ../generic/../unix/tclUnixPort.h:255: conflicting types for `gettimeofday'
    /usr/include/sys/time.h:389: previous declaration of `gettimeofday'
    *** Error code 1
    make: Fatal error: Command failed for target `tclAlloc.o'
    
    2)  The bad -DHAVE_NET_ERRNO_H=1 switch in the Makefile causes the following compilation error:
    
    ../generic/../unix/tclUnixPort.h:42: net/errno.h: No such file or directory
    In file included from ../generic/tclInt.h:30,
    
    3)  The missing "-lsocket" causes the following linker error:
    
    gcc -pipe  tclAppInit.o -L/cirrus/src/tcl8.2.1/unix -ltcl8.2 -ldl  -lm -lc  -Wl,-R,/usr/local/lib -o tclsh
    Undefined                       first referenced
     symbol                             in file
    socket                              /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    getpeername                         /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    recv                                /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    gethostbyname                       /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    accept                              /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    send                                /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    bind                                /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    setsockopt                          /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    getservbyname                       /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    gethostbyaddr                       /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    getsockopt                          /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    inet_addr                           /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    inet_ntoa                           /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    getsockname                         /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    listen                              /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    connect                             /cirrus/src/tcl8.2.1/unix/libtcl8.2.so
    ld: fatal: Symbol referencing errors. No output written to tclsh
    collect2: ld returned 1 exit status
    *** Error code 1
    make: Fatal error: Command failed for target `tclsh'
    
    DesiredBehavior:
    I expect not to get the compilation errors ;>
    
    
    
    This was due to not using 'make distclean' between 2.7 and 2.6. 
    -- 11/08/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.2.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to:
    When compiling for Solaris 2.6, the Makefile must be hacked 
    
  11. type changed to: "Bug"