* [RFA] Find init.tcl on cygwin
@ 2002-12-18 23:04 Christopher Faylor
2002-12-19 0:37 ` Mo DeJong
2002-12-19 8:07 ` Keith Seitz
0 siblings, 2 replies; 8+ messages in thread
From: Christopher Faylor @ 2002-12-18 23:04 UTC (permalink / raw)
To: insight
This has been sitting in my sandbox for a long time.
Ok to check in?
cgf
2002-12-19 Christopher Faylor <cgf@redhat.com>
* win/tclWinInit.c (TclpInitLibraryPath): Default to correct location
for installLib on cygwin.
Index: tclWinInit.c
===================================================================
RCS file: /cvs/uberbaum/tcl/win/tclWinInit.c,v
retrieving revision 1.4
diff -u -p -r1.4 tclWinInit.c
--- tclWinInit.c 26 Nov 2002 19:48:07 -0000 1.4
+++ tclWinInit.c 19 Dec 2002 07:02:02 -0000
@@ -196,7 +196,7 @@ TclpInitLibraryPath(path)
*/
/* CYGNUS LOCAL */
- sprintf(installLib, "share/tcl%s", TCL_VERSION);
+ sprintf(installLib, "usr/share/tcl%s", TCL_VERSION);
/* END CYGNUS LOCAL */
sprintf(developLib, "../tcl%s/library",
((TCL_RELEASE_LEVEL < 2) ? TCL_PATCH_LEVEL : TCL_VERSION));
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-18 23:04 [RFA] Find init.tcl on cygwin Christopher Faylor
@ 2002-12-19 0:37 ` Mo DeJong
2002-12-19 8:11 ` Christopher Faylor
2002-12-19 8:07 ` Keith Seitz
1 sibling, 1 reply; 8+ messages in thread
From: Mo DeJong @ 2002-12-19 0:37 UTC (permalink / raw)
To: insight
On Thu, 19 Dec 2002 02:04:16 -0500
Christopher Faylor <cgf@redhat.com> wrote:
> This has been sitting in my sandbox for a long time.
>
> Ok to check in?
>
> cgf
...
> /* CYGNUS LOCAL */
> - sprintf(installLib, "share/tcl%s", TCL_VERSION);
> + sprintf(installLib, "usr/share/tcl%s", TCL_VERSION);
> /* END CYGNUS LOCAL */
What are the configure flags that you are building with under Cygwin?
Is it something like `.../configure --prefix=/ --datadir=/usr` ?
The reason I am concerned is that a configure like the following:
.../configure --prefix=/usr/mydir ; make ; make install
will install the init.tcl file into /usr/mydir/share/tcl8.3/init.tcl.
With the change you suggest, it seems like the `make install` rule
will still copy the file to the same location but now the TclpInitLibraryPath
function will be looking in /usr/mydir/usr/share/tcl8.3/init.tcl.
Also, this change will make the windows version of `make install`
behave differently from the unix version, and I don't quite follow
why you would want to do that. What is the use case this patch
is intended to fix?
Mo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-18 23:04 [RFA] Find init.tcl on cygwin Christopher Faylor
2002-12-19 0:37 ` Mo DeJong
@ 2002-12-19 8:07 ` Keith Seitz
2002-12-19 8:25 ` Christopher Faylor
2002-12-19 8:28 ` Fernando Nasser
1 sibling, 2 replies; 8+ messages in thread
From: Keith Seitz @ 2002-12-19 8:07 UTC (permalink / raw)
To: Christopher Faylor; +Cc: insight
On Thu, 19 Dec 2002, Christopher Faylor wrote:
> 2002-12-19 Christopher Faylor <cgf@redhat.com>
>
> * win/tclWinInit.c (TclpInitLibraryPath): Default to correct location
> for installLib on cygwin.
You know, normally I would just say, "yes", but this seems like a good
time to start a little discussion on this.
I think I know why you want to move it to /usr/share from /usr/lib
(because it's the "right" place to put these files), but this would be
different from how net tcl/tk work, which I thought was the whole point to
trying to import 8.3.
So, do we care at all about not doing things too differently from the net
release (in the futile hopes to someday just require people to use the net
release) or do we even bother?
Keith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-19 0:37 ` Mo DeJong
@ 2002-12-19 8:11 ` Christopher Faylor
2002-12-19 14:12 ` Mo DeJong
0 siblings, 1 reply; 8+ messages in thread
From: Christopher Faylor @ 2002-12-19 8:11 UTC (permalink / raw)
To: insight
On Thu, Dec 19, 2002 at 12:39:46AM -0800, Mo DeJong wrote:
>On Thu, 19 Dec 2002 02:04:16 -0500
>Christopher Faylor <cgf@redhat.com> wrote:
>
>> This has been sitting in my sandbox for a long time.
>>
>> Ok to check in?
>>
>> cgf
>...
>> /* CYGNUS LOCAL */
>> - sprintf(installLib, "share/tcl%s", TCL_VERSION);
>> + sprintf(installLib, "usr/share/tcl%s", TCL_VERSION);
>> /* END CYGNUS LOCAL */
>
>
>What are the configure flags that you are building with under Cygwin?
>Is it something like `.../configure --prefix=/ --datadir=/usr` ?
I had hoped not to have to go into a lot of details about how cygwin
works but, no, that's not how I am configuring it. It wouldn't matter
if I was.
/usr/bin == /bin == x:\cygwin\bin
tcl apparently converts the cygwin path into a windows path and then looks
for x:\cygwin\share which doesn't exit. x:\cygwin\usr\share does exist.
There was a similar change in tcl 8.0 which was apparently dropped when
you did the merge from 8.0 -> 8.3.
cgf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-19 8:07 ` Keith Seitz
@ 2002-12-19 8:25 ` Christopher Faylor
2002-12-19 8:57 ` Keith Seitz
2002-12-19 8:28 ` Fernando Nasser
1 sibling, 1 reply; 8+ messages in thread
From: Christopher Faylor @ 2002-12-19 8:25 UTC (permalink / raw)
To: Keith Seitz; +Cc: insight
On Thu, Dec 19, 2002 at 08:07:20AM -0800, Keith Seitz wrote:
>On Thu, 19 Dec 2002, Christopher Faylor wrote:
>
>> 2002-12-19 Christopher Faylor <cgf@redhat.com>
>>
>> * win/tclWinInit.c (TclpInitLibraryPath): Default to correct location
>> for installLib on cygwin.
>
>You know, normally I would just say, "yes", but this seems like a good
>time to start a little discussion on this.
>
>I think I know why you want to move it to /usr/share from /usr/lib
>(because it's the "right" place to put these files), but this would be
>different from how net tcl/tk work, which I thought was the whole point to
>trying to import 8.3.
I wasn't trying to move it from /usr/lib to /usr/share. I was trying to
make it find the files that were installed in /usr/share. The change
from lib to share is not something that I did. That seems to be part of
tcl 8.3.
If someone wants to inform me of a better way to do this then I'm open
for suggestions. In the meantime, I'm carrying this change as a local
modification when I release new versions of insight for windows.
I'm trying to avoid this:
Tcl_Init failed: Can't find a usable init.tcl in the following directories:
{} f:/cygwin/share/tcl8.3 f:/cygwin/share/tcl8.3 f:/share/tcl8.3 f:/share/tcl8.3/library f:/library f:/../tcl8.3/library ../tcl8.3/library
This probably means that Tcl wasn't installed properly.
>So, do we care at all about not doing things too differently from the net
>release (in the futile hopes to someday just require people to use the net
>release) or do we even bother?
Until the net release understands cygwin, I think we'll always need a few
tweaks.
cgf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-19 8:07 ` Keith Seitz
2002-12-19 8:25 ` Christopher Faylor
@ 2002-12-19 8:28 ` Fernando Nasser
1 sibling, 0 replies; 8+ messages in thread
From: Fernando Nasser @ 2002-12-19 8:28 UTC (permalink / raw)
To: Keith Seitz; +Cc: Christopher Faylor, insight
Keith Seitz wrote:
> On Thu, 19 Dec 2002, Christopher Faylor wrote:
>
>
>>2002-12-19 Christopher Faylor <cgf@redhat.com>
>>
>> * win/tclWinInit.c (TclpInitLibraryPath): Default to correct location
>> for installLib on cygwin.
>
>
> You know, normally I would just say, "yes", but this seems like a good
> time to start a little discussion on this.
>
> I think I know why you want to move it to /usr/share from /usr/lib
> (because it's the "right" place to put these files), but this would be
> different from how net tcl/tk work, which I thought was the whole point to
> trying to import 8.3.
>
> So, do we care at all about not doing things too differently from the net
> release (in the futile hopes to someday just require people to use the net
> release) or do we even bother?
>
We do bother. It is really hard to maintain our customized copies of
these things.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-19 8:25 ` Christopher Faylor
@ 2002-12-19 8:57 ` Keith Seitz
0 siblings, 0 replies; 8+ messages in thread
From: Keith Seitz @ 2002-12-19 8:57 UTC (permalink / raw)
To: Christopher Faylor; +Cc: insight
On Thu, 19 Dec 2002, Christopher Faylor wrote:
> I wasn't trying to move it from /usr/lib to /usr/share. I was trying to
> make it find the files that were installed in /usr/share. The change
> from lib to share is not something that I did. That seems to be part of
> tcl 8.3.
Doh, of course. I just always forget that the Tcl folks are brain-dead
when it comes to installing software. They put everything in LIBDIR, and
we open source gurus (cough, cough) put shared text files into DATADIR.
> If someone wants to inform me of a better way to do this then I'm open
> for suggestions. In the meantime, I'm carrying this change as a local
> modification when I release new versions of insight for windows.
I certainly can't think of a "better" way to address this.
> Until the net release understands cygwin, I think we'll always need a few
> tweaks.
I agree. Could you add a little comment about the change so that the next
time we go to upgrade tcl we'll have a little more background on why the
change is made? [Having tried to do an upgrade not too long ago, it can be
frustrating to see a local change and not be able to figure out why it is
needed or if it is needed any longer.]
I've heard speculation that tcl8.4.1 is more cygwin-friendly... Martin was
working on something, but I guess he wants to do it all by himself?
Keith
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] Find init.tcl on cygwin
2002-12-19 8:11 ` Christopher Faylor
@ 2002-12-19 14:12 ` Mo DeJong
0 siblings, 0 replies; 8+ messages in thread
From: Mo DeJong @ 2002-12-19 14:12 UTC (permalink / raw)
To: insight
On Thu, 19 Dec 2002 11:11:35 -0500
Christopher Faylor <cgf@redhat.com> wrote:
>> What are the configure flags that you are building with under Cygwin?
>> Is it something like `.../configure --prefix=/ --datadir=/usr` ?
>
> I had hoped not to have to go into a lot of details about how cygwin
> works but, no, that's not how I am configuring it. It wouldn't matter
> if I was.
>
> /usr/bin == /bin == x:\cygwin\bin
>
> tcl apparently converts the cygwin path into a windows path and then looks
> for x:\cygwin\share which doesn't exit. x:\cygwin\usr\share does exist.
I was under the impression that the only place Tcl did cygwin path conversion
was in the PATH env var. As far as I can tell, Tcl does not mess with the PATH,
it just calls GetModuleFileName() to return the fully qualified Win32 path
where the tclsh83.exe executable lives. It then looks in ../$installLib for
the library files. This process works just fine for the normal Source-Navigator
install, which is configured with ".../configure --prefix=/somedir/SN".
I am concerned that this proposed change is going to break that.
How about putting the usr/share change in a __CYGWIN__ ifdef?
This should fix the Cygwin use case without breaking the SN use case.
Index: win/tclWinInit.c
===================================================================
RCS file: /cvs/src/src/tcl/win/tclWinInit.c,v
retrieving revision 1.4
diff -u -r1.4 tclWinInit.c
--- win/tclWinInit.c 26 Nov 2002 19:48:07 -0000 1.4
+++ win/tclWinInit.c 19 Dec 2002 21:53:02 -0000
@@ -196,7 +196,11 @@
*/
/* CYGNUS LOCAL */
+#if defined(__CYGWIN__)
+ sprintf(installLib, "usr/share/tcl%s", TCL_VERSION);
+#else
sprintf(installLib, "share/tcl%s", TCL_VERSION);
+#endif /* __CYGWIN__ */
/* END CYGNUS LOCAL */
sprintf(developLib, "../tcl%s/library",
((TCL_RELEASE_LEVEL < 2) ? TCL_PATCH_LEVEL : TCL_VERSION));
cheers
Mo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-12-19 22:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-18 23:04 [RFA] Find init.tcl on cygwin Christopher Faylor
2002-12-19 0:37 ` Mo DeJong
2002-12-19 8:11 ` Christopher Faylor
2002-12-19 14:12 ` Mo DeJong
2002-12-19 8:07 ` Keith Seitz
2002-12-19 8:25 ` Christopher Faylor
2002-12-19 8:57 ` Keith Seitz
2002-12-19 8:28 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).