Tcl Source Code

View Ticket
Login
Ticket UUID: 219420
Title: Cray Unicos build problems for tcl8.3.2
Type: Bug Version: obsolete: 8.3.2
Submitter: nobody Created on: 2000-10-26 05:12:54
Subsystem: 27. Channel Types Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-09-14 06:25:51
Resolution: None Closed By: andreas_kupries
    Closed on: 2001-09-13 23:25:51
Description:
OriginalBugID: 6370 Bug
Version: 8.3.2
SubmitDate: '2000-10-18'
LastModified: '2000-10-25'
Severity: CRIT
Status: UnAssn
Submitter: techsupp
OS: All Unix
OSVersion: Unicos 10.0.0.5
Machine: Cray J90
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:

Len Makin


Comments:

1.(Low)The Cray system calls readlink, mknod and symlink take char * arg

    for path (not const char *) so tclUnixFCmd.c fails to compile. Solution:

    configure different? I have tried using cast (char *)src (char *)dst in

    appropriate places, but next bug is major and inhibits further testing.


    2.(major)In tclUnixPipe.c and tclUnixChan.c there are declared

    structures

    whose second element appears to be an int function. However the

    declared

    type of the second element in generic/tcl.h is declared as

    typedef struct Tcl_ChannelTypeVersion_ *Tcl_ChannelTypeVersion;

    This needs a fix.


    static Tcl_ChannelType fileChannelType = {

        "file",                             /* Type name. */

        FileBlockModeProc,/* Set blocking/nonblocking mode.*/

    ...

    static Tcl_ChannelType ttyChannelType = {

        "tty",                              /* Type name. */

        FileBlockModeProc,/* Set blocking/nonblocking mode.*/

    ...

    static Tcl_ChannelType tcpChannelType = {

        "tcp",                              /* Type name. */

        TcpBlockModeProc, /* Set blocking/nonblocking mode.*/

    ...

    static Tcl_ChannelType pipeChannelType = {

        "pipe",                             /* Type name. */

        PipeBlockModeProc,/* Set blocking/nonblocking mode.*/

    ...


ReproducibleScript:

env RANLIB=: ./configure

gmake

# produces compile errors


ObservedBehavior:

cc -c -O   -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=

1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPI

D=1 -DNO_WAIT3=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TER

MIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZON

E_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1

-D__CHAR_UNSIGNED__=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1         -DTCL_SH

LIB_EXT=\"\" ./../unix/tclUnixChan.cCC-144 cc: ERROR File = ./../unix/tclUnixChan.c, Line = 235

  A value of type "int (*)(ClientData, int)" cannot be used to initialize an

          entity of type "struct Tcl_ChannelTypeVersion_ *".


      FileBlockModeProc,                        /* Set blocking/nonblocking mode

.*/

      ^


CC-144 cc: ERROR File = ./../unix/tclUnixChan.c, Line = 254

  A value of type "int (*)(ClientData, int)" cannot be used to initialize an

          entity of type "struct Tcl_ChannelTypeVersion_ *".


      FileBlockModeProc,                        /* Set blocking/nonblocking mode

.*/

      ^


CC-144 cc: ERROR File = ./../unix/tclUnixChan.c, Line = 273

  A value of type "int (*)(ClientData, int)" cannot be used to initialize an

          entity of type "struct Tcl_ChannelTypeVersion_ *".


      TcpBlockModeProc,                 /* Set blocking/nonblocking mode.*/

      ^


3 errors detected in the compilation of "./../unix/tclUnixChan.c".

...cc -c -O   -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=

1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPI

D=1 -DNO_WAIT3=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TER

MIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZON

E_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1

-D__CHAR_UNSIGNED__=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1         -DTCL_SH

LIB_EXT=\"\" ./../unix/tclUnixFCmd.c

CC-167 cc: ERROR File = ./../unix/tclUnixFCmd.c, Line = 376

  Argument of type "const char *" is incompatible with parameter of type "char *

"

          .


            length = readlink(src, link, sizeof(link)); /* INTL: Native. */

                              ^


CC-167 cc: ERROR File = ./../unix/tclUnixFCmd.c, Line = 381

  Argument of type "const char *" is incompatible with parameter of type "char *

"

          .


            if (symlink(link, dst) < 0) {               /* INTL: Native. */

                              ^


CC-167 cc: ERROR File = ./../unix/tclUnixFCmd.c, Line = 388

  Argument of type "const char *" is incompatible with parameter of type "char *

"

          .


            if (mknod(dst, srcStatBuf.st_mode,          /* INTL: Native. */

                      ^


3 errors detected in the compilation of "./../unix/tclUnixFCmd.c".

cc -c -O -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=

1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPI

D=1 -DNO_WAIT3=1 -DNO_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TER

MIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZON

E_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1

-D__CHAR_UNSIGNED__=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1         -DTCL_SH

LIB_EXT=\"\" ./../unix/tclUnixPipe.c

CC-144 cc: ERROR File = ./../unix/tclUnixPipe.c, Line = 71

  A value of type "int (*)(ClientData, int)" cannot be used to initialize an

          entity of type "struct Tcl_ChannelTypeVersion_ *".


      PipeBlockModeProc,                        /* Set blocking/nonblocking mode

.*/

      ^


1 error detected in the compilation of "./../unix/tclUnixPipe.c".

....
User Comments: andreas_kupries added on 2001-09-10 22:36:29:
Logged In: YES 
user_id=75003

Len Makin is reachable at <[email protected]>.
Also see http://www.hpc.csiro.au/~len/

andreas_kupries added on 2001-09-08 05:06:02:

File Added - 10511: 219420.84.diff

andreas_kupries added on 2001-09-08 05:05:34:

File Added - 10510: 219420.833.diff

Logged In: YES 
user_id=75003

Ok, enclosing patches against 8.3.3 and 8.4
which may fix the problem.

andreas_kupries added on 2001-09-08 04:49:10:
Logged In: YES 
user_id=75003

Also see http://www.cray.com/swpubs/manuals/004-2179-
005/html-004-2179-005/c8699.htm for page with explanations.

Tcl is not alone:
http://www.geocrawler.com/archives/3/383/1999/11/0/2907730/

... I can't find autoconf macros I could use to extend 
configure with. So it will be preprocessor macros in the 
code itself.

andreas_kupries added on 2001-09-08 04:32:41:
Logged In: YES 
user_id=75003

http://www.google.com/search?q=cache:LdS-
2fTisF4:www.navo.hpc.mil/pet/Video/HPC/SGI/PDF/cray_compiler
_extensions.pdf+cray+cc+preprocessor+macros&hl=en

and look for predefined macros. Thank google.

The macros are CRAY PVP : CRAY, cray, _CRAY, _UNICOS, 
MEMSIZE,_CRAYC90, _ADDR32, _ADDR64

andreas_kupries added on 2001-09-08 04:29:30:
Logged In: YES 
user_id=75003

Both Linux and Solaris declare the path argument as "const 
char*". Just adding casts will therefore not help as this 
will then cause these two important platforms to fail 
compilation or to at least issue warnings.

Does the compiler define some cray specific pre-processor 
macro I can use to detect the platform ?

andreas_kupries added on 2001-09-08 04:14:18:
Logged In: YES 
user_id=75003

No changes to tclUnixFCmd between 8.3.2 and 8.3.3.
This part of the report still relevant.

andreas_kupries added on 2001-09-08 03:56:55:
Logged In: YES 
user_id=75003

Ad 1) There are major changes to the filesystem code in
      8.4 (Introduction of a virtual filesystem layer)
      so it is not possible to say if this applies to
      that version too. We have to check 8.3.3 in this
      regard.

Ad 2) This should be fixed in 8.3.3. Please check this
      version out.

msofer added on 2001-08-30 20:09:06:
Logged In: YES 
user_id=148712

Assigning to an area maintainer.

Attachments: