delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/05/11:56:01

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3A2D1CC1.C1920749@sattel.com>
Date: Tue, 05 Dec 2000 08:50:09 -0800
From: Bruce Edge <bedge AT sattel DOT com>
Organization: Sattel Global Networks
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.15-4mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin support <cygwin AT sources DOT redhat DOT com>, mitsu5 AT ruby DOT famille DOT ne DOT jp
Subject: failure to build Tcl8.4a2(not 8.3.2) by Cygwin on Win98

> My configure methods are:
> 1)
> % cd /usr/local/src/Tcl8.4a2/win
> % ./configure --enable-gcc --enable-shared
> 2)
> % CC='gcc -mno-cygwin' ./configure --enable-gcc --enable-shared
> 3)
> % cd /usr/local/src/Tcl8.4a2/unix  :::(not win)
> % CC='gcc -mno-win32' ./configure --enable-gcc --enable-shared
> 
> All get error messages.
> 

I had to do a few of things to get a unix build of tcl under cygwin. I think
it's important that the distiction be made between a unix build vs. a windows
build under cygwin.
If you build for windows, the cygwin symlinks won't work from tcl. If you
build for unix, they will.

1) comment out all __try/__catch blocks. You'll see these as the compiler
finds them.
Don't have a list handy, sorry.


2) eliminate windows specific bits.
I'm kind of confused on this bit too. When compiling with cygwin's gcc, it
seems that there's a bunch of windows specific defines that are set, not sure
of exact names, eg: __WIN32__ __WIN__, etc..
These cause windows specific bits to be conditionally compiled. This is fine
for building a windows version, eg, grom the tcl/win dir, but not for building
a cygwin version, ie: from the unix dir.
So I added: 
	-UWIN32 -U__WIN32 -U__WIN32__ -U_WIN32 
to the CFLAGS to exclude windows code.


3) in tclUnixChan.c, you need to take out the lseek calls for stdio/out/err:

#ifndef __CYGWIN__
            if ((lseek(2, (off_t) 0, SEEK_CUR) == -1) &&
                    (errno == EBADF)) {
                return (Tcl_Channel) NULL;
            }
#endif                 


4) The test for S_IFIFO in tclUnixFCmd.c needs to be taken out:
                                                         
#ifndef __CYGWIN__
            if (mkfifo(dst, srcStatBuf.st_mode) < 0) {  /* INTL: Native. */
                return TCL_ERROR;
            }
            return CopyFileAtts(src, dst, &srcStatBuf);
#else                                                                           
                        return TCL_ERROR;
#endif                                                                          


-Bruce.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019