caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Tuareg mode under Cygwin...
@ 2006-02-19 15:46 Jeremy Shute
  2006-02-20 16:25 ` [Caml-list] " Igor Peshansky
  0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Shute @ 2006-02-19 15:46 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

Hi,

When I fire up Tuareg mode under native Windows emacs and run an
inferior-caml, I get what I expect (Caml running in an emacs buffer).  When
I do so with Cygwin's Emacs, I get an empty buffer and a process "
ocamlrun.exe" dressed in new window trim, which seems completely detached
from the inferior-caml buffer (meaning C-c C-e does NOT send commands to
this new process).

I asked Albert Cohen, Tuareg-mode's creator, but he didn't know much about
Windows, and suggested I ask here.

What magic Elisp incantation will shackle invocations of "ocaml" in a
buffer, when using Cygwin emacs?  I also tried "sh -c ocaml" to no avail...

Jeremy

[-- Attachment #2: Type: text/html, Size: 717 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-19 15:46 Tuareg mode under Cygwin Jeremy Shute
@ 2006-02-20 16:25 ` Igor Peshansky
  2006-02-20 17:08   ` Matthieu Dubuget
  0 siblings, 1 reply; 10+ messages in thread
From: Igor Peshansky @ 2006-02-20 16:25 UTC (permalink / raw)
  To: Jeremy Shute; +Cc: caml-list

On Sun, 19 Feb 2006, Jeremy Shute wrote:

> Hi,
>
> When I fire up Tuareg mode under native Windows emacs and run an
> inferior-caml, I get what I expect (Caml running in an emacs buffer).
> When I do so with Cygwin's Emacs, I get an empty buffer and a process
> "ocamlrun.exe" dressed in new window trim, which seems completely
> detached from the inferior-caml buffer (meaning C-c C-e does NOT send
> commands to this new process).
>
> I asked Albert Cohen, Tuareg-mode's creator, but he didn't know much
> about Windows, and suggested I ask here.
>
> What magic Elisp incantation will shackle invocations of "ocaml" in a
> buffer, when using Cygwin emacs?  I also tried "sh -c ocaml" to no
> avail...
>
> Jeremy

Hi, Jeremy,

This sounds like either a Cygwin emacs bug or a bug in the commands Tuareg
uses to start the ocaml process that manifests only in Cygwin's emacs.
Since this is likely not a problem with ocaml itself (but rather with
either the Cygwin ocaml package or Cygwin emacs), the main Cygwin list
(<cygwin at cygwin dot com>) would be a better place to discuss it and
track down the culprit.

Unfortunately, I don't use emacs, and haven't tested the Cygwin O'Caml
package under emacs (and wouldn't know how).  Thus, another reason to move
this to the main Cygwin list, since there are many emacs experts there.

One thing that would help is following the Cygwin problem reporting
guidelines at <http://cygwin.com/problems.html> when re-posting this to
the main Cygwin list (particularly attaching the output of "cygcheck
-svr").

See you on the Cygwin list, :-)

Igor Peshansky, the Cygwin O'Caml volunteer maintainer
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-20 16:25 ` [Caml-list] " Igor Peshansky
@ 2006-02-20 17:08   ` Matthieu Dubuget
  2006-02-20 17:19     ` Igor Peshansky
  0 siblings, 1 reply; 10+ messages in thread
From: Matthieu Dubuget @ 2006-02-20 17:08 UTC (permalink / raw)
  To: caml-list

Igor Peshansky a écrit :
> On Sun, 19 Feb 2006, Jeremy Shute wrote:
>
>   
>> Hi,
>>
>> When I fire up Tuareg mode under native Windows emacs and run an
>> inferior-caml, I get what I expect (Caml running in an emacs buffer).
>> When I do so with Cygwin's Emacs, I get an empty buffer and a process
>> "ocamlrun.exe" dressed in new window trim, which seems completely
>> detached from the inferior-caml buffer (meaning C-c C-e does NOT send
>> commands to this new process).
>>
>> I asked Albert Cohen, Tuareg-mode's creator, but he didn't know much
>> about Windows, and suggested I ask here.
>>
>> What magic Elisp incantation will shackle invocations of "ocaml" in a
>> buffer, when using Cygwin emacs?  I also tried "sh -c ocaml" to no
>> avail...
>>
>> Jeremy
>>     
>
> Hi, Jeremy,
>
> This sounds like either a Cygwin emacs bug or a bug in the commands Tuareg
> uses to start the ocaml process that manifests only in Cygwin's emacs.
> Since this is likely not a problem with ocaml itself (but rather with
> either the Cygwin ocaml package or Cygwin emacs), the main Cygwin list
> (<cygwin at cygwin dot com>) would be a better place to discuss it and
> track down the culprit.
>
> Unfortunately, I don't use emacs, and haven't tested the Cygwin O'Caml
> package under emacs (and wouldn't know how).  Thus, another reason to move
> this to the main Cygwin list, since there are many emacs experts there.
>
> One thing that would help is following the Cygwin problem reporting
> guidelines at <http://cygwin.com/problems.html> when re-posting this to
> the main Cygwin list (particularly attaching the output of "cygcheck
> -svr").
>
> See you on the Cygwin list, :-)
>
> Igor Peshansky, the Cygwin O'Caml volunteer maintainer
>   
Last time I had a similar problem, I discovered that recompiling the
ocaml toplevel was solving the problem.

Maybe this will work for you ?

Salutations

Matthieu


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-20 17:08   ` Matthieu Dubuget
@ 2006-02-20 17:19     ` Igor Peshansky
  2006-02-20 19:10       ` Matthieu Dubuget
  0 siblings, 1 reply; 10+ messages in thread
From: Igor Peshansky @ 2006-02-20 17:19 UTC (permalink / raw)
  To: Matthieu Dubuget; +Cc: caml-list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2914 bytes --]

On Mon, 20 Feb 2006, Matthieu Dubuget wrote:

> Igor Peshansky a écrit :
> > On Sun, 19 Feb 2006, Jeremy Shute wrote:
> >
> >> Hi,
> >>
> >> When I fire up Tuareg mode under native Windows emacs and run an
> >> inferior-caml, I get what I expect (Caml running in an emacs buffer).
> >> When I do so with Cygwin's Emacs, I get an empty buffer and a process
> >> "ocamlrun.exe" dressed in new window trim, which seems completely
> >> detached from the inferior-caml buffer (meaning C-c C-e does NOT send
> >> commands to this new process).
> >>
> >> I asked Albert Cohen, Tuareg-mode's creator, but he didn't know much
> >> about Windows, and suggested I ask here.
> >>
> >> What magic Elisp incantation will shackle invocations of "ocaml" in a
> >> buffer, when using Cygwin emacs?  I also tried "sh -c ocaml" to no
> >> avail...
> >>
> >> Jeremy
> >
> > Hi, Jeremy,
> >
> > This sounds like either a Cygwin emacs bug or a bug in the commands
> > Tuareg uses to start the ocaml process that manifests only in Cygwin's
> > emacs. Since this is likely not a problem with ocaml itself (but
> > rather with either the Cygwin ocaml package or Cygwin emacs), the main
> > Cygwin list (<cygwin at cygwin dot com>) would be a better place to
> > discuss it and track down the culprit.
> >
> > Unfortunately, I don't use emacs, and haven't tested the Cygwin O'Caml
> > package under emacs (and wouldn't know how).  Thus, another reason to
> > move this to the main Cygwin list, since there are many emacs experts
> > there.
> >
> > One thing that would help is following the Cygwin problem reporting
> > guidelines at <http://cygwin.com/problems.html> when re-posting this
> > to the main Cygwin list (particularly attaching the output of
> > "cygcheck -svr").
> >
> > See you on the Cygwin list, :-)
> >
> > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
>
> Last time I had a similar problem, I discovered that recompiling the
> ocaml toplevel was solving the problem.
>
> Maybe this will work for you ?

Hmm, indeed.  Though don't forget, Matthieu, that Cygwin is still at
version 3.08.1...

Jeremy, if recompiling works for you, please let me know, and I'll release
a rebuit version of ocaml for Cygwin.  You can download the ocaml source
package using Cygwin setup and run the packaging script to build (use the
"--help" option for a list of possible steps).

Igor Peshansky, the Cygwin O'Caml volunteer maintainer
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-20 17:19     ` Igor Peshansky
@ 2006-02-20 19:10       ` Matthieu Dubuget
  2006-02-20 22:38         ` Igor Peshansky
  0 siblings, 1 reply; 10+ messages in thread
From: Matthieu Dubuget @ 2006-02-20 19:10 UTC (permalink / raw)
  To: caml-list

Igor Peshansky a écrit :

>On Mon, 20 Feb 2006, Matthieu Dubuget wrote:
>
>  
>
>>Igor Peshansky a écrit :
>>    
>>
>>>On Sun, 19 Feb 2006, Jeremy Shute wrote:
>>>
>>>      
>>>
>>>>Hi,
>>>>
>>>>When I fire up Tuareg mode under native Windows emacs and run an
>>>>inferior-caml, I get what I expect (Caml running in an emacs buffer).
>>>>When I do so with Cygwin's Emacs, I get an empty buffer and a process
>>>>"ocamlrun.exe" dressed in new window trim, which seems completely
>>>>detached from the inferior-caml buffer (meaning C-c C-e does NOT send
>>>>commands to this new process).
>>>>
>>>>I asked Albert Cohen, Tuareg-mode's creator, but he didn't know much
>>>>about Windows, and suggested I ask here.
>>>>
>>>>What magic Elisp incantation will shackle invocations of "ocaml" in a
>>>>buffer, when using Cygwin emacs?  I also tried "sh -c ocaml" to no
>>>>avail...
>>>>
>>>>Jeremy
>>>>        
>>>>
>>>Hi, Jeremy,
>>>
>>>This sounds like either a Cygwin emacs bug or a bug in the commands
>>>Tuareg uses to start the ocaml process that manifests only in Cygwin's
>>>emacs. Since this is likely not a problem with ocaml itself (but
>>>rather with either the Cygwin ocaml package or Cygwin emacs), the main
>>>Cygwin list (<cygwin at cygwin dot com>) would be a better place to
>>>discuss it and track down the culprit.
>>>
>>>Unfortunately, I don't use emacs, and haven't tested the Cygwin O'Caml
>>>package under emacs (and wouldn't know how).  Thus, another reason to
>>>move this to the main Cygwin list, since there are many emacs experts
>>>there.
>>>
>>>One thing that would help is following the Cygwin problem reporting
>>>guidelines at <http://cygwin.com/problems.html> when re-posting this
>>>to the main Cygwin list (particularly attaching the output of
>>>"cygcheck -svr").
>>>
>>>See you on the Cygwin list, :-)
>>>
>>>Igor Peshansky, the Cygwin O'Caml volunteer maintainer
>>>      
>>>
>>Last time I had a similar problem, I discovered that recompiling the
>>ocaml toplevel was solving the problem.
>>
>>Maybe this will work for you ?
>>    
>>
>
>Hmm, indeed.  Though don't forget, Matthieu, that Cygwin is still at
>version 3.08.1...
>
>Jeremy, if recompiling works for you, please let me know, and I'll release
>a rebuit version of ocaml for Cygwin.  You can download the ocaml source
>package using Cygwin setup and run the packaging script to build (use the
>"--help" option for a list of possible steps).
>
>Igor Peshansky, the Cygwin O'Caml volunteer maintainer
>  
>
I would have describe my problem the same way as Jeremy.
I do use one standard native distribution of Ocaml, and cygwin version 
of emacs.
I did not used the right term though: I did not meant re-compiling the 
toplevel. Just creating a new one with
ocamlmktop -custom ...

Salutations

Matthieu


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-20 19:10       ` Matthieu Dubuget
@ 2006-02-20 22:38         ` Igor Peshansky
  2006-02-21  1:39           ` Jeremy Shute
  0 siblings, 1 reply; 10+ messages in thread
From: Igor Peshansky @ 2006-02-20 22:38 UTC (permalink / raw)
  To: matthieu.dubuget; +Cc: caml-list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 4234 bytes --]

On Mon, 20 Feb 2006, Matthieu Dubuget wrote:

> Igor Peshansky a écrit :
>
> > On Mon, 20 Feb 2006, Matthieu Dubuget wrote:
> >
> > > Igor Peshansky a écrit :
> > >
> > > > On Sun, 19 Feb 2006, Jeremy Shute wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > When I fire up Tuareg mode under native Windows emacs and run an
> > > > > inferior-caml, I get what I expect (Caml running in an emacs
> > > > > buffer). When I do so with Cygwin's Emacs, I get an empty buffer
> > > > > and a process "ocamlrun.exe" dressed in new window trim, which
> > > > > seems completely detached from the inferior-caml buffer (meaning
> > > > > C-c C-e does NOT send commands to this new process).
> > > > >
> > > > > I asked Albert Cohen, Tuareg-mode's creator, but he didn't know
> > > > > much about Windows, and suggested I ask here.
> > > > >
> > > > > What magic Elisp incantation will shackle invocations of "ocaml"
> > > > > in a buffer, when using Cygwin emacs?  I also tried "sh -c
> > > > > ocaml" to no avail...
> > > > >
> > > > > Jeremy
> > > >
> > > > Hi, Jeremy,
> > > >
> > > > This sounds like either a Cygwin emacs bug or a bug in the
> > > > commands Tuareg uses to start the ocaml process that manifests
> > > > only in Cygwin's emacs. Since this is likely not a problem with
> > > > ocaml itself (but rather with either the Cygwin ocaml package or
> > > > Cygwin emacs), the main Cygwin list (<cygwin at cygwin dot com>)
> > > > would be a better place to discuss it and track down the culprit.
> > > >
> > > > Unfortunately, I don't use emacs, and haven't tested the Cygwin
> > > > O'Caml package under emacs (and wouldn't know how).  Thus, another
> > > > reason to move this to the main Cygwin list, since there are many
> > > > emacs experts there.
> > > >
> > > > One thing that would help is following the Cygwin problem
> > > > reporting guidelines at <http://cygwin.com/problems.html> when
> > > > re-posting this to the main Cygwin list (particularly attaching
> > > > the output of "cygcheck -svr").
> > > >
> > > > See you on the Cygwin list, :-)
> > > >
> > > > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
> > >
> > > Last time I had a similar problem, I discovered that recompiling the
> > > ocaml toplevel was solving the problem.
> > >
> > > Maybe this will work for you ?
> >
> > Hmm, indeed.  Though don't forget, Matthieu, that Cygwin is still at
> > version 3.08.1...
> >
> > Jeremy, if recompiling works for you, please let me know, and I'll
> > release a rebuit version of ocaml for Cygwin.  You can download the
> > ocaml source package using Cygwin setup and run the packaging script
> > to build (use the "--help" option for a list of possible steps).
> >
> > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
>
> I would have describe my problem the same way as Jeremy.
> I do use one standard native distribution of Ocaml, and cygwin version
> of emacs.
> I did not used the right term though: I did not meant re-compiling the
> toplevel. Just creating a new one with
> ocamlmktop -custom ...

Ah.  If you use a native ocaml, it may not work with Cygwin emacs, as it
won't understand the ptys that emacs uses to communicate with it (and thus
will pop up a console).  I forgot to ask Jeremy whether he uses the Cygwin
version of ocaml, or the Windows native one.  A quick test of this outside
emacs is to try using rxvt -- if your ocaml works inside that, it probably
will work inside emacs too.

I don't know why remaking the toplevel helped you (since that didn't
create a Cygwin version of it).  Rebuilding under Cygwin would most likely
help, as would installing the pre-built Cygwin ocaml package that is part
of the Cygwin distribution.

Igor Peshansky, Cygwin O'Caml volunteer maintainer
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-20 22:38         ` Igor Peshansky
@ 2006-02-21  1:39           ` Jeremy Shute
  2006-02-21  2:31             ` Igor Peshansky
  0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Shute @ 2006-02-21  1:39 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 6009 bytes --]

I do use the native O'Caml and Cygwin Emacs.  I do this because MinGW Caml
seems to be using "ar" instructions that are meant for the Cygwin version of
"ar" (meaning they have an ampersand preceding the DOS path of the temporary
file, which MinGW's "ar" doesn't understand).

It looks to me as if MinGW Caml is actually built with Cygwin, using "gcc
-mno-cygwin".  Maybe I'm mistaken?  So, I use MinGW Caml with Cygwin.

Apparently, there is an issue in the ptys.  I would say that's an apt
description.  I'll have to try the "ocamlmktop -custom".

I really don't want to use a Cygwin version of Caml.  I don't like it when
projects (Cygwin, Berkeley DB) tell me that I have to license my source code
a certain way when I link to their libraries.  I aknowledge and respect
their wishes, but I'm also free not to use those projects (and therefore,
not to contribute my bugfixes and experience to their product).  I'm happy
to use the shell and the tools, but I want my binaries to be unmistakenly
mine.

Jeremy



On 2/20/06, Igor Peshansky <pechtcha@cs.nyu.edu> wrote:
>
> On Mon, 20 Feb 2006, Matthieu Dubuget wrote:
>
> > Igor Peshansky a écrit :
> >
> > > On Mon, 20 Feb 2006, Matthieu Dubuget wrote:
> > >
> > > > Igor Peshansky a écrit :
> > > >
> > > > > On Sun, 19 Feb 2006, Jeremy Shute wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > When I fire up Tuareg mode under native Windows emacs and run an
> > > > > > inferior-caml, I get what I expect (Caml running in an emacs
> > > > > > buffer). When I do so with Cygwin's Emacs, I get an empty buffer
> > > > > > and a process "ocamlrun.exe" dressed in new window trim, which
> > > > > > seems completely detached from the inferior-caml buffer (meaning
> > > > > > C-c C-e does NOT send commands to this new process).
> > > > > >
> > > > > > I asked Albert Cohen, Tuareg-mode's creator, but he didn't know
> > > > > > much about Windows, and suggested I ask here.
> > > > > >
> > > > > > What magic Elisp incantation will shackle invocations of "ocaml"
> > > > > > in a buffer, when using Cygwin emacs?  I also tried "sh -c
> > > > > > ocaml" to no avail...
> > > > > >
> > > > > > Jeremy
> > > > >
> > > > > Hi, Jeremy,
> > > > >
> > > > > This sounds like either a Cygwin emacs bug or a bug in the
> > > > > commands Tuareg uses to start the ocaml process that manifests
> > > > > only in Cygwin's emacs. Since this is likely not a problem with
> > > > > ocaml itself (but rather with either the Cygwin ocaml package or
> > > > > Cygwin emacs), the main Cygwin list (<cygwin at cygwin dot com>)
> > > > > would be a better place to discuss it and track down the culprit.
> > > > >
> > > > > Unfortunately, I don't use emacs, and haven't tested the Cygwin
> > > > > O'Caml package under emacs (and wouldn't know how).  Thus, another
> > > > > reason to move this to the main Cygwin list, since there are many
> > > > > emacs experts there.
> > > > >
> > > > > One thing that would help is following the Cygwin problem
> > > > > reporting guidelines at <http://cygwin.com/problems.html> when
> > > > > re-posting this to the main Cygwin list (particularly attaching
> > > > > the output of "cygcheck -svr").
> > > > >
> > > > > See you on the Cygwin list, :-)
> > > > >
> > > > > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
> > > >
> > > > Last time I had a similar problem, I discovered that recompiling the
> > > > ocaml toplevel was solving the problem.
> > > >
> > > > Maybe this will work for you ?
> > >
> > > Hmm, indeed.  Though don't forget, Matthieu, that Cygwin is still at
> > > version 3.08.1...
> > >
> > > Jeremy, if recompiling works for you, please let me know, and I'll
> > > release a rebuit version of ocaml for Cygwin.  You can download the
> > > ocaml source package using Cygwin setup and run the packaging script
> > > to build (use the "--help" option for a list of possible steps).
> > >
> > > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
> >
> > I would have describe my problem the same way as Jeremy.
> > I do use one standard native distribution of Ocaml, and cygwin version
> > of emacs.
> > I did not used the right term though: I did not meant re-compiling the
> > toplevel. Just creating a new one with
> > ocamlmktop -custom ...
>
> Ah.  If you use a native ocaml, it may not work with Cygwin emacs, as it
> won't understand the ptys that emacs uses to communicate with it (and thus
> will pop up a console).  I forgot to ask Jeremy whether he uses the Cygwin
> version of ocaml, or the Windows native one.  A quick test of this outside
> emacs is to try using rxvt -- if your ocaml works inside that, it probably
> will work inside emacs too.
>
> I don't know why remaking the toplevel helped you (since that didn't
> create a Cygwin version of it).  Rebuilding under Cygwin would most likely
> help, as would installing the pre-built Cygwin ocaml package that is part
> of the Cygwin distribution.
>
> Igor Peshansky, Cygwin O'Caml volunteer maintainer
> --
>                                 http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_            pechtcha@cs.nyu.edu |
> igor@watson.ibm.com
> ZZZzz /,`.-'`'    -.  ;-;;,_            Igor Peshansky, Ph.D. (name
> changed!)
>      |,4-  ) )-,_. ,\ (  `'-'           old name: Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
>
> "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends
> compte."
> "But no -- you are no fool; you call yourself a fool, there's proof enough
> in
> that!" -- Rostand, "Cyrano de Bergerac"
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>

[-- Attachment #2: Type: text/html, Size: 8224 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-21  1:39           ` Jeremy Shute
@ 2006-02-21  2:31             ` Igor Peshansky
  2006-02-21  2:55               ` Jeremy Shute
  0 siblings, 1 reply; 10+ messages in thread
From: Igor Peshansky @ 2006-02-21  2:31 UTC (permalink / raw)
  To: Jeremy Shute; +Cc: caml-list

[-- Attachment #1: Type: TEXT/Plain, Size: 8203 bytes --]

Ugh, top-posting (and TOFU)...  Reformatted.

On Mon, 20 Feb 2006, Jeremy Shute wrote:

> On 2/20/06, Igor Peshansky <pechtcha@XX.XXX.XXX> wrote:
> >
> > On Mon, 20 Feb 2006, Matthieu Dubuget wrote:
> >
> > > Igor Peshansky a écrit :
> > >
> > > > On Mon, 20 Feb 2006, Matthieu Dubuget wrote:
> > > >
> > > > > Igor Peshansky a écrit :
> > > > >
> > > > > > On Sun, 19 Feb 2006, Jeremy Shute wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > When I fire up Tuareg mode under native Windows emacs and run an
> > > > > > > inferior-caml, I get what I expect (Caml running in an emacs
> > > > > > > buffer). When I do so with Cygwin's Emacs, I get an empty buffer
> > > > > > > and a process "ocamlrun.exe" dressed in new window trim, which
> > > > > > > seems completely detached from the inferior-caml buffer (meaning
> > > > > > > C-c C-e does NOT send commands to this new process).
> > > > > > >
> > > > > > > I asked Albert Cohen, Tuareg-mode's creator, but he didn't know
> > > > > > > much about Windows, and suggested I ask here.
> > > > > > >
> > > > > > > What magic Elisp incantation will shackle invocations of "ocaml"
> > > > > > > in a buffer, when using Cygwin emacs?  I also tried "sh -c
> > > > > > > ocaml" to no avail...
> > > > > > >
> > > > > > > Jeremy
> > > > > >
> > > > > > Hi, Jeremy,
> > > > > >
> > > > > > This sounds like either a Cygwin emacs bug or a bug in the
> > > > > > commands Tuareg uses to start the ocaml process that manifests
> > > > > > only in Cygwin's emacs. Since this is likely not a problem with
> > > > > > ocaml itself (but rather with either the Cygwin ocaml package or
> > > > > > Cygwin emacs), the main Cygwin list (<cygwin at cygwin dot com>)
> > > > > > would be a better place to discuss it and track down the culprit.
> > > > > >
> > > > > > Unfortunately, I don't use emacs, and haven't tested the Cygwin
> > > > > > O'Caml package under emacs (and wouldn't know how).  Thus, another
> > > > > > reason to move this to the main Cygwin list, since there are many
> > > > > > emacs experts there.
> > > > > >
> > > > > > One thing that would help is following the Cygwin problem
> > > > > > reporting guidelines at <http://cygwin.com/problems.html> when
> > > > > > re-posting this to the main Cygwin list (particularly attaching
> > > > > > the output of "cygcheck -svr").
> > > > > >
> > > > > > See you on the Cygwin list, :-)
> > > > > >
> > > > > > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
> > > > >
> > > > > Last time I had a similar problem, I discovered that recompiling the
> > > > > ocaml toplevel was solving the problem.
> > > > >
> > > > > Maybe this will work for you ?
> > > >
> > > > Hmm, indeed.  Though don't forget, Matthieu, that Cygwin is still at
> > > > version 3.08.1...
> > > >
> > > > Jeremy, if recompiling works for you, please let me know, and I'll
> > > > release a rebuit version of ocaml for Cygwin.  You can download the
> > > > ocaml source package using Cygwin setup and run the packaging script
> > > > to build (use the "--help" option for a list of possible steps).
> > > >
> > > > Igor Peshansky, the Cygwin O'Caml volunteer maintainer
> > >
> > > I would have describe my problem the same way as Jeremy.
> > > I do use one standard native distribution of Ocaml, and cygwin version
> > > of emacs.
> > > I did not used the right term though: I did not meant re-compiling the
> > > toplevel. Just creating a new one with
> > > ocamlmktop -custom ...
> >
> > Ah.  If you use a native ocaml, it may not work with Cygwin emacs, as it
> > won't understand the ptys that emacs uses to communicate with it (and thus
> > will pop up a console).  I forgot to ask Jeremy whether he uses the Cygwin
> > version of ocaml, or the Windows native one.  A quick test of this outside
> > emacs is to try using rxvt -- if your ocaml works inside that, it probably
> > will work inside emacs too.
> >
> > I don't know why remaking the toplevel helped you (since that didn't
> > create a Cygwin version of it).  Rebuilding under Cygwin would most likely
> > help, as would installing the pre-built Cygwin ocaml package that is part
> > of the Cygwin distribution.
> >
> > Igor Peshansky, Cygwin O'Caml volunteer maintainer
>
> I do use the native O'Caml and Cygwin Emacs.

Ok, so that confirms it.

> I do this because MinGW Caml seems to be using "ar" instructions that
> are meant for the Cygwin version of "ar" (meaning they have an ampersand
> preceding the DOS path of the temporary file, which MinGW's "ar" doesn't
> understand).

Huh?  Neither does Cygwin's ar, AFAIK.  Something may be screwed up with
the MinGW build.

> It looks to me as if MinGW Caml is actually built with Cygwin, using
> "gcc -mno-cygwin".  Maybe I'm mistaken?  So, I use MinGW Caml with
> Cygwin.

"gcc -mno-cygwin" is a MinGW cross-compiler.  It does not produce Cygwin
binaries, it does not use Cygwin headers.  It's the same as the MinGW
compiler, except for the little detail of understanding Cygwin paths to
source and library files.  There is no difference between the binaries
produced by Cygwin's "gcc -mno-cygwin" and MinGW's gcc.

That aside, I'm confused.  Didn't you just say that you use a native
O'Caml build because the MinGW one is broken?

> Apparently, there is an issue in the ptys.  I would say that's an apt
> description.  I'll have to try the "ocamlmktop -custom".

Can you first try to run your version of ocaml in Cygwin's rxvt and let me
know if you observe the same problematic behavior?

> I really don't want to use a Cygwin version of Caml.  I don't like it
> when projects (Cygwin, Berkeley DB) tell me that I have to license my
> source code a certain way when I link to their libraries.

AFAIK, Cygwin does not impose any restrictions on the O'Caml bytecode
beyond what the O'Caml license has (unless you use native code, in which
case you do link with Cygwin).  Otherwise, Cygwin simply provides the
toolset, and the O'Caml code is yours.  And even in that case, you simply
cannot distribute the *Cygwin* versions of your binaries without
open-sourcing them (since they'd need the Cygwin DLLs to work).  And even
that can be worked around, AFAIK, by using the Red Hat buyout license.

If there's sufficient interest in helping me add a "-mno-cygwin"-like
option to Cygwin's ocaml (so that it produces MinGW binaries using "gcc
-mno-cygwin"), that would be another alternative for you.

> I aknowledge and respect their wishes, but I'm also free not to use
> those projects (and therefore, not to contribute my bugfixes and
> experience to their product).

Indeed.

> I'm happy to use the shell and the tools, but I want my binaries to be
> unmistakenly mine.

Well, I'm sorry to say that it is unlikely that Cygwin emacs will ever
work seamlessly with native Windows binaries (e.g., those that spawn a
console unless they detect one -- like ocaml -- since the whole point of
inferior mode in emacs, as I understand it, is to work without a console).
By mixing and matching various tools not designed to work together, you
are bound to run into incompatibilities -- this is one of them.

Since this isn't a problem with the Cygwin version of O'Caml (and, FWIW,
you're likely to have the same problem with most Windows console
applications), I'd suggest either requesting this as a Cygwin emacs
feature (on the main Cygwin list) or using a non-Cygwin version of emacs.
At the very least, you'll find a lot more expertise on the main Cygwin
list on how to make Cygwin emacs work with Windows native programs than
you'll find here.

If you plan to post there, what I said earlier about the problem reporting
guidelines still applies.

HTH,
Igor Peshansky, Cygwin O'Caml volunteer maintainer
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-21  2:31             ` Igor Peshansky
@ 2006-02-21  2:55               ` Jeremy Shute
  2006-02-21 14:38                 ` Igor Peshansky
  0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Shute @ 2006-02-21  2:55 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 5382 bytes --]

> Ok, so that confirms it.
>
> > I do this because MinGW Caml seems to be using "ar" instructions that
> > are meant for the Cygwin version of "ar" (meaning they have an ampersand
> > preceding the DOS path of the temporary file, which MinGW's "ar" doesn't
> > understand).
>
> Huh?  Neither does Cygwin's ar, AFAIK.  Something may be screwed up with
> the MinGW build.


ocamlopt -a



> It looks to me as if MinGW Caml is actually built with Cygwin, using
> > "gcc -mno-cygwin".  Maybe I'm mistaken?  So, I use MinGW Caml with
> > Cygwin.
>
> "gcc -mno-cygwin" is a MinGW cross-compiler.  It does not produce Cygwin
> binaries, it does not use Cygwin headers.


Yeah, I know.



It's the same as the MinGW
> compiler, except for the little detail of understanding Cygwin paths to
> source and library files.  There is no difference between the binaries
> produced by Cygwin's "gcc -mno-cygwin" and MinGW's gcc.


Actually, there is a difference, but it's very minute.  The headers are the
same but the compiler structure is different, as far as I remember.  A hint
as to why that might be:

x=`which gcc` pushd `dirname "$x"` && nm gcc.exe | grep cygwin && popd



That aside, I'm confused.  Didn't you just say that you use a native
> O'Caml build because the MinGW one is broken?


I use the MinGW build from the Cygwin terminal.



> Apparently, there is an issue in the ptys.  I would say that's an apt
> > description.  I'll have to try the "ocamlmktop -custom".
>
> Can you first try to run your version of ocaml in Cygwin's rxvt and let me
> know if you observe the same problematic behavior?


No, the problem is not present in rxvt.  Caml pops up as usual.  However,
C-c in the process will ruin your rxvt, meaning it will escape to the shell
but be generally unresponsive to keyboard events AND you can't close the
window with the close button in the upper-right.  Which I consider a
problem.  C-c is ingrained (it's like C-w closing my windows, another PITA).



> I really don't want to use a Cygwin version of Caml.  I don't like it
> > when projects (Cygwin, Berkeley DB) tell me that I have to license my
> > source code a certain way when I link to their libraries.
>
> AFAIK, Cygwin does not impose any restrictions on the O'Caml bytecode
> beyond what the O'Caml license has (unless you use native code, in which
> case you do link with Cygwin).


Hmmm, interesting.  So, O'Caml compiled binaries from Cygwin's O'Caml do not
use the cygwin DLL for their libc functions?



 Otherwise, Cygwin simply provides the
> toolset, and the O'Caml code is yours.  And even in that case, you simply
> cannot distribute the *Cygwin* versions of your binaries without
> open-sourcing them (since they'd need the Cygwin DLLs to work).  And even
> that can be worked around, AFAIK, by using the Red Hat buyout license.


This "Red Hat buyout license" is news to me, even though I know Redhat
bought out Cygwin quite some time ago.  I know what is currently said at:

http://www.cygwin.com/licensing.html

...could be paraphrased, "Buy the rights to distribute the cygwin1.dll or
open your source to everyone you distribute your binaries to."  Which means
I don't want to link against it, which in turn means that I don't want to
develop under that environment and deal with porting incompatible features
should I ever want to incorporate my library code in a distributed binary.



If there's sufficient interest in helping me add a "-mno-cygwin"-like
> option to Cygwin's ocaml (so that it produces MinGW binaries using "gcc
> -mno-cygwin"), that would be another alternative for you.


Yes, there is interest.  Actually, I think the best option is to just fix
the problem with the MinGW ar, such that ``ocamlopt -a'' does not barf on
the temporary filenames.



> I aknowledge and respect their wishes, but I'm also free not to use
> > those projects (and therefore, not to contribute my bugfixes and
> > experience to their product).
>
> Indeed.
>
> > I'm happy to use the shell and the tools, but I want my binaries to be
> > unmistakenly mine.
>
> Well, I'm sorry to say that it is unlikely that Cygwin emacs will ever
> work seamlessly with native Windows binaries (e.g., those that spawn a
> console unless they detect one -- like ocaml -- since the whole point of
> inferior mode in emacs, as I understand it, is to work without a console).
> By mixing and matching various tools not designed to work together, you
> are bound to run into incompatibilities -- this is one of them.


Yes, I was wondering if perhaps there was a terminal incantation that would
work.  I did try ``sh -c ocaml'' with no success.



Since this isn't a problem with the Cygwin version of O'Caml (and, FWIW,
> you're likely to have the same problem with most Windows console
> applications), I'd suggest either requesting this as a Cygwin emacs
> feature (on the main Cygwin list) or using a non-Cygwin version of emacs.
> At the very least, you'll find a lot more expertise on the main Cygwin
> list on how to make Cygwin emacs work with Windows native programs than
> you'll find here.


Yes, yes.  Will do.



If you plan to post there, what I said earlier about the problem reporting
> guidelines still applies.


Thank you!



Jeremy

[-- Attachment #2: Type: text/html, Size: 7638 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Caml-list] Tuareg mode under Cygwin...
  2006-02-21  2:55               ` Jeremy Shute
@ 2006-02-21 14:38                 ` Igor Peshansky
  0 siblings, 0 replies; 10+ messages in thread
From: Igor Peshansky @ 2006-02-21 14:38 UTC (permalink / raw)
  To: Jeremy Shute; +Cc: caml-list

On Mon, 20 Feb 2006, Jeremy Shute wrote:

> > Ok, so that confirms it.
> >
> > > I do this because MinGW Caml seems to be using "ar" instructions that
> > > are meant for the Cygwin version of "ar" (meaning they have an ampersand
> > > preceding the DOS path of the temporary file, which MinGW's "ar" doesn't
> > > understand).
> >
> > Huh?  Neither does Cygwin's ar, AFAIK.  Something may be screwed up with
> > the MinGW build.
>
> ocamlopt -a

I wasn't disputing that MinGW's ocamlopt produces these instructions, I
was saying they are not meant for Cygwin's ar (as Cygwin's "ocamlopt -a
-verbose" will show).

> > It looks to me as if MinGW Caml is actually built with Cygwin, using
> > > "gcc -mno-cygwin".  Maybe I'm mistaken?  So, I use MinGW Caml with
> > > Cygwin.
> >
> > "gcc -mno-cygwin" is a MinGW cross-compiler.  It does not produce Cygwin
> > binaries, it does not use Cygwin headers.
>
> Yeah, I know.
>
> > It's the same as the MinGW compiler, except for the little detail of
> > understanding Cygwin paths to source and library files.  There is no
> > difference between the binaries produced by Cygwin's "gcc -mno-cygwin"
> > and MinGW's gcc.
>
> Actually, there is a difference, but it's very minute.  The headers are
> the same but the compiler structure is different, as far as I remember.
> A hint as to why that might be:
>
> x=`which gcc` pushd `dirname "$x"` && nm gcc.exe | grep cygwin && popd

Well, obviously the Cygwin gcc will need to use Cygwin functionality under
the covers -- it's a *cross*-compiler, after all, with host=cygwin.  But
the MinGW binaries produced with the -mno-cygwin flag should be the same.

> > That aside, I'm confused.  Didn't you just say that you use a native
> > O'Caml build because the MinGW one is broken?
>
> I use the MinGW build from the Cygwin terminal.

Ok.

> > > Apparently, there is an issue in the ptys.  I would say that's an
> > > apt description.  I'll have to try the "ocamlmktop -custom".
> >
> > Can you first try to run your version of ocaml in Cygwin's rxvt and
> > let me know if you observe the same problematic behavior?
>
> No, the problem is not present in rxvt.  Caml pops up as usual.

Then there's a problem with Cygwin emacs.

> However, C-c in the process will ruin your rxvt, meaning it will escape
> to the shell but be generally unresponsive to keyboard events AND you
> can't close the window with the close button in the upper-right.  Which
> I consider a problem.  C-c is ingrained (it's like C-w closing my
> windows, another PITA).

Again, something that should be reported to the Cygwin list so that it can
be fixed.  FWIW, that may actually be related to Cygwin's signal handling
code, which got a major work-over recently.  See if a developer snapshot
of Cygwin fixes your rxvt problem...  I suspect this is getting off-topic
for this list.

> > I really don't want to use a Cygwin version of Caml.  I don't like it
> > > when projects (Cygwin, Berkeley DB) tell me that I have to license
> > > my source code a certain way when I link to their libraries.
> >
> > AFAIK, Cygwin does not impose any restrictions on the O'Caml bytecode
> > beyond what the O'Caml license has (unless you use native code, in
> > which case you do link with Cygwin).
>
> Hmmm, interesting.  So, O'Caml compiled binaries from Cygwin's O'Caml do
> not use the cygwin DLL for their libc functions?

The binaries do.  The bytecode doesn't (what the interpreter uses doesn't
count).

> > Otherwise, Cygwin simply provides the toolset, and the O'Caml code is
> > yours.  And even in that case, you simply cannot distribute the
> > *Cygwin* versions of your binaries without open-sourcing them (since
> > they'd need the Cygwin DLLs to work).  And even that can be worked
> > around, AFAIK, by using the Red Hat buyout license.
>
> This "Red Hat buyout license" is news to me, even though I know Redhat
> bought out Cygwin quite some time ago.  I know what is currently said
> at:
>
> http://www.cygwin.com/licensing.html
>
> ...could be paraphrased, "Buy the rights to distribute the cygwin1.dll
> or open your source to everyone you distribute your binaries to."
> Which means I don't want to link against it, which in turn means that I
> don't want to develop under that environment and deal with porting
> incompatible features should I ever want to incorporate my library code
> in a distributed binary.

Fair enough.

> > If there's sufficient interest in helping me add a "-mno-cygwin"-like
> > option to Cygwin's ocaml (so that it produces MinGW binaries using
> > "gcc -mno-cygwin"), that would be another alternative for you.
>
> Yes, there is interest.  Actually, I think the best option is to just
> fix the problem with the MinGW ar, such that ``ocamlopt -a'' does not
> barf on the temporary filenames.

Well, I'm not working on the MinGW version, but I do maintain the Cygwin
O'Caml version.  If you are willing to build from source and find all the
places where invocations of "gcc" by ocaml tools need to be replaced by
"gcc -mno-cygwin", that would be very helpful.

> > > I aknowledge and respect their wishes, but I'm also free not to use
> > > those projects (and therefore, not to contribute my bugfixes and
> > > experience to their product).
> >
> > Indeed.
> >
> > > I'm happy to use the shell and the tools, but I want my binaries to
> > > be unmistakenly mine.
> >
> > Well, I'm sorry to say that it is unlikely that Cygwin emacs will ever
> > work seamlessly with native Windows binaries (e.g., those that spawn a
> > console unless they detect one -- like ocaml -- since the whole point
> > of inferior mode in emacs, as I understand it, is to work without a
> > console). By mixing and matching various tools not designed to work
> > together, you are bound to run into incompatibilities -- this is one
> > of them.
>
> Yes, I was wondering if perhaps there was a terminal incantation that would
> work.  I did try ``sh -c ocaml'' with no success.

Again, I don't use emacs and won't be able to help you here.

> > Since this isn't a problem with the Cygwin version of O'Caml (and,
> > FWIW, you're likely to have the same problem with most Windows console
> > applications), I'd suggest either requesting this as a Cygwin emacs
> > feature (on the main Cygwin list) or using a non-Cygwin version of
> > emacs. At the very least, you'll find a lot more expertise on the main
> > Cygwin list on how to make Cygwin emacs work with Windows native
> > programs than you'll find here.
>
> Yes, yes.  Will do.
>
> > If you plan to post there, what I said earlier about the problem
> > reporting guidelines still applies.
>
> Thank you!

Glad I could help.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-02-21 14:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-19 15:46 Tuareg mode under Cygwin Jeremy Shute
2006-02-20 16:25 ` [Caml-list] " Igor Peshansky
2006-02-20 17:08   ` Matthieu Dubuget
2006-02-20 17:19     ` Igor Peshansky
2006-02-20 19:10       ` Matthieu Dubuget
2006-02-20 22:38         ` Igor Peshansky
2006-02-21  1:39           ` Jeremy Shute
2006-02-21  2:31             ` Igor Peshansky
2006-02-21  2:55               ` Jeremy Shute
2006-02-21 14:38                 ` Igor Peshansky

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 NNTP newsgroup(s).