Re: FileRunner under cygwin - simple compilation fails.

2005-01-19 Thread CV
Igor Pechtchanski pechtcha at cs.nyu.edu writes:
 On Wed, 19 Jan 2005, CV wrote:
  After running the command gcc -E ext.c -o ext.pre and then
  comparing ext.pre with tcl.h I think I can identify some of
  the included bits, eg. the following:
 
 You could also just look at the '# line' lines, e.g.,
 '# 159 /usr/include/tcl.h 3 4'

Yep, those lines are in there. Quite a number of them in fact.

 The most interesting thing is whether Tcl_CreateCommand is declared, and
 whether its signature corresponds to its usage in ext.c.

Here are the relevant bits.
I'm afraid I am not conversant enough with pointer and data type
mechanisms in c to make total sense of it. It appears to be fairly
advanced stuff ...

And I am seeing strange behaviour in the program, on one
particular point, though we best not go into details on that
yet as I am not sure it is anything to do with cygwin.

But it would be useful to eliminate the doubt about
these warnings first. If you can see any obvious mistake
below I'd appreciate it.

-- from tclDecls.h, included at pre-compile time 
/* 91 */
EXTERN Tcl_Command  Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp * interp, 
CONST char * cmdName, Tcl_CmdProc * proc, 
ClientData clientData, 
Tcl_CmdDeleteProc * deleteProc));
...
Tcl_Command (*tcl_CreateCommand) _ANSI_ARGS_((Tcl_Interp * interp,
   CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData,
   Tcl_CmdDeleteProc * deleteProc)); /* 91 */
-
-- usage in ext.c ---
... (declarations at the top of the file)
static int GetTimeFromSecs(ClientData clientData, Tcl_Interp* interp, 
   int argc, char* argv[]);
static int GetTimeFromSecsSetFormat(ClientData clientData, Tcl_Interp* interp, 
   int argc, char* argv[]);
static int GetStringFromMode(ClientData clientData, Tcl_Interp* interp, 
   int argc, char* argv[]);
static int GetUidGidString(ClientData clientData, Tcl_Interp* interp, 
   int argc, char* argv[]);

... (a little further down)
int
Ext_Init(interp)
Tcl_Interp *interp; /* Interpreter for application. */
{
Tcl_CreateCommand(interp, GetTimeFromSecs, GetTimeFromSecs, NULL, NULL);
Tcl_CreateCommand(interp, GetTimeFromSecsSetFormat,
  GetTimeFromSecsSetFormat, NULL, NULL);
Tcl_CreateCommand(interp, GetStringFromMode, GetStringFromMode,
   NULL, NULL);
Tcl_CreateCommand(interp, GetUidGidString, GetUidGidString, NULL, NULL);
...
--
 and, again, the warnings from the compilation ---

gcc -Wall -fPIC -O3 -I/usr/include -I/usr/include -I/usr/include/X11
   -c -o ext.o ext.c
cc1: warning: -fPIC ignored for target (all code is position independent)
ext.c: In function `Ext_Init':
ext.c:95: warning: passing arg 3 of `Tcl_CreateCommand' from
  incompatible pointer type
ext.c:96: warning: passing arg 3 of `Tcl_CreateCommand' from
  incompatible pointer type
ext.c:97: warning: passing arg 3 of `Tcl_CreateCommand' from
  incompatible pointer type
ext.c:98: warning: passing arg 3 of `Tcl_CreateCommand' from
  incompatible pointer type
...
--

  Don't know, but actually it only refuses to enter the
  C:/cygwin/cygdrive directory, where the windows disks
  are mounted. It is ok everywhere else.
 
 Ha.  /cygdrive is a virtual directory, intended to access Windows disks
 from inside Cygwin, not vice versa.  Why go to C:/cygwin/cygdrive/c/, when
 you can simply go to C:/?

I would have preferred to have a consistent view of the
directory tree from within cygwin, starting from / as
the root, but as I say it's a minor point.

Cheers CV



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-19 Thread Igor Pechtchanski
On Wed, 19 Jan 2005, CV wrote:

 Igor Pechtchanski pechtcha at cs.nyu.edu writes:
  On Wed, 19 Jan 2005, CV wrote:
   After running the command gcc -E ext.c -o ext.pre and then
   comparing ext.pre with tcl.h I think I can identify some of
   the included bits, eg. the following:
 
  You could also just look at the '# line' lines, e.g.,
  '# 159 /usr/include/tcl.h 3 4'

 Yep, those lines are in there. Quite a number of them in fact.

Ok, looks like it was included, so that's that.

  The most interesting thing is whether Tcl_CreateCommand is declared, and
  whether its signature corresponds to its usage in ext.c.

 Here are the relevant bits.
 I'm afraid I am not conversant enough with pointer and data type
 mechanisms in c to make total sense of it. It appears to be fairly
 advanced stuff ...

Arg #3 is a pointer to a function (Tcl_CmdProc).  See where that's
declared *in the preprocessed file* (so that all macros are expanded) and
see if your declarations of GetTimeFromSecs, etc, correspond to it.  The
most obvious mismatch is probably the const char* argv[] vs. your char*
argv[].

 [snip]
 But it would be useful to eliminate the doubt about
 these warnings first. If you can see any obvious mistake
 below I'd appreciate it.

 -- usage in ext.c ---
 ... (declarations at the top of the file)
 static int GetTimeFromSecs(ClientData clientData, Tcl_Interp* interp,
int argc, char* argv[]);
 [snip]
 ... (a little further down)
 int
 Ext_Init(interp)
 Tcl_Interp *interp;   /* Interpreter for application. */
 {
 Tcl_CreateCommand(interp, GetTimeFromSecs, GetTimeFromSecs, NULL, NULL);
 [snip]
 ...
 --
  and, again, the warnings from the compilation ---

 gcc -Wall -fPIC -O3 -I/usr/include -I/usr/include -I/usr/include/X11
-c -o ext.o ext.c
 cc1: warning: -fPIC ignored for target (all code is position independent)
 ext.c: In function `Ext_Init':
 ext.c:95: warning: passing arg 3 of `Tcl_CreateCommand' from
   incompatible pointer type
 [snip]
 ...
 --

   Don't know, but actually it only refuses to enter the
   C:/cygwin/cygdrive directory, where the windows disks
   are mounted. It is ok everywhere else.
 
  Ha.  /cygdrive is a virtual directory, intended to access Windows
  disks from inside Cygwin, not vice versa.  Why go to
  C:/cygwin/cygdrive/c/, when you can simply go to C:/?

 I would have preferred to have a consistent view of the
 directory tree from within cygwin, starting from / as
 the root, but as I say it's a minor point.

If you want to see /cygdrive as a real directory, create it (mkdir
/cygdrive should do it).  However, any *Cygwin* program will interpret
/ as c:/cygwin, and not as c:/, unless your mounts are screwed up
(which they don't seem to be).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-19 Thread Patrick Samson

--- Igor Pechtchanski wrote:
 Arg #3 is a pointer to a function (Tcl_CmdProc). 
 See where that's
 declared *in the preprocessed file* (so that all
 macros are expanded) and
 see if your declarations of GetTimeFromSecs, etc,
 correspond to it.  The
 most obvious mismatch is probably the const char*
 argv[] vs. your char*
 argv[].
 

From a working source of Postgresql:

static int pltcl_elog(ClientData cdata, Tcl_Interp
*interp,
   int argc, CONST84 char *argv[]);
 ^^^

I'm pretty confident that CONST84 is #defined as CONST
in tcl.h




__ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-19 Thread Igor Pechtchanski
On Wed, 19 Jan 2005, Patrick Samson wrote:

 --- Igor Pechtchanski wrote:
  Arg #3 is a pointer to a function (Tcl_CmdProc). See where that's
  declared *in the preprocessed file* (so that all macros are expanded)
  and see if your declarations of GetTimeFromSecs, etc, correspond to
  it.  The most obvious mismatch is probably the const char* argv[]
  vs. your char* argv[].

 From a working source of Postgresql:

 static int pltcl_elog(ClientData cdata, Tcl_Interp *interp,
  int argc, CONST84 char *argv[]);
  ^^^

 I'm pretty confident that CONST84 is #defined as CONST in tcl.h

...which expands to const in the final sources:

$ echo '#include tcl.h' | gcc -E - | grep '^typedef int (Tcl_CmdProc)'
typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp, int argc, 
const char *argv[]);

And your point was?..
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-19 Thread Patrick Samson

--- Igor Pechtchanski wrote:

 On Wed, 19 Jan 2005, Patrick Samson wrote:
 
 
  From a working source of Postgresql:
 
  static int pltcl_elog(ClientData cdata, Tcl_Interp
 *interp,
 int argc, CONST84 char *argv[]);
   ^^^
 
  I'm pretty confident that CONST84 is #defined as
 CONST in tcl.h
 
 ...which expands to const in the final sources:
 
 $ echo '#include tcl.h' | gcc -E - | grep
 '^typedef int (Tcl_CmdProc)'
 typedef int (Tcl_CmdProc) (ClientData clientData,
 Tcl_Interp *interp, int argc, const char *argv[]);
 
 And your point was?..
   Igor

You're right.
I just wanted to inform that the CONST84 may be
a better syntax (according to the postgresql sample,
but it may be only a particular case, I don't know
other examples).
I should have be more precise with:
by default CONST84 expands to CONST, but with
possible additional define's, it may expand to
nothing.




__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread CV
Hello,
FileRunner is a nifty little file manager that I have been
using for years under Linux and I would like to have it under
cygwin as well.

But I am stuck with installation on cygwin because I can't
get the included, very simple c-program to compile, probably
due to my own cluelessness about where the various libraries
live etc. (haven't really compiled anything under cygwin yet)

The c-program basically defines a few entry points into TclTk.
The rest of FileRunner is written in TclTk.

Below is detailed info, including the very simple makefile,
what changes I made to it and the output from the compilation
attempt.

My own ideas about what might be wrong:
1. TclTk libraries not found (?)
   I would have expected to find them at /usr/lib/Tcl8.4 and
   .../Tk8.4, but only the Tk one is there and it appears to
   be almost empty. It only has one file: pkgIndex.tcl
   I tried pointing the makefile at that directory, and also
   at /usr/lib directly but the results were the same.
   Couldn't find these libs anywhere else either.

2. I am not sure if it is enough to just change ext.so to
   ext.dll in the makefile, as I did, or if any other switches
   or libraries possibly come into play for compiling dll's.
   
3. Possibly TclTk8.4 is too new (?) The current version of
   FileRunner was designed for 8.0. (?)
   
I am probably missing something obvious.
Any pointers would be appreciated.

And also nice to hear if anyone has got FileRunner working
under cygwin. (I tried googling around for any experiences
with this but turned up nothing.)

My cygwin installation is up to date (done recently) and
fairly complete, certainly including everyting to do with
TclTk and its associated libraries.

TIA CV

Here is the detailed info:
---
The makefile, based on the one provided for Linux and modified as follows:
- Changed the include directories, see below
- Also tried with plain /usr/lib as inc-directories, with similar results
- Changed ext.so to ext.dll
and also symlinked X11 to X11R6 under /usr
---
# Change this if you have this stuff somewhere else.
# TCLINC = /usr/lib/tcl8.0
# TKINC  = /usr/lib/tk8.0
TCLINC = /usr/lib/tk8.4
TKINC  = /usr/lib/tk8.4
X11INC = /usr/X11/include

CFLAGS = -Wall -fPIC -O3 -I$(TCLINC) -I$(TKINC) -I$(X11INC)

CC = gcc

all: ext.dll

ext.dll: ext.o
gcc -shared -Wl,-soname,ext.dll -o ext.dll ext.o
---
The output from compilation/linking:
---
gcc -Wall -fPIC -O3 -I/usr/lib/tk8.4 -I/usr/lib/tk8.4 -I/usr/X11/include
   -c -o ext.o ext.c
cc1: warning: -fPIC ignored for target (all code is position independent)
ext.c: In function `Ext_Init':
ext.c:95: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:96: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:97: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:98: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:99: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:100: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:101: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:102: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:103: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:104: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:105: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:106: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:107: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:108: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c:109: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
 pointer type
ext.c: In function `GetEuid':
ext.c:567: warning: int format, uid_t arg (arg 3)
gcc -shared -Wl,-soname,ext.so -o ext.so ext.o
ext.o(.text+0xcac):ext.c: undefined reference to `_Tcl_CreateCommand'
ext.o(.text+0xcd2):ext.c: undefined reference to `_Tcl_CreateCommand'
ext.o(.text+0xcf8):ext.c: undefined reference to `_Tcl_CreateCommand'
ext.o(.text+0xd1e):ext.c: undefined reference to `_Tcl_CreateCommand'
ext.o(.text+0xd44):ext.c: undefined reference to `_Tcl_CreateCommand'
ext.o(.text+0xd6a):ext.c: more undefined references
 to `_Tcl_CreateCommand' follow
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../libcygwin.a(pseudo-reloc.o)
 (.text+0x52): undefined reference to `___RUNTIME_PSEUDO_RELOC_LIST_END__'

Re: FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread Igor Pechtchanski
On Tue, 18 Jan 2005, CV wrote:

 Hello,
 FileRunner is a nifty little file manager that I have been
 using for years under Linux and I would like to have it under
 cygwin as well.

 But I am stuck with installation on cygwin because I can't
 get the included, very simple c-program to compile, probably
 due to my own cluelessness about where the various libraries
 live etc. (haven't really compiled anything under cygwin yet)

 The c-program basically defines a few entry points into TclTk.
 The rest of FileRunner is written in TclTk.

 Below is detailed info, including the very simple makefile,
 what changes I made to it and the output from the compilation
 attempt.

 My own ideas about what might be wrong:
 1. TclTk libraries not found (?)
I would have expected to find them at /usr/lib/Tcl8.4 and
.../Tk8.4, but only the Tk one is there and it appears to
be almost empty. It only has one file: pkgIndex.tcl
I tried pointing the makefile at that directory, and also
at /usr/lib directly but the results were the same.
Couldn't find these libs anywhere else either.

Shouldn't TKINC and TCLINC point to where the *header* files are?  I.e.,
/usr/include?

 2. I am not sure if it is enough to just change ext.so to
ext.dll in the makefile, as I did, or if any other switches
or libraries possibly come into play for compiling dll's.

Windows doesn't allow DLLs that have undefined symbols -- all undefined
symbols have to be statically resolved (possibly to other DLLs, though).
Try adding -ltk -ltcl to the DLL link line.

 3. Possibly TclTk8.4 is too new (?) The current version of
FileRunner was designed for 8.0. (?)

That you'll have to find out by yourself.

 I am probably missing something obvious.
 Any pointers would be appreciated.

 And also nice to hear if anyone has got FileRunner working
 under cygwin. (I tried googling around for any experiences
 with this but turned up nothing.)

 My cygwin installation is up to date (done recently) and
 fairly complete, certainly including everyting to do with
 TclTk and its associated libraries.

See http://cygwin.com/problems.html for instructions on how to report
your exact version of Cygwin.

 Here is the detailed info:
 ---
 The makefile, based on the one provided for Linux and modified as follows:
 - Changed the include directories, see below
 - Also tried with plain /usr/lib as inc-directories, with similar results
 - Changed ext.so to ext.dll
 and also symlinked X11 to X11R6 under /usr
 ---
 # Change this if you have this stuff somewhere else.
 # TCLINC = /usr/lib/tcl8.0
 # TKINC  = /usr/lib/tk8.0
 TCLINC = /usr/lib/tk8.4
   ^^
   /usr/include
 TKINC  = /usr/lib/tk8.4
   ^^
   /usr/include
 X11INC = /usr/X11/include
   
   /usr/include/X11

 CFLAGS = -Wall -fPIC -O3 -I$(TCLINC) -I$(TKINC) -I$(X11INC)

 CC = gcc

 all: ext.dll

 ext.dll: ext.o
   gcc -shared -Wl,-soname,ext.dll -o ext.dll ext.o

$(CC) -shared -Wl,-soname,ext.dll -o ext.dll ext.o -ltk -ltcl

 ---
 The output from compilation/linking:
 ---
 gcc -Wall -fPIC -O3 -I/usr/lib/tk8.4 -I/usr/lib/tk8.4 -I/usr/X11/include
-c -o ext.o ext.c
 cc1: warning: -fPIC ignored for target (all code is position independent)
 ext.c: In function `Ext_Init':
 ext.c:95: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:96: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:97: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:98: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:99: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:100: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:101: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:102: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:103: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:104: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:105: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:106: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:107: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:108: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible
  pointer type
 ext.c:109: warning: passing arg 3 

Re: FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread CV

Thanks for your help Igor.

Actually I found the answer by googling for 
___RUNTIME_PSEUDO_RELOC_LIST__. Someone had that problem
fixed by upgrading to the latest binutils.

I checked and my binutils was a 2002something version
while there is a 2004... one available.

What I can't understand is how an old 2002 version of
binutils ended up on my system. I installed from scratch
over the internet just before christmas umm.. maybe six
weeks ago or so and I assumed I got the latest version
of everything. I must have assumed wrong !?.
(unless the subsequent kde installation set it back ??)

I upgraded binutils to the 2004 version with setup and
ext.c now compiles. I still get the incompatible pointer
type warnings at the compilation stage but it links and
creates the .dll with no complaints and the application
starts up.

It does seem to behave funny, refusing to enter certain
directories, but that I'll have to investigate separately.

Thanks again. CV






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread Igor Pechtchanski
On Tue, 18 Jan 2005, CV wrote:

 Thanks for your help Igor.

 Actually I found the answer by googling for
 ___RUNTIME_PSEUDO_RELOC_LIST__. Someone had that problem fixed by
 upgrading to the latest binutils.

Ah, right, that would do it.  Strangely enough, Googling for partial
string (RUNTIME_PSEUDO_RELOC) didn't work -- apparently Google does
treat underscores as letters, and not as separators...

 I checked and my binutils was a 2002something version while there is a
 2004... one available.

 What I can't understand is how an old 2002 version of binutils ended up
 on my system. I installed from scratch over the internet just before
 christmas umm.. maybe six weeks ago or so and I assumed I got the latest
 version of everything. I must have assumed wrong !?. (unless the
 subsequent kde installation set it back ??)

Your installation is only as up-to-date as your mirror.  Plus, there may
be *two* versions of binutils on your machine -- check your PATH.

 I upgraded binutils to the 2004 version with setup and ext.c now
 compiles. I still get the incompatible pointer type warnings at the
 compilation stage but it links and creates the .dll with no complaints
 and the application starts up.

Did you check whether tcl.h gets included?  If it is, it could be a bug in
ext.c.

 It does seem to behave funny, refusing to enter certain directories, but
 that I'll have to investigate separately.

Perhaps related to the above warnings?
	Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_		[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_		[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread Mark Bohlman
Igor Pechtchanski wrote:
On Tue, 18 Jan 2005, CV wrote:

Thanks for your help Igor.
Actually I found the answer by googling for
___RUNTIME_PSEUDO_RELOC_LIST__. Someone had that problem fixed by
upgrading to the latest binutils.

Ah, right, that would do it.  Strangely enough, Googling for partial
string (RUNTIME_PSEUDO_RELOC) didn't work -- apparently Google does
treat underscores as letters, and not as separators...

I checked and my binutils was a 2002something version while there is a
2004... one available.
What I can't understand is how an old 2002 version of binutils ended up
on my system. I installed from scratch over the internet just before
christmas umm.. maybe six weeks ago or so and I assumed I got the latest
version of everything. I must have assumed wrong !?. (unless the
subsequent kde installation set it back ??)

Your installation is only as up-to-date as your mirror.  Plus, there may
be *two* versions of binutils on your machine -- check your PATH.

I upgraded binutils to the 2004 version with setup and ext.c now
compiles. I still get the incompatible pointer type warnings at the
compilation stage but it links and creates the .dll with no complaints
and the application starts up.

Did you check whether tcl.h gets included?  If it is, it could be a bug in
ext.c.

It does seem to behave funny, refusing to enter certain directories, but
that I'll have to investigate separately.

Perhaps related to the above warnings?
Igor
Perhaps a file in use problem when re-installing?  It seems that I may 
have had that in the past, but never ran into significant problems that 
was so haven't investigated
-- Mark

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread CV
Igor Pechtchanski pechtcha at cs.nyu.edu writes:

 Did you check whether tcl.h gets included?  If it is, it could be a bug in
 ext.c.

I ran gcc -E as you suggested but was not sure how to interpret
the results. Looking at it a bit more closely I think it is clear
that tcl.h _does_ get included:

After running the command gcc -E ext.c -o ext.pre and then
comparing ext.pre with tcl.h I think I can identify some of
the included bits, eg. the following:

 tcl.h ---
/*
 * Procedure types defined by Tcl:
 */

typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int code));
typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, CONST84 char *argv[]));


 ext.pre ---

typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp,
   int code);

typedef void (Tcl_ChannelProc) (ClientData clientData, int mask);
typedef void (Tcl_CloseProc) (ClientData data);
typedef void (Tcl_CmdDeleteProc) (ClientData clientData);
typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp,
   int argc, const char *argv[]);


  It does seem to behave funny, refusing to enter certain directories, but
  that I'll have to investigate separately.
 
 Perhaps related to the above warnings?

Don't know, but actually it only refuses to enter the
C:/cygwin/cygdrive directory, where the windows disks
are mounted. It is ok everywhere else.

mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type user (binmode,noumount)
d: on /cygdrive/d type user (binmode,noumount)
g: on /cygdrive/g type user (binmode,noumount)
h: on /cygdrive/h type user (binmode,noumount)

I am a little surprised that FileRunner is working with
C:/ as its root directory. I would have preferred to have
it use the cygwin / root, and then access windows disks
over /cygdrive/c etc. but that's a minor point and it
still sort of works: cd / takes you to C:/cygwin.

Another funny thing is that cygwin symlinks come up
as filename.lnk, but they still seem to work as
expected when you click on them.

Cheers CV



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: FileRunner under cygwin - simple compilation fails.

2005-01-18 Thread Igor Pechtchanski
On Wed, 19 Jan 2005, CV wrote:

 Igor Pechtchanski pechtcha at cs.nyu.edu writes:

  Did you check whether tcl.h gets included?  If it is, it could be a bug in
  ext.c.

 I ran gcc -E as you suggested but was not sure how to interpret
 the results. Looking at it a bit more closely I think it is clear
 that tcl.h _does_ get included:

 After running the command gcc -E ext.c -o ext.pre and then
 comparing ext.pre with tcl.h I think I can identify some of
 the included bits, eg. the following:
 [snip]

You could also just look at the '# line' lines, e.g.,
'# 159 /usr/include/tcl.h 3 4'

The most interesting thing is whether Tcl_CreateCommand is declared, and
whether its signature corresponds to its usage in ext.c.

   It does seem to behave funny, refusing to enter certain directories,
   but that I'll have to investigate separately.
 
  Perhaps related to the above warnings?

 Don't know, but actually it only refuses to enter the
 C:/cygwin/cygdrive directory, where the windows disks
 are mounted. It is ok everywhere else.

Ha.  /cygdrive is a virtual directory, intended to access Windows disks
from inside Cygwin, not vice versa.  Why go to C:/cygwin/cygdrive/c/, when
you can simply go to C:/?

 [snip]
 I am a little surprised that FileRunner is working with
 C:/ as its root directory. I would have preferred to have
 it use the cygwin / root, and then access windows disks
 over /cygdrive/c etc. but that's a minor point and it
 still sort of works: cd / takes you to C:/cygwin.

 Another funny thing is that cygwin symlinks come up
 as filename.lnk, but they still seem to work as
 expected when you click on them.

Both of the above seem to indicate that the Tcl library you're using is
probably a Windows native Tcl of some sort...  I may be totally off,
though, since I don't know squat about Tcl.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/