public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Readline not working correctly with cygwin1.dll in same directory
@ 2022-06-05 14:17 Mexis, Nico
  2022-06-05 15:04 ` Takashi Yano
  0 siblings, 1 reply; 5+ messages in thread
From: Mexis, Nico @ 2022-06-05 14:17 UTC (permalink / raw)
  To: cygwin

> On Fri, 3 Jun 2022 18:37:29 +0000

> "Mexis, Nico" wrote:
> > Dear CygWin team,
> >
> > this is my first bug report and I hope I have chosen the right recipients here.
> > I am very sorry if this is the wrong address.
> >
> > Here is my bug report:
> > Currently, I am trying to compile a software for commutative algebra, namely CoCoA 5, using CygWin.
> > The compilation itself is working correctly and finishes as expected.
> > CoCoA 5 uses readline in order to facilitate inputs from the console.
> > When starting the resulting executable within CygWin bash, readline and all of its features work correctly.
> > Also, as long as CygWin's DLLs are within Windows's PATH, in the default (and new) Windows Terminal, everything is working fine.
> > However, when trying to create a distributable zip file with all the libraries included, something strange happens:
> > In order to allow users without a CygWin installation to start CoCoA 5, all the required DLLs need to be distributed together with the application itself.
> > All the required libraries could be found using DependencyWalker and cygcheck.
> > Of course, as expected, cygwin1.dll is one of the required DLLs.
> > As soon as I place cygwin1.dll in the installation directory where CoCoA 5's executable resides, readline support breaks.
> > For some reason, the input line behaves very strangely, e.g., backspace and the arrow keys are not working correctly.
> > All of the other DLLs (including cygreadline7.dll) can reside in the installation directory without causing trouble.
> > But as soon as cygwin1.dll is also added in the installation directory, this bug reappears.
> >
> > Another strange observation:
> > This problem does not seem to only affect CoCoA 5, but also many other similar applications like PARI/GP.
> > As soon as cygwin1.dll is copied into the same directory as the application's exe, this strange bug appears.
> >
> > Sadly, I do not know about a fix yet since cygwin1.dll is needed for all users without a local CygWin installation.
> > But - in turn - adding cygwin1.dll causes this bug which makes the console application very uncomfortable to use.
> >
> > I would be very happy if you know a fix for this strange issue since I could not find something similar online.
> > Best regards and thank you very much in advance,
>
> If the program depends on cygncurses*.dll, it also needs
> /usr/share/terminfo.
>
> It should be placed in the relative path ../usr/share/terminfo
> from the directory where cygwin1.dll exists.
>
> --
> Takashi Yano <takashi.yano@nifty.ne.jp>


Dear Takashi,


thank you very much for this information!

At first, I had trouble getting your approach to work.

CoCoA 5.4.0 needs to be installed exactly in C:\cocoa-5.4 and I made a symlink to overcome this restriction.

Thus, I needed to place the terminfo folder relative to the actual installation folder and not in C:\usr\share.

Now, everything seems to work fine. Thank you very much!

However, I still have one follow-up question about this:

Is there a way to get rid of the need for the terminfo folder or change its location?

It would be ideal to not need to include it in the distribution at all or such that it will be in the same folder as cygwin1.dll.


Again, thank you very much in advance and

Best regards,
Nico Mexis

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

* Re: Readline not working correctly with cygwin1.dll in same directory
  2022-06-05 14:17 Readline not working correctly with cygwin1.dll in same directory Mexis, Nico
@ 2022-06-05 15:04 ` Takashi Yano
  2022-06-05 16:38   ` Eliot Moss
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Yano @ 2022-06-05 15:04 UTC (permalink / raw)
  To: cygwin

On Sun, 5 Jun 2022 14:17:27 +0000
"Mexis, Nico" wrote:
> However, I still have one follow-up question about this:
> 
> Is there a way to get rid of the need for the terminfo folder or change its location?
> 
> It would be ideal to not need to include it in the distribution at all or such that it will be in the same folder as cygwin1.dll.

If environment variable TERMINFO is set, cygncurses*.dll searches
terminfo from TERMINFO. So it is possible if you have chance to
set environment variable TERMINFO.

Please refer to 'man terminfo' for more detail.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

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

* Re: Readline not working correctly with cygwin1.dll in same directory
  2022-06-05 15:04 ` Takashi Yano
@ 2022-06-05 16:38   ` Eliot Moss
  0 siblings, 0 replies; 5+ messages in thread
From: Eliot Moss @ 2022-06-05 16:38 UTC (permalink / raw)
  To: Takashi Yano, cygwin

On 6/5/2022 11:04 AM, Takashi Yano wrote:
> On Sun, 5 Jun 2022 14:17:27 +0000
> "Mexis, Nico" wrote:
>> However, I still have one follow-up question about this:
>>
>> Is there a way to get rid of the need for the terminfo folder or change its location?
>>
>> It would be ideal to not need to include it in the distribution at all or such that it will be in the same folder as cygwin1.dll.
> 
> If environment variable TERMINFO is set, cygncurses*.dll searches
> terminfo from TERMINFO. So it is possible if you have chance to
> set environment variable TERMINFO.
> 
> Please refer to 'man terminfo' for more detail.

I would add that the escape sequences needed to cause the
proper editing on the screen depend on the terminal type,
and the information for each kind of terminal is in the
terminfo folder.  So unless you assume a specific terminal
and can properly inform readline, it would seem to me to
be necessary to include terminfo.  Takashi may know more
on this point, of course ...

Best - Eliot Moss

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

* Re: Readline not working correctly with cygwin1.dll in same directory
  2022-06-03 18:37 Mexis, Nico
@ 2022-06-03 23:53 ` Takashi Yano
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Yano @ 2022-06-03 23:53 UTC (permalink / raw)
  To: cygwin

On Fri, 3 Jun 2022 18:37:29 +0000
"Mexis, Nico" wrote:
> Dear CygWin team,
> 
> this is my first bug report and I hope I have chosen the right recipients here.
> I am very sorry if this is the wrong address.
> 
> Here is my bug report:
> Currently, I am trying to compile a software for commutative algebra, namely CoCoA 5, using CygWin.
> The compilation itself is working correctly and finishes as expected.
> CoCoA 5 uses readline in order to facilitate inputs from the console.
> When starting the resulting executable within CygWin bash, readline and all of its features work correctly.
> Also, as long as CygWin's DLLs are within Windows's PATH, in the default (and new) Windows Terminal, everything is working fine.
> However, when trying to create a distributable zip file with all the libraries included, something strange happens:
> In order to allow users without a CygWin installation to start CoCoA 5, all the required DLLs need to be distributed together with the application itself.
> All the required libraries could be found using DependencyWalker and cygcheck.
> Of course, as expected, cygwin1.dll is one of the required DLLs.
> As soon as I place cygwin1.dll in the installation directory where CoCoA 5's executable resides, readline support breaks.
> For some reason, the input line behaves very strangely, e.g., backspace and the arrow keys are not working correctly.
> All of the other DLLs (including cygreadline7.dll) can reside in the installation directory without causing trouble.
> But as soon as cygwin1.dll is also added in the installation directory, this bug reappears.
> 
> Another strange observation:
> This problem does not seem to only affect CoCoA 5, but also many other similar applications like PARI/GP.
> As soon as cygwin1.dll is copied into the same directory as the application's exe, this strange bug appears.
> 
> Sadly, I do not know about a fix yet since cygwin1.dll is needed for all users without a local CygWin installation.
> But - in turn - adding cygwin1.dll causes this bug which makes the console application very uncomfortable to use.
> 
> I would be very happy if you know a fix for this strange issue since I could not find something similar online.
> Best regards and thank you very much in advance,

If the program depends on cygncurses*.dll, it also needs
/usr/share/terminfo.

It should be placed in the relative path ../usr/share/terminfo
from the directory where cygwin1.dll exists.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

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

* Readline not working correctly with cygwin1.dll in same directory
@ 2022-06-03 18:37 Mexis, Nico
  2022-06-03 23:53 ` Takashi Yano
  0 siblings, 1 reply; 5+ messages in thread
From: Mexis, Nico @ 2022-06-03 18:37 UTC (permalink / raw)
  To: cygwin

Dear CygWin team,

this is my first bug report and I hope I have chosen the right recipients here.
I am very sorry if this is the wrong address.

Here is my bug report:
Currently, I am trying to compile a software for commutative algebra, namely CoCoA 5, using CygWin.
The compilation itself is working correctly and finishes as expected.
CoCoA 5 uses readline in order to facilitate inputs from the console.
When starting the resulting executable within CygWin bash, readline and all of its features work correctly.
Also, as long as CygWin's DLLs are within Windows's PATH, in the default (and new) Windows Terminal, everything is working fine.
However, when trying to create a distributable zip file with all the libraries included, something strange happens:
In order to allow users without a CygWin installation to start CoCoA 5, all the required DLLs need to be distributed together with the application itself.
All the required libraries could be found using DependencyWalker and cygcheck.
Of course, as expected, cygwin1.dll is one of the required DLLs.
As soon as I place cygwin1.dll in the installation directory where CoCoA 5's executable resides, readline support breaks.
For some reason, the input line behaves very strangely, e.g., backspace and the arrow keys are not working correctly.
All of the other DLLs (including cygreadline7.dll) can reside in the installation directory without causing trouble.
But as soon as cygwin1.dll is also added in the installation directory, this bug reappears.

Another strange observation:
This problem does not seem to only affect CoCoA 5, but also many other similar applications like PARI/GP.
As soon as cygwin1.dll is copied into the same directory as the application's exe, this strange bug appears.

Sadly, I do not know about a fix yet since cygwin1.dll is needed for all users without a local CygWin installation.
But - in turn - adding cygwin1.dll causes this bug which makes the console application very uncomfortable to use.

I would be very happy if you know a fix for this strange issue since I could not find something similar online.
Best regards and thank you very much in advance,
Nico Mexis

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

end of thread, other threads:[~2022-06-05 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 14:17 Readline not working correctly with cygwin1.dll in same directory Mexis, Nico
2022-06-05 15:04 ` Takashi Yano
2022-06-05 16:38   ` Eliot Moss
  -- strict thread matches above, loose matches on Subject: below --
2022-06-03 18:37 Mexis, Nico
2022-06-03 23:53 ` Takashi Yano

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).