Re: [PATCH cygport] A patch to add a flag __SKIP_LIST_DEPS_LUA

2021-01-15 Thread ASSI
Lemures Lemniscati via Cygwin-apps writes:
> What I'd like to do is to have both lua5.3 and lua5.4 be installed, and
> alternatives make a symbolic link to lua5.3 or lua5.4  (new packages
> lua5.3-5.3.6-1 and lua5.4-5.4.2-1 which I try packaging.

Multi-version installations are not well supported by setup or cygwin
yet, but the alternatives anyway only address the question of how to set
the default version for the user.  For building packages you'd need to
specify which version to use each time you build something, so any
occurences of plain "lua" (from PATH) would need to be replaced with the
expansion of some variable that would be set appropriately when entering
pkg_info.

> And I'm trying to package luarocks for lua5.3 and lua5.4
> (lua5.3-luarocks and lua5.4-luarocks) by a single cygport file.

The packages should be named lua53-luarocks and lua54-luarocks (no dot
in the version number), like OpenSUSE (they seem to be the only
distribution with a multi-version lua and that particular naming scheme
you've chosen).

A different question is if you really want to package this particular
feature.  Just like all the other "package managers" that come with a
specific language or interpreter I'd expect this one to need (maybe
extensive) modifications to work correctly on Cygwin, especially if it
ends up building dynamic objects.  That's one reason I discourage the
use of CPAN on Cygwin, since folks tend to shoot themself into the foot
more often than not by using it.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


Re: Can't open display issue from CMD

2021-01-15 Thread ASSI
Luna Bellofiore via Cygwin writes:
> C:\Users\bellsal>\cygwin\bin\ssh 192.168.0.8 pwd
> /usr/bin/xrdb: Can't open display ''
   
> /home/bellsal
>
> PWD should not require X11 connection, so I don't understand why I am
> getting this issue.

You need to sanitize your login scripts on the Linux machine to only run
X11 commands when it actually is available, for instance by
conditionalizing on the presence of the DISPLAY environment variable.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Can't open display issue from CMD

2021-01-15 Thread Marco Atzeri via Cygwin

On 16.01.2021 05:22, Luna Bellofiore via Cygwin wrote:

All,

I am sending Linux commands from CMD (Windows) through SSH, and I am
getting "Can't open display".  Below I am capturing my issue, the IP number
is the remote Linux machine.

Microsoft Windows [Version 10.0.19042.746]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\bellsal>\cygwin\bin\ssh 192.168.0.8 pwd
/usr/bin/xrdb: Can't open display ''
/home/bellsal


It seems the remote machine is expecting to run a X interface
by default.
Or you have the startX (or similar) in the personal login scripts


The expect behaviour on a Unix machine (Cygwin or Linux) is:

$ ssh 127.0.0.1 pwd
Marco@127.0.0.1's password:
/home/Marco


PWD should not require X11 connection, so I don't understand why I am
getting this issue.  Do I need to set an environment variable?  If I need
an xterm from my remote Linux, I know I need to export the display, and
that works fine.  But, I am only sending a simple command from the CMD
console.

Thanks in advance.

Sa;


I suggest you to check the remote scripts.
It does not seem a Cygwin side problem

Marco

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


Can't open display issue from CMD

2021-01-15 Thread Luna Bellofiore via Cygwin
All,

I am sending Linux commands from CMD (Windows) through SSH, and I am
getting "Can't open display".  Below I am capturing my issue, the IP number
is the remote Linux machine.

Microsoft Windows [Version 10.0.19042.746]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\bellsal>\cygwin\bin\ssh 192.168.0.8 pwd
/usr/bin/xrdb: Can't open display ''
/home/bellsal

PWD should not require X11 connection, so I don't understand why I am
getting this issue.  Do I need to set an environment variable?  If I need
an xterm from my remote Linux, I know I need to export the display, and
that works fine.  But, I am only sending a simple command from the CMD
console.

Thanks in advance.

Sa;


cygcheck.out
Description: Binary data
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: [PATCH cygport] A patch to add a flag __SKIP_LIST_DEPS_LUA

2021-01-15 Thread Lemures Lemniscati via Cygwin-apps
On Fri, 15 Jan 2021 21:02:25 +0100, Achim Gratz
> Lemures Lemniscati via Cygwin-apps writes:
> > This is a fixed patch for cygport:
> >
> > I'd like to apply alternatives to lua packages to have different
> > versions of lua being installed. But, in such cases, current
> > __list_deps() might pick wrong dependencies.
> >
> > And, this is a patch to add a flag __SKIP_LIST_DEPS_LUA to skip
> > __list_deps() detecting depedency on lua, for the time being.
> 
> Your patch is overshooting your goal I'd think.  What you likely want
> instead is to specify which lua to use in setting up the luapaths
> variable so that the correct dependencies get extracted.
> 
> > I think it will do no harm.
> 
> For a more general facility of suppressing unwanted dependencies see:
> 
> https://repo.or.cz/cygport/rpm-style.git/commitdiff/83b4df817b81fe39257e59fe882b76ca18a80d7c
> https://repo.or.cz/cygport/rpm-style.git/commitdiff/d447a7553d93390f7eb3814216640ea6a2afdd4a
> 
> I needed this specifically for being able to split the perl_base package
> off perl and switching from manual to automatic generation of the
> dependency on the perl5_0xy provide.

Thank you, Achim.

I think it is what I'm longing for.
And it works.



What I'd like to do is to have both lua5.3 and lua5.4 be installed, and
alternatives make a symbolic link to lua5.3 or lua5.4  (new packages
lua5.3-5.3.6-1 and lua5.4-5.4.2-1 which I try packaging.
And I'm trying to package luarocks for lua5.3 and lua5.4
(lua5.3-luarocks and lua5.4-luarocks) by a single cygport file.

Regards,

Lem



Re: [PATCH cygport] A patch to add a flag __SKIP_LIST_DEPS_LUA

2021-01-15 Thread Achim Gratz
Lemures Lemniscati via Cygwin-apps writes:
> This is a fixed patch for cygport:
>
> I'd like to apply alternatives to lua packages to have different
> versions of lua being installed. But, in such cases, current
> __list_deps() might pick wrong dependencies.
>
> And, this is a patch to add a flag __SKIP_LIST_DEPS_LUA to skip
> __list_deps() detecting depedency on lua, for the time being.

Your patch is overshooting your goal I'd think.  What you likely want
instead is to specify which lua to use in setting up the luapaths
variable so that the correct dependencies get extracted.

> I think it will do no harm.

For a more general facility of suppressing unwanted dependencies see:

https://repo.or.cz/cygport/rpm-style.git/commitdiff/83b4df817b81fe39257e59fe882b76ca18a80d7c
https://repo.or.cz/cygport/rpm-style.git/commitdiff/d447a7553d93390f7eb3814216640ea6a2afdd4a

I needed this specifically for being able to split the perl_base package
off perl and switching from manual to automatic generation of the
dependency on the perl5_0xy provide.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs


Re: gdb not working

2021-01-15 Thread Ken Brown via Cygwin

On 1/15/2021 1:47 PM, Lemke, Michael SF/HZA-ZIC2 wrote:

On Friday, January 15, 2021 4:45 PM Jon Turney wrote:

On 15/01/2021 12:28, Lemke, Michael wrote:

I just installed a fresh copy of Cygwin and gdb with setup-x86_64.exe.
However, gdb does not produce any output.

Installing gdb versions 7.9.1-1 and 7.10.1-1 work, anything newer doesn't.
Any ideas why?

[...]


Install gdb 7.12.1-2
   pc> gdb -v
Install gdb 8.0.1-1
   pc> gdb -v
   pc> cygcheck -c gdb
Cygwin Package Information
Package  VersionStatus
gdb  8.0.1-1OK


You might try 'strace gdb' and see if that sheds any light on what's
failing.


I tried that but I couldn't see anything strange.


No error code?  Please show the output.


Also ldd `which gdb` is
fine.


Please show the output.


I tried the cygcheck Marco Atzeri suggested. I am not comfortable to send
the result to the list but I checked it.


Can you remove the sensitive parts and then send it?  It's hard for anyone on 
the list to help you if you don't provide information about your installation.



As a result I cleaned up my path to just /bin which removed some duplicate
entries in cygcheck.out but gdb still doesn't work.

The only strange part I see in cygcheck.out is a slight mess up with my
installation, a result of my moving /c/cygwin64 to /c/mystuff/ncygwin64
after my first run of setup.exe, see below.  So what has changed between
gdb 7.10.1-1 and gdb 7.12.1-2?


Dependencies may have changed.  Have you checked that you have all dependencies 
of whatever version you're trying to run?  Just re-running setup should take 
care of that if that's the problem.


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


Re: Aw: Re: Re: Re: Recompilation problems opencv (python3-cv2 --> python3.8)

2021-01-15 Thread Marco Atzeri via Cygwin

On 15.01.2021 12:08, Marco Atzeri wrote:

On 15.01.2021 11:49, ASSI wrote:

Marco Atzeri via Cygwin writes:




What the error message is trying to tell you is that you need the
"-fpermissive" option to CXXFLAGS if you expect the code to compile
despite the mismatched types.  Whether it will succeed or just stop
someplace else remains to be seen.


of course



it seems the only issue.

adding -CCMAKE_CXX_FLAGS=-fpermissive

to the cygport should be enough.

I will look also at the 4.5.1 and upload
one of them

Regards
Marco


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


RE: gdb not working

2021-01-15 Thread Lemke, Michael SF/HZA-ZIC2
On Friday, January 15, 2021 4:45 PM Jon Turney wrote:
>On 15/01/2021 12:28, Lemke, Michael wrote:
>> I just installed a fresh copy of Cygwin and gdb with setup-x86_64.exe.
>> However, gdb does not produce any output.
>> 
>> Installing gdb versions 7.9.1-1 and 7.10.1-1 work, anything newer doesn't.
>> Any ideas why?
>[...]
>
>> Install gdb 7.12.1-2
>>   pc> gdb -v
>> Install gdb 8.0.1-1
>>   pc> gdb -v
>>   pc> cygcheck -c gdb
>> Cygwin Package Information
>> Package  VersionStatus
>> gdb  8.0.1-1OK
>
>You might try 'strace gdb' and see if that sheds any light on what's 
>failing.

I tried that but I couldn't see anything strange. Also ldd `which gdb` is
fine.

I tried the cygcheck Marco Atzeri suggested. I am not comfortable to send
the result to the list but I checked it.

As a result I cleaned up my path to just /bin which removed some duplicate
entries in cygcheck.out but gdb still doesn't work.

The only strange part I see in cygcheck.out is a slight mess up with my
installation, a result of my moving /c/cygwin64 to /c/mystuff/ncygwin64
after my first run of setup.exe, see below.  So what has changed between 
gdb 7.10.1-1 and gdb 7.12.1-2? 

Excerpt from cygcheck.out:

HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
  d5bac59bf2204d69 = '\??\C:\MyStuff\NCygwin64'
  c0a8879476f177eb = '\??\C:\MyStuff\NCygwin'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
  d5bac59bf2204d69 = '\??\C:\MyStuff\NCygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\MyStuff\NCygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64 (ORPHANED)
  System: Key: d5bac59bf2204d69 Path: C:\MyStuff\NCygwin64
  User:   Key: e022582115c10879 Path: C:\cygwin64 (ORPHANED)
  User:   Key: d5bac59bf2204d69 Path: C:\MyStuff\NCygwin64
  User:   Key: c0a8879476f177eb Path: C:\MyStuff\NCygwin

c:  hd  NTFS486732Mb  27% CP CS UN PA FCQU  Windows
u:  net NTFS   4300668Mb  91% CP CS UN PA FCQU  USERS-10

C:\MyStuff\NCygwin\home   /home userbinary
C:\MyStuff\NCygwin64  / system  binary,auto
C:\MyStuff\NCygwin64\bin  /usr/bin  system  binary,auto
C:\MyStuff\NCygwin64\lib  /usr/lib  system  binary,auto
cygdrive prefix   / userbinary,posix=0,auto

Found: C:\MyStuff\NCygwin64\bin\awk
 -> C:\MyStuff\NCygwin64\bin\gawk.exe
Found: C:\MyStuff\NCygwin64\bin\bash.exe
Found: C:\MyStuff\NCygwin64\bin\cat.exe
Not Found: certutil
Not Found: clinfo
Not Found: comp
Found: C:\MyStuff\NCygwin64\bin\convert
 -> C:\MyStuff\NCygwin64\bin\magick.exe
Found: C:\MyStuff\NCygwin64\bin\cp.exe
Found: C:\MyStuff\NCygwin64\bin\cpp.exe
Not Found: crontab
Found: C:\MyStuff\NCygwin64\bin\curl.exe
Found: C:\MyStuff\NCygwin64\bin\expand.exe
Found: C:\MyStuff\NCygwin64\bin\find.exe
Found: C:\MyStuff\NCygwin64\bin\ftp.exe
Found: C:\MyStuff\NCygwin64\bin\gcc.exe
Found: C:\MyStuff\NCygwin64\bin\gdb.exe
Found: C:\MyStuff\NCygwin64\bin\grep.exe
Found: C:\MyStuff\NCygwin64\bin\hostname.exe
Found: C:\MyStuff\NCygwin64\bin\kill.exe
Not Found: klist
Found: C:\MyStuff\NCygwin64\bin\ld.exe
Found: C:\MyStuff\NCygwin64\bin\ls.exe
Found: C:\MyStuff\NCygwin64\bin\make.exe
Found: C:\MyStuff\NCygwin64\bin\mv.exe
Not Found: nslookup
Not Found: patch
Found: C:\MyStuff\NCygwin64\bin\perl.exe
Not Found: replace
Found: C:\MyStuff\NCygwin64\bin\rm.exe
Found: C:\MyStuff\NCygwin64\bin\sed.exe
Found: C:\MyStuff\NCygwin64\bin\sh.exe
Not Found: shutdown
Found: C:\MyStuff\NCygwin64\bin\sort.exe
Found: C:\MyStuff\NCygwin64\bin\ssh.exe
Found: C:\MyStuff\NCygwin64\bin\tar.exe
Found: C:\MyStuff\NCygwin64\bin\test.exe
Found: C:\MyStuff\NCygwin64\bin\timeout.exe
Found: C:\MyStuff\NCygwin64\bin\vi.exe
Found: C:\MyStuff\NCygwin64\bin\vim.exe
Found: C:\MyStuff\NCygwin64\bin\whoami.exe
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Fedora to Enable HarfBuzz in FreeType

2021-01-15 Thread Ken Brown via Cygwin

On 1/15/2021 12:52 PM, Brian Inglis wrote:

https://fedoraproject.org/wiki/Changes/EnableHarfBuzzInFreeType

Currently in Cygwin harfbuzz uses freetype but freetype does not use harfbuzz
- thoughts on enabling harfbuzz from freetype?


I'll follow Fedora.  Thanks for the heads up.

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


[PATCH] Cygwin: document a recent bug fix

2021-01-15 Thread Ken Brown via Cygwin-patches
This documents commit aec64798, "Cygwin: add flag to indicate reparse
points unknown to WinAPI".
---
 winsup/cygwin/release/3.2.0 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/winsup/cygwin/release/3.2.0 b/winsup/cygwin/release/3.2.0
index 132d5c810..c18a848de 100644
--- a/winsup/cygwin/release/3.2.0
+++ b/winsup/cygwin/release/3.2.0
@@ -43,5 +43,8 @@ Bug Fixes
 - Fix return value of sqrtl on negative infinity.
   Addresses: https://cygwin.com/pipermail/cygwin/2020-October/246606.html
 
+- Fix a path handling problem if there is a WSL symlink in PATH.
+  Addresses: https://cygwin.com/pipermail/cygwin/2020-December/246938.html
+
 - Fix a bug in fstatat(2) on 32 bit that could cause it to return garbage.
   Addresses: https://cygwin.com/pipermail/cygwin/2021-January/247399.html
-- 
2.30.0



Fedora to Enable HarfBuzz in FreeType

2021-01-15 Thread Brian Inglis

https://fedoraproject.org/wiki/Changes/EnableHarfBuzzInFreeType

Currently in Cygwin harfbuzz uses freetype but freetype does not use harfbuzz
- thoughts on enabling harfbuzz from freetype?

--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: [PATCH] Cygwin: document a recent bug fix

2021-01-15 Thread Ken Brown via Cygwin-patches

On 1/15/2021 12:42 PM, Ken Brown via Cygwin-patches wrote:

This documents commit b951adce, "Cygwin: add flag to indicate reparse
points unknown to WinAPI".


Sorry, there's a mistake in the commit message.  A corrected version is on the 
way.

Ken


Re: misterious GIT failure (SOLVED)

2021-01-15 Thread Ken Brown via Cygwin

On 1/15/2021 12:09 PM, matthew patton via Cygwin wrote:

I excised the 2 symlink-involved PATH elements and now Git runs great with 
v3.1.5 of the DLL. I'll try one of the snapshots at some point,


You've almost certainly run into the same bug that was fixed in 
https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=aec6479820fee5f71d50930bf0dde2bbf386bd4b, 
but it would be appreciated if you would confirm this by testing a snapshot.


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


[PATCH] Cygwin: document a recent bug fix

2021-01-15 Thread Ken Brown via Cygwin-patches
This documents commit b951adce, "Cygwin: add flag to indicate reparse
points unknown to WinAPI".
---
 winsup/cygwin/release/3.2.0 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/winsup/cygwin/release/3.2.0 b/winsup/cygwin/release/3.2.0
index 132d5c810..c18a848de 100644
--- a/winsup/cygwin/release/3.2.0
+++ b/winsup/cygwin/release/3.2.0
@@ -43,5 +43,8 @@ Bug Fixes
 - Fix return value of sqrtl on negative infinity.
   Addresses: https://cygwin.com/pipermail/cygwin/2020-October/246606.html
 
+- Fix a path handling problem if there is a WSL symlink in PATH.
+  Addresses: https://cygwin.com/pipermail/cygwin/2020-December/246938.html
+
 - Fix a bug in fstatat(2) on 32 bit that could cause it to return garbage.
   Addresses: https://cygwin.com/pipermail/cygwin/2021-January/247399.html
-- 
2.30.0



Re: misterious GIT failure (SOLVED)

2021-01-15 Thread Brian Inglis

On Friday, January 15, 2021, 11:36:28 AM EST, matthew patton via Cygwin wrote:

On 2021-01-15 10:09, matthew patton via Cygwin wrote:

Ken Brown wrote:

Do you by any chance have symlinks in your PATH? There was a problem
reported in early December in which STATUS_IO_REPARSE_TAG_NOT_HANDLED
would sometimes occur when there was a symlink in PATH:


Yes, the first and 3rd entries are symlinks. I've had these symlinks in my 
PATH for years.

/home/MP1116/.aws/YYY/bin:/home/MP1116/bin -> .WPHOME/bin/
.aws -> .WPHOME/.aws/.WPHOME -> Dropbox/Work_Projects/XXX
# /etc/fstab

>> C:/Users /home none binary,user 0 0

I excised the 2 symlink-involved PATH elements and now Git runs great with 
v3.1.5 of the DLL. I'll try one of the snapshots at some point, but I am also

tempted to change my Bash function 'addPath()' to fully unroll symlinks
before adding.
https://github.com/tb3088/shell-environment/blob/master/.functions#L144
Resolving Cygwin paths is best done using readlink or realpath followed by 
cygpath -alm then cygpath -auU to get canonical paths, as neither realpath nor 
cygpath do the complete job under Cygwin.


--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: mysterious GIT failure

2021-01-15 Thread matthew patton via Cygwin
On Friday, January 15, 2021, 12:09:30 PM EST, Brian Inglis 
 wrote:
 
 > Given that you have the same symptom, it is possible that Git-Bash or 
 > something > else you are running in Windows is creating symlinks somewhere, 
I only installed Git-Bash out of desperation and it's msys.dll (fork of 
cygwin.dll) is v 3.1.7 and dated late December after Cygwin team published this 
patch. 
https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=aec6479820fee5f71d50930bf0dde2bbf386bd4b
  
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Recompilation problems opencv (python3-cv2 --> python3.8)

2021-01-15 Thread Brian Inglis

On 2021-01-15 01:13, wilhelm-eger--- via Cygwin wrote:

Gesendet: Donnerstag, 14. Januar 2021 um 23:52 Uhr


Please try by downloading the complete Cygwin source package, and try a vanilla
rebuild first with zero changes, then change only the .cygport VERSION= to the
latest, rebuild, and fix any problems with that as you go.


I have done the following

mkdir opencv
cd opencv
git clone http://cygwin.com/git/cygwin-packages/opencv.git .
cygport opencv.cygport fetch
cygport opencv.cygport all

Same error.

Is there any other location where I could get the opencv source package from?


Check your email host location:

$ geoiplookup web.de
GeoIP Country Edition: DE, Germany
GeoIP City Edition, Rev 1: DE, 01, Baden-Wurttemberg, Karlsruhe, 76137, 
49.001900, 8.428700, 0, 0

GeoIP ASNum Edition: AS8560 1&1 Internet SE

Check Cygwin German mirror locations for one nearby:

$ sed '/^\s\+[^;]\+;\([^;]\+\);Europe;Germany$/!d;s!!\1!' /etc/setup/setup.rc | 
sort -u | xargs -l1 geoiplookup

...
$ geoiplookup ftp-stud.hs-esslingen.de
GeoIP Country Edition: DE, Germany
GeoIP City Edition, Rev 1: DE, 01, Baden-Wurttemberg, Stuttgart, 70173, 
48.766701, 9.183300, 0, 0

GeoIP ASNum Edition: AS553 Universitaet Stuttgart
...

in same Land, lat/long diff about .25/.75, and about 61km great circle distance.

Find mirror URLs:

$ fgrep esslingen.de /etc/setup/setup.rc

ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/;ftp-stud.hs-esslingen.de;Europe;Germany

http://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/;ftp-stud.hs-esslingen.de;Europe;Germany

https://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/;ftp-stud.hs-esslingen.de;Europe;Germany

Find source package:

$ grep -m1 '^source:\s.*opencv' ~/mirror/x86_64/setup.ini
source: x86_64/release/opencv/opencv-3.4.1-2-src.tar.xz 138322784 
8da273070a232773d522dfe9b2cf098115e34a595a3d0c968b7fc0ba4f17f92db4f405857157f72f5218e17e6694c1d93ddc22c70fc6bcbf383077499373657a


Download source package:

$ curl -OJRSs 
https://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/x86_64/release/opencv/opencv-3.4.1-2-src.tar.xz

*OR*
$ wget -N -nv 
https://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/x86_64/release/opencv/opencv-3.4.1-2-src.tar.xz


$ tar -xf opencv-3.4.1-2-src.tar.xz

Also package *patches* visible from:

https://build.opensuse.org/package/show/openSUSE:Factory/opencv3

but patches directly downloadbale from:

https://github.com/bmwiedemann/openSUSE/tree/20201007/packages/o/opencv3

[thanks to Achim for pointers]

and

https://sources.debian.org/data/main/o/opencv/3.2.0+dfsg-6/debian/patches/
https://salsa.debian.org/science-team/opencv/-/tree/debian/3.2.0+dfsg-6/debian/patches
https://salsa.debian.org/science-team/opencv/-/tree/debian/3.3.0+dfsg-1_exp0/debian/patches
https://salsa.debian.org/science-team/opencv/-/tree/debian/3.4.4+dfsg-1_exp1/debian/patches
https://salsa.debian.org/science-team/opencv/-/tree/debian/3.4.5+dfsg-1_exp1/debian/patches

and

https://src.fedoraproject.org/rpms/opencv/tree/f30

and you can pick later branches or tags for patches for later versions as you 
need from these repos: cygport can use URLs or local file names in 
PATCH_URI="..." and the string content may be a separate line per patch, usually 
with a leading tab.



Btw. there is no need to change to another Version, I just want to have cv2
also in python3.8 working. From what I have experienced with this package I
assume that this would also not compile with python3.6 atm. Seems to be a
cmake or gcc error to me.
First check your current packages, toolchains, and libraries against a known 
good working set of vanilla sources at an earlier version that should have no 
issues, then work your way up to newer versions adding difficulties! ;^>


--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: mysterious GIT failure

2021-01-15 Thread Brian Inglis

On 2021-01-15 09:36, matthew patton via Cygwin wrote:

Ken Brown wrote:> Do you by any chance have symlinks in your PATH?
Yes, the first and 3rd entries are symlinks.
I've had these symlinks in my PATH for years.
/home/MP1116/.aws/YYY/bin:/home/MP1116/bin -> .WPHOME/bin/

.aws -> .WPHOME/.aws/.WPHOME -> Dropbox/Work_Projects/XXX
#/etc/fstabC:/Users /home none binary,user 0 0


   There was a problem reported in early December in which 
STATUS_IO_REPARSE_TAG_NOT_HANDLED > would sometimes occur when there was a 
symlink in PATH:


Given that you have the same symptom, it is possible that Git-Bash or something 
else you are running in Windows is creating symlinks somewhere, which Cygwin is 
attempting to read while resolving some path search, or opening some directory 
or file entry, so it would seem advisable to download and install the latest 
snapshot DLL.
You could test this by trying to operate with only minimal Cygwin path /usr/bin: 
/bin and git clone into Cygwin /tmp/ or /usr/tmp/ as long as they are not 
mounted on non-Cygwin directories like your /home is, where Windows programs are 
likely to have an impact.



This KB was released 8 December. I installed it on Dec 23 and my git failures
started after that date. 

Known issue with that update is loss of user and system certs - hopefully only 
from Windows cert store affecting only Windows apps - but could that impact 
anything you are using?


--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: misterious GIT failure (SOLVED)

2021-01-15 Thread matthew patton via Cygwin
I excised the 2 symlink-involved PATH elements and now Git runs great with 
v3.1.5 of the DLL. I'll try one of the snapshots at some point, but I am also 
tempted to change my Bash function 'addPath()' to fully unroll symlinks before 
adding. https://github.com/tb3088/shell-environment/blob/master/.functions#L144 
   On Friday, January 15, 2021, 11:36:28 AM EST, matthew patton via Cygwin 
 wrote:  
 
 Ken Brown wrote:> Do you by any chance have symlinks in your PATH?
Yes, the first and 3rd entries are symlinks. I've had these symlinks in my PATH 
for years.
/home/MP1116/.aws/YYY/bin:/home/MP1116/bin -> .WPHOME/bin/

.aws -> .WPHOME/.aws/.WPHOME -> Dropbox/Work_Projects/XXX
#/etc/fstabC:/Users /home none binary,user 0 0

>  There was a problem reported in early December in which 
>STATUS_IO_REPARSE_TAG_NOT_HANDLED > would sometimes occur when there was a 
>symlink in PATH:

This KB was released 8 December. I installed it on Dec 23 and my git failures 
started after that 
date.https://support.microsoft.com/en-us/help/4592449/windows-10-update-kb4592449


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


Re: misterious GIT failure

2021-01-15 Thread matthew patton via Cygwin
Ken Brown wrote:> Do you by any chance have symlinks in your PATH?
Yes, the first and 3rd entries are symlinks. I've had these symlinks in my PATH 
for years.
/home/MP1116/.aws/YYY/bin:/home/MP1116/bin -> .WPHOME/bin/

.aws -> .WPHOME/.aws/.WPHOME -> Dropbox/Work_Projects/XXX
#/etc/fstabC:/Users /home none binary,user 0 0

>  There was a problem reported in early December in which 
>STATUS_IO_REPARSE_TAG_NOT_HANDLED > would sometimes occur when there was a 
>symlink in PATH:

This KB was released 8 December. I installed it on Dec 23 and my git failures 
started after that 
date.https://support.microsoft.com/en-us/help/4592449/windows-10-update-kb4592449


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


Re: ssh-host-config doesn't "inherit" user admin privilege

2021-01-15 Thread Bill Stewart
On Thu, Jan 14, 2021 at 6:21 PM art wrote:
>
> I get a security code 5 when ssh-host-config tries to install cygsshd. I was 
> logged into Win 10 pro/x64 as an admin user. The "fix" was to start a 
> Cygwin64 Terminal with Admin and then run ssh-host-config within this script. 
> Other installers have produced the same nuisance. These needed an admin 
> command prompt to get around the same "inheritance" limitation.

Are you asking a question or reporting a problem?

It sounds like you are confusing logging on using an admin user (i.e.,
a user that's a member of the local Administrators group) with
elevation (a process that runs using full administrative privileges).

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


Re: gdb not working

2021-01-15 Thread Jon Turney

On 15/01/2021 12:28, Lemke, Michael SF/HZA-ZIC2 wrote:

I just installed a fresh copy of Cygwin and gdb with setup-x86_64.exe.
However, gdb does not produce any output.

Installing gdb versions 7.9.1-1 and 7.10.1-1 work, anything newer doesn't.
Any ideas why?

[...]


Install gdb 7.12.1-2
  pc> gdb -v
Install gdb 8.0.1-1
  pc> gdb -v
  pc> cygcheck -c gdb
Cygwin Package Information
Package  VersionStatus
gdb  8.0.1-1OK


You might try 'strace gdb' and see if that sheds any light on what's 
failing.


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


[ANNOUNCEMENT] poppler 21.01.0-1, poppler-data 0.4.10-1

2021-01-15 Thread Ken Brown via Cygwin-announce via Cygwin
The following packages have been uploaded to the Cygwin distribution:

* poppler-21.01.0-1
* libpoppler106-21.01.0-1
* libpoppler-devel-21.01.0-1
* libpoppler-cpp0-21.01.0-1
* libpoppler-cpp-devel-21.01.0-1
* libpoppler-glib8-21.01.0-1
* libpoppler-glib-devel-21.01.0-1
* libpoppler-glib-doc-21.01.0-1
* girepository-Poppler0.18-21.01.0-1
* libpoppler-qt5_1-21.01.0-1
* libpoppler-qt5-devel-21.01.0-1
* poppler-data-0.4.10-1
* poppler-data-devel-0.4.10-1

Poppler is a fork of the xpdf PDF viewer which provides PDF rendering
functionality as a shared library and replaces built-in code with
dependencies that are now available as standard components of modern
Unix desktop environments.

This is an update to the latest upstream release.

Ken Brown
Cygwin's poppler maintainer
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: gdb not working

2021-01-15 Thread Marco Atzeri via Cygwin

On 15.01.2021 13:28, Lemke, Michael SF/HZA-ZIC2 wrote:

I just installed a fresh copy of Cygwin and gdb with setup-x86_64.exe.
However, gdb does not produce any output.

Installing gdb versions 7.9.1-1 and 7.10.1-1 work, anything newer doesn't.
Any ideas why? 



Problem reports:  https://cygwin.com/problems.html


please provide the cygcheck.out as attachment.

Both the current and the test versions work on my installations

$ gdb -v
GNU gdb (GDB) (Cygwin 10.1-1) 10.1
..

$ gdb --version
GNU gdb (GDB) (Cygwin 9.2-1) 9.2
..
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Total Take-off & Estimates!!

2021-01-15 Thread ethan--- via Cygwin
Hi,

We provide cost estimation and quantity take off services for all CSI
division.

If you have any project for estimate then send them over to me and I will
send proposal over.

looking forward to hearing from you.

Thank you.

Regards,

Ethan Andrian

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


[PATCH 11/11] dir.cc: Try unlink_nt first

2021-01-15 Thread Ben Wijen
Speedup deletion of directories.
---
 winsup/cygwin/dir.cc | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
index f912a9e47..2e7da3638 100644
--- a/winsup/cygwin/dir.cc
+++ b/winsup/cygwin/dir.cc
@@ -22,6 +22,8 @@ details. */
 #include "cygtls.h"
 #include "tls_pbuf.h"
 
+extern NTSTATUS unlink_nt (const char *ourname, ULONG eflags);
+
 extern "C" int
 dirfd (DIR *dir)
 {
@@ -398,6 +400,10 @@ rmdir (const char *dir)
  if (msdos && p == dir + 1 && isdrive (dir))
p[1] = '\\';
}
+  if(NT_SUCCESS(unlink_nt (dir, FILE_DIRECTORY_FILE))) {
+res = 0;
+__leave;
+  }
   if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
__leave;   /* errno already set */;
 
-- 
2.29.2



[PATCH 08/11] path.cc: Allow to skip filesystem checks

2021-01-15 Thread Ben Wijen
When file attributes are of no concern,
there is no point to query them.
---
 winsup/cygwin/path.cc | 3 +++
 winsup/cygwin/path.h  | 1 +
 2 files changed, 4 insertions(+)

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index abd3687df..f00707e86 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -931,7 +931,10 @@ path_conv::check (const char *src, unsigned opt,
 
 is_fs_via_procsys:
 
+   if (!(opt & PC_SKIP_SYM_CHECK))
+   {
  symlen = sym.check (full_path, suff, fs, conv_handle);
+   }
 
 is_virtual_symlink:
 
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 62bd5ddd5..56855e1c9 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -59,6 +59,7 @@ enum pathconv_arg
   PC_KEEP_HANDLE= _BIT (12),   /* keep handle for later stat calls */
   PC_NO_ACCESS_CHECK= _BIT (13),   /* helper flag for error check */
   PC_SYM_NOFOLLOW_DIR   = _BIT (14),   /* don't follow a trailing slash */
+  PC_SKIP_SYM_CHECK = _BIT (15),   /* skip symlink_info::check */
   PC_DONT_USE   = _BIT (31)/* conversion to signed happens. */
 };
 
-- 
2.29.2



[PATCH 09/11] mount.cc: Implement poor-man's cache

2021-01-15 Thread Ben Wijen
Try to avoid NtQueryVolumeInformationFile.
---
 winsup/cygwin/mount.cc | 78 --
 winsup/cygwin/mount.h  |  2 +-
 winsup/cygwin/path.cc  |  2 +-
 winsup/cygwin/path.h   |  1 +
 4 files changed, 56 insertions(+), 27 deletions(-)

diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index e0349815d..1d2b3a61a 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -82,6 +82,32 @@ win32_device_name (const char *src_path, char *win32_path, 
device& dev)
   return true;
 }
 
+static uint32_t
+hash_prefix (const PUNICODE_STRING upath)
+{
+  UNICODE_STRING prefix;
+  WCHAR *p;
+
+  if (upath->Buffer[5] == L':' && upath->Buffer[6] == L'\\')
+p = upath->Buffer + 6;
+  else
+{
+  /* We're expecting an UNC path.  Move p to the backslash after
+   "\??\UNC\server\share" or the trailing NUL. */
+  p = upath->Buffer + 7; /* Skip "\??\UNC" */
+  int bs_cnt = 0;
+
+  while (*++p)
+if (*p == L'\\')
+  if (++bs_cnt > 1)
+break;
+}
+  RtlInitCountedUnicodeString (, upath->Buffer,
+   (p - upath->Buffer) * sizeof(WCHAR));
+
+  return hash_path_name ((ino_t) 0, );
+}
+
 /* Beginning with Samba 3.0.28a, Samba allows to get version information using
the ExtendedInfo member returned by a FileFsObjectIdInformation request.
We just store the samba_version information for now.  Older versions than
@@ -106,14 +132,16 @@ class fs_info_cache
   struct {
 fs_info fsi;
 uint32_t hash;
+uint32_t prefix_hash;
   } entry[MAX_FS_INFO_CNT];
 
   uint32_t genhash (PFILE_FS_VOLUME_INFORMATION);
 
 public:
   fs_info_cache () : count (0) { fsi_lock.init ("fsi_lock"); }
+  fs_info *search (uint32_t);
   fs_info *search (PFILE_FS_VOLUME_INFORMATION, uint32_t &);
-  void add (uint32_t, fs_info *);
+  void add (uint32_t, fs_info *, uint32_t);
 };
 
 static fs_info_cache fsi_cache;
@@ -142,22 +170,31 @@ fs_info_cache::search (PFILE_FS_VOLUME_INFORMATION pffvi, 
uint32_t )
   return [i].fsi;
   return NULL;
 }
+fs_info*
+fs_info_cache::search (uint32_t prefix_hash)
+{
+  for (uint32_t i = 0; i < count; ++i)
+if (entry[i].prefix_hash == prefix_hash)
+  return [i].fsi;
+  return NULL;
+}
 
 void
-fs_info_cache::add (uint32_t hashval, fs_info *new_fsi)
+fs_info_cache::add (uint32_t hashval, fs_info *new_fsi, uint32_t prefix_hash)
 {
   fsi_lock.acquire ();
   if (count < MAX_FS_INFO_CNT)
 {
   entry[count].fsi = *new_fsi;
   entry[count].hash = hashval;
+  entry[count].prefix_hash = prefix_hash;
   ++count;
 }
   fsi_lock.release ();
 }
 
 bool
-fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
+fs_info::update (PUNICODE_STRING upath, HANDLE in_vol, bool use_prefix_hash)
 {
   NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
   HANDLE vol;
@@ -178,6 +215,17 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
   UNICODE_STRING fsname;
 
   clear ();
+
+  if (use_prefix_hash)
+{
+  fs_info *fsi = fsi_cache.search (hash_prefix (upath));
+  if (fsi)
+{
+  *this = *fsi;
+  return true;
+}
+}
+
   /* Always caseinsensitive.  We really just need access to the drive. */
   InitializeObjectAttributes (, upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
   if (in_vol)
@@ -233,27 +281,7 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
 a unique per-drive/share hash. */
   if (ffvi_buf.ffvi.VolumeSerialNumber == 0)
{
- UNICODE_STRING path_prefix;
- WCHAR *p;
-
- if (upath->Buffer[5] == L':' && upath->Buffer[6] == L'\\')
-   p = upath->Buffer + 6;
- else
-   {
- /* We're expecting an UNC path.  Move p to the backslash after
-"\??\UNC\server\share" or the trailing NUL. */
- p = upath->Buffer + 7;  /* Skip "\??\UNC" */
- int bs_cnt = 0;
-
- while (*++p)
-   if (*p == L'\\')
-   if (++bs_cnt > 1)
- break;
-   }
- RtlInitCountedUnicodeString (_prefix, upath->Buffer,
-  (p - upath->Buffer) * sizeof (WCHAR));
- ffvi_buf.ffvi.VolumeSerialNumber = hash_path_name ((ino_t) 0,
-_prefix);
+ ffvi_buf.ffvi.VolumeSerialNumber = hash_prefix(upath);
}
   fs_info *fsi = fsi_cache.search (_buf.ffvi, hash);
   if (fsi)
@@ -460,7 +488,7 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
 
   if (!in_vol)
 NtClose (vol);
-  fsi_cache.add (hash, this);
+  fsi_cache.add (hash, this, hash_prefix (upath));
   return true;
 }
 
diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/mount.h
index 122a679a8..86b72fb4c 100644
--- a/winsup/cygwin/mount.h
+++ b/winsup/cygwin/mount.h
@@ -124,7 +124,7 @@ class fs_info
 
   const char *fsname () const { return fsn[0] ? fsn : "unknown"; }
 
-  bool __reg3 update 

[PATCH 10/11] syscalls.cc: Expose shallow-pathconv unlink_nt

2021-01-15 Thread Ben Wijen
Not having to query file information improves unlink speed.
---
 winsup/cygwin/syscalls.cc | 68 ---
 1 file changed, 42 insertions(+), 26 deletions(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 79e4a4422..8aecdf453 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1305,6 +1305,18 @@ _unlink_ntpc_ (path_conv& pc, bool shareable)
   return status;
 }
 
+NTSTATUS
+unlink_nt (const char *ourname, ULONG eflags)
+{
+  path_conv pc (ourname, PC_SYM_NOFOLLOW | PC_FS_USE_PREFIX_HASH | 
PC_SKIP_SYM_CHECK, NULL);
+  dev_t devn = pc.get_device ();
+  if (pc.error || isproc_dev (devn))
+return STATUS_CANNOT_DELETE;
+
+  PUNICODE_STRING ntpath = pc.get_nt_native_path ();
+  return _unlink_nt (ntpath, eflags, 0);
+}
+
 NTSTATUS
 unlink_ntpc (path_conv )
 {
@@ -1322,37 +1334,41 @@ unlink (const char *ourname)
 {
   int res = -1;
   dev_t devn;
-  NTSTATUS status;
+  NTSTATUS status = unlink_nt (ourname, FILE_NON_DIRECTORY_FILE);
 
-  path_conv win32_name (ourname, PC_SYM_NOFOLLOW, stat_suffixes);
+  if (!NT_SUCCESS (status))
+  {
+path_conv win32_name (ourname, PC_SYM_NOFOLLOW, stat_suffixes);
 
-  if (win32_name.error)
-{
-  set_errno (win32_name.error);
-  goto done;
-}
+if (win32_name.error)
+  {
+set_errno (win32_name.error);
+goto done;
+  }
 
-  devn = win32_name.get_device ();
-  if (isproc_dev (devn))
-{
-  set_errno (EROFS);
-  goto done;
-}
+devn = win32_name.get_device ();
+if (isproc_dev (devn))
+  {
+set_errno (EROFS);
+goto done;
+  }
 
-  if (!win32_name.exists ())
-{
-  debug_printf ("unlinking a nonexistent file");
-  set_errno (ENOENT);
-  goto done;
-}
-  else if (win32_name.isdir ())
-{
-  debug_printf ("unlinking a directory");
-  set_errno (EISDIR);
-  goto done;
-}
+if (!win32_name.exists ())
+  {
+debug_printf ("unlinking a nonexistent file");
+set_errno (ENOENT);
+goto done;
+  }
+else if (win32_name.isdir ())
+  {
+debug_printf ("unlinking a directory");
+set_errno (EISDIR);
+goto done;
+  }
+
+status = unlink_ntpc (win32_name);
+  }
 
-  status = unlink_ntpc (win32_name);
   if (NT_SUCCESS (status))
 res = 0;
   else
-- 
2.29.2



[PATCH 06/11] cxx.cc: Fix dynamic initialization for static local variables

2021-01-15 Thread Ben Wijen
The old implementation for __cxa_guard_acquire did not return 1,
therefore dynamic initialization was never performed.

If concurrent-safe dynamic initialisation is ever needed, CXX ABI
must be followed when re-implementing __cxa_guard_acquire (et al.)
---
 winsup/cygwin/Makefile.in |  2 +-
 winsup/cygwin/cxx.cc  | 10 --
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index a840f2b83..73d9b37fd 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -69,7 +69,7 @@ COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Wimplicit-fallthrough=5 
-Werror -fmerge-cons
 ifeq ($(target_cpu),x86_64)
 COMMON_CFLAGS+=-mcmodel=small
 endif
-COMPILE.cc+=${COMMON_CFLAGS} # -std=gnu++14
+COMPILE.cc+=${COMMON_CFLAGS} -fno-threadsafe-statics # -std=gnu++14
 COMPILE.c+=${COMMON_CFLAGS}
 
 AR:=@AR@
diff --git a/winsup/cygwin/cxx.cc b/winsup/cygwin/cxx.cc
index be3268549..b69524aca 100644
--- a/winsup/cygwin/cxx.cc
+++ b/winsup/cygwin/cxx.cc
@@ -83,16 +83,6 @@ __cxa_pure_virtual (void)
   api_fatal ("pure virtual method called");
 }
 
-extern "C" void
-__cxa_guard_acquire ()
-{
-}
-
-extern "C" void
-__cxa_guard_release ()
-{
-}
-
 /* These routines are made available as last-resort fallbacks
for the application.  Should not be used in practice; the
entries in this struct get overwritten by each DLL as it
-- 
2.29.2



[PATCH 07/11] syscalls.cc: Implement non-path_conv dependent _unlink_nt

2021-01-15 Thread Ben Wijen
Implement _unlink_nt: wich does not depend on patch_conv
---
 winsup/cygwin/fhandler_disk_file.cc |   4 +-
 winsup/cygwin/forkable.cc   |   4 +-
 winsup/cygwin/syscalls.cc   | 239 ++--
 3 files changed, 228 insertions(+), 19 deletions(-)

diff --git a/winsup/cygwin/fhandler_disk_file.cc 
b/winsup/cygwin/fhandler_disk_file.cc
index 07f9c513a..fe04f832b 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1837,7 +1837,7 @@ fhandler_disk_file::mkdir (mode_t mode)
 int
 fhandler_disk_file::rmdir ()
 {
-  extern NTSTATUS unlink_nt (path_conv );
+  extern NTSTATUS unlink_ntpc (path_conv );
 
   if (!pc.isdir ())
 {
@@ -1850,7 +1850,7 @@ fhandler_disk_file::rmdir ()
   return -1;
 }
 
-  NTSTATUS status = unlink_nt (pc);
+  NTSTATUS status = unlink_ntpc (pc);
 
   if (!NT_SUCCESS (status))
 {
diff --git a/winsup/cygwin/forkable.cc b/winsup/cygwin/forkable.cc
index 350a95c3e..bd7421bf5 100644
--- a/winsup/cygwin/forkable.cc
+++ b/winsup/cygwin/forkable.cc
@@ -29,7 +29,7 @@ details. */
 
 /* Allow concurrent processes to use the same dll or exe
  * via their hardlink while we delete our hardlink. */
-extern NTSTATUS unlink_nt_shareable (path_conv );
+extern NTSTATUS unlink_ntpc_shareable (path_conv );
 
 #define MUTEXSEP L"@"
 #define PATHSEP L"\\"
@@ -132,7 +132,7 @@ rmdirs (WCHAR ntmaxpathbuf[NT_MAX_PATH])
  RtlInitUnicodeString (, ntmaxpathbuf);
 
  path_conv pc ();
- unlink_nt_shareable (pc); /* move to bin */
+ unlink_ntpc_shareable (pc); /* move to bin */
}
 
  if (!pfdi->NextEntryOffset)
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index f86a93825..79e4a4422 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -491,7 +491,7 @@ try_to_bin (path_conv , HANDLE , ACCESS_MASK access, 
ULONG flags)
   break;
 case STATUS_DIRECTORY_NOT_EMPTY:
   /* Uh oh!  This was supposed to be avoided by the check_dir_not_empty
-test in unlink_nt, but given that the test isn't atomic, this *can*
+test in unlink_ntpc, but given that the test isn't atomic, this *can*
 happen.  Try to move the dir back ASAP. */
   pfri->RootDirectory = NULL;
   pfri->FileNameLength = pc.get_nt_native_path ()->Length;
@@ -501,7 +501,7 @@ try_to_bin (path_conv , HANDLE , ACCESS_MASK access, 
ULONG flags)
   if (NT_SUCCESS (NtSetInformationFile (fh, , pfri, frisiz,
FileRenameInformation)))
{
- /* Give notice to unlink_nt and leave immediately.  This avoids
+ /* Give notice to unlink_ntpc and leave immediately.  This avoids
 closing the handle, which might still be used if called from
 the rm -r workaround code. */
  bin_stat = dir_not_empty;
@@ -545,7 +545,7 @@ try_to_bin (path_conv , HANDLE , ACCESS_MASK access, 
ULONG flags)
   if ((access & FILE_WRITE_ATTRIBUTES) && NT_SUCCESS (status) && !pc.isdir ())
 NtSetAttributesFile (fh, pc.file_attributes ());
   NtClose (fh);
-  fh = NULL; /* So unlink_nt doesn't close the handle twice. */
+  fh = NULL; /* So unlink_ntpc doesn't close the handle twice. */
   /* On success or when trying to unlink a directory we just return here.
  The below code only works for files.  It also fails on NFS. */
   if (NT_SUCCESS (status) || pc.isdir () || pc.fs_is_nfs ())
@@ -671,7 +671,187 @@ check_dir_not_empty (HANDLE dir, path_conv )
 }
 
 static NTSTATUS
-_unlink_nt (path_conv , bool shareable)
+_unlink_nt (PUNICODE_STRING ntpath, ULONG eflags, ULONG oattr)
+{
+  //Available as of Redstone 1 (Win10_17_09)
+  static bool has_posix_unlink_semantics =
+  wincap.has_posix_unlink_semantics ();
+  //Available as of Redstone 5 (Win10_18_09) (As were POSIX rename semantics)
+  static bool has_posix_unlink_semantics_with_ignore_readonly =
+  wincap.has_posix_rename_semantics ();
+
+  HANDLE fh;
+  ACCESS_MASK access = DELETE;
+  OBJECT_ATTRIBUTES attr;
+  IO_STATUS_BLOCK io;
+  ULONG flags = FILE_OPEN_REPARSE_POINT | FILE_OPEN_FOR_BACKUP_INTENT
+  | FILE_DELETE_ON_CLOSE | eflags;
+  NTSTATUS fstatus, istatus = STATUS_SUCCESS;
+
+  syscall_printf("Trying to delete %S, isdir = %d", ntpath,
+ eflags == FILE_DIRECTORY_FILE);
+
+  InitializeObjectAttributes(, ntpath, oattr, NULL, NULL);
+
+  //FILE_DELETE_ON_CLOSE icw FILE_DIRECTORY_FILE only works when directory is 
empty
+  //-> We must assume directory not empty, therefore only do this for regular 
files.
+  if (eflags & FILE_NON_DIRECTORY_FILE)
+{
+  //Step 1
+  //If the file is not 'in use' and not 'readonly', this should just work.
+  fstatus = NtOpenFile (, access, , , FILE_SHARE_DELETE, flags);
+  debug_printf("NtOpenFile %S: %y", ntpath, fstatus);
+}
+
+  if (!(eflags & FILE_NON_DIRECTORY_FILE) || // Workaround for the 
non-empty-dir issue
+  fstatus == 

[PATCH 04/11] syscalls.cc: Use EISDIR

2021-01-15 Thread Ben Wijen
This is the non-POSIX value returned by Linux since 2.1.132.
---
 winsup/cygwin/syscalls.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 227d1a911..043ccdb99 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1118,7 +1118,7 @@ unlink (const char *ourname)
   else if (win32_name.isdir ())
 {
   debug_printf ("unlinking a directory");
-  set_errno (EPERM);
+  set_errno (EISDIR);
   goto done;
 }
 
-- 
2.29.2



[PATCH 03/11] syscalls.cc: Fix num_links

2021-01-15 Thread Ben Wijen
NtQueryInformationFile on fh_ro needs FILE_READ_ATTRIBUTES
to succeed.
---
 winsup/cygwin/syscalls.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 0e89b4f44..227d1a911 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -767,8 +767,9 @@ _unlink_nt (path_conv , bool shareable)
   if ((pc.fs_flags () & FILE_SUPPORTS_TRANSACTIONS))
start_transaction (old_trans, trans);
 retry_open:
-  status = NtOpenFile (_ro, FILE_WRITE_ATTRIBUTES, , ,
-  FILE_SHARE_VALID_FLAGS, flags);
+  status = NtOpenFile (_ro,
+   FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
+   , , FILE_SHARE_VALID_FLAGS, flags);
   if (NT_SUCCESS (status))
{
  debug_printf ("Opening %S for removing R/O succeeded",
-- 
2.29.2



[PATCH 01/11] syscalls.cc: unlink_nt: Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE first

2021-01-15 Thread Ben Wijen
---
 winsup/cygwin/ntdll.h |  3 ++-
 winsup/cygwin/syscalls.cc | 20 
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index d4f6aaf45..7eee383dd 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -497,7 +497,8 @@ enum {
   FILE_DISPOSITION_DELETE  = 0x01,
   FILE_DISPOSITION_POSIX_SEMANTICS = 0x02,
   FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK   = 0x04,
-  FILE_DISPOSITION_ON_CLOSE= 0x08
+  FILE_DISPOSITION_ON_CLOSE= 0x08,
+  FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE   = 0x10,
 };
 
 enum
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 525efecf3..ce4e9c65c 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -709,11 +709,23 @@ _unlink_nt (path_conv , bool shareable)
   flags);
   if (!NT_SUCCESS (status))
goto out;
-  /* Why didn't the devs add a FILE_DELETE_IGNORE_READONLY_ATTRIBUTE
-flag just like they did with FILE_LINK_IGNORE_READONLY_ATTRIBUTE
-and FILE_LINK_IGNORE_READONLY_ATTRIBUTE???
+  /* Try FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE first
+ it was added with Redstone 5 (Win10 18_09) (as were POSIX rename 
semantics)
+ If it fails: fall-back to usual trickery */
+  if (wincap.has_posix_rename_semantics ())
+{
+  fdie.Flags = FILE_DISPOSITION_DELETE | 
FILE_DISPOSITION_POSIX_SEMANTICS;
+  fdie.Flags|= FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE;
+  status = NtSetInformationFile (fh, , , sizeof fdie,
+ FileDispositionInformationEx);
+  if (NT_SUCCESS (status))
+{
+  NtClose (fh);
+  goto out;
+}
+}
 
- POSIX unlink semantics are nice, but they still fail if the file
+  /* POSIX unlink semantics are nice, but they still fail if the file
 has the R/O attribute set.  Removing the file is very much a safe
 bet afterwards, so, no transaction. */
   if (pc.file_attributes () & FILE_ATTRIBUTE_READONLY)
-- 
2.29.2



gdb not working

2021-01-15 Thread Lemke, Michael SF/HZA-ZIC2
I just installed a fresh copy of Cygwin and gdb with setup-x86_64.exe.
However, gdb does not produce any output.

Installing gdb versions 7.9.1-1 and 7.10.1-1 work, anything newer doesn't.
Any ideas why?

pc> gdb -v
GNU gdb (GDB) Cygwin 7.9.1-1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".

Install gdb 7.10.1-1
 pc> gdb -v
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".

Install gdb 7.12.1-2
 pc> gdb -v
Install gdb 8.0.1-1
 pc> gdb -v
 pc> cygcheck -c gdb
Cygwin Package Information
Package  VersionStatus
gdb  8.0.1-1OK
 pc> uname -a
CYGWIN_NT-10.0 pc 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin

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


ITB Berlin 2021

2021-01-15 Thread Kennedy adrian
 

 

Hi,

 

Hope this email finds you well!

 

Would you be interested in ITB Berlin Expo Database List??

 

Could you please let me know your thoughts? 

 

In turn, I'll get back to you with precise counts and pricing details for
your consideration.

 

If you don't want to receive further emails please reply back with "Leave
Out"

 

Regards,

Kennedy adrian

 

 

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


Re: Aw: Re: Re: Re: Recompilation problems opencv (python3-cv2 --> python3.8)

2021-01-15 Thread Marco Atzeri via Cygwin

On 15.01.2021 11:49, ASSI wrote:

Marco Atzeri via Cygwin writes:

I see this as first error

/pub/devel/opencv/opencv-3.4.1-3.x86_64/src/opencv-3.4.1/modules/python/src2/cv2.cpp:889:34:
error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
it seems the compilers is less tolerant than before.
It does not seem a specific python issue.

I will see to patch it and continue when I found a bit of time


What the error message is trying to tell you is that you need the
"-fpermissive" option to CXXFLAGS if you expect the code to compile
despite the mismatched types.  Whether it will succeed or just stop
someplace else remains to be seen.


of course



The upstream package is at version 4 already, which probably needs other
patches as a quick look at Fedora seems to indicate:

https://src.fedoraproject.org/rpms/opencv/tree/master


one step at time


Regards,
Achim.


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


Re: Aw: Re: Re: Re: Recompilation problems opencv (python3-cv2 --> python3.8)

2021-01-15 Thread ASSI
Marco Atzeri via Cygwin writes:
> I see this as first error
>
> /pub/devel/opencv/opencv-3.4.1-3.x86_64/src/opencv-3.4.1/modules/python/src2/cv2.cpp:889:34:
> error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
> it seems the compilers is less tolerant than before.
> It does not seem a specific python issue.
>
> I will see to patch it and continue when I found a bit of time

What the error message is trying to tell you is that you need the
"-fpermissive" option to CXXFLAGS if you expect the code to compile
despite the mismatched types.  Whether it will succeed or just stop
someplace else remains to be seen.

The upstream package is at version 4 already, which probably needs other
patches as a quick look at Fedora seems to indicate:

https://src.fedoraproject.org/rpms/opencv/tree/master


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


[PATCH cygport] A patch to add a flag __SKIP_LIST_DEPS_LUA

2021-01-15 Thread Lemures Lemniscati via Cygwin-apps
Hi!

This is a fixed patch for cygport:

I'd like to apply alternatives to lua packages to have different
versions of lua being installed. But, in such cases, current
__list_deps() might pick wrong dependencies.

And, this is a patch to add a flag __SKIP_LIST_DEPS_LUA to skip
__list_deps() detecting depedency on lua, for the time being.

I think it will do no harm.


Regards,

Lem


diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index 98f7808..1b27b61 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -331,7 +331,14 @@ __list_deps() {
done
fi
 
-   if check_prog lua
+#v* Information/__SKIP_LIST_DEPS_LUA
+#  DESCRIPTION
+#  A flag in __list_deps() to skip detecting depedency on lua.
+#  Set a nonempty string to __SKIP_LIST_DEPS_LUA in order to skip.
+#  (e.g. in case Lua's of different versions exist).
+#
+
+   if [ -z "${__SKIP_LIST_DEPS_LUA}" ] && check_prog lua
then
luapaths=($(lua -e 'print(package.path..";"..package.cpath)' | 
tr '\;' ' '))
luapaths+=" ${DEPS_PATH//:/ }"
-- 
2.30.0



0001-Add-a-flag-__SKIP_LIST_DEPS_LUA-to-skip-detecting-de.patch
Description: Binary data


Re: [PATCH cygport]

2021-01-15 Thread Lemures Lemniscati via Cygwin-apps


On Fri, 15 Jan 2021 18:46:44 +0900, Lemures Lemniscati
> Hi!
> 
> This is another patch for cygport: 
> 
> I'd like to apply alternatives to lua packages to have different
> versions of lua being installed. But, in such cases, current
> __list_deps() might pick wrong dependencies.
> 
> And, this is a patch to add a flag __SKIP_LIST_DEPS_LUA to skip
> __list_deps() detecting depedency on lua, for the time being.
> 
> 
> Regards,
> 
> Lem
> 
Sorry, this is a wrong patch, I'll resend.

Regards,
Lem



[PATCH cygport]

2021-01-15 Thread Lemures Lemniscati via Cygwin-apps
Hi!

This is another patch for cygport: 

I'd like to apply alternatives to lua packages to have different
versions of lua being installed. But, in such cases, current
__list_deps() might pick wrong dependencies.

And, this is a patch to add a flag __SKIP_LIST_DEPS_LUA to skip
__list_deps() detecting depedency on lua, for the time being.


Regards,

Lem




diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index 98f7808..f83f239 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -331,7 +331,14 @@ __list_deps() {
done
fi
 
-   if check_prog lua
+#v* Information/__SKIP_LIST_DEPS_LUA
+#  DESCRIPTION
+#  A flag in __list_deps() to skip detecting depedency on lua.
+#  Set a nonempty string to __SKIP_LIST_DEPS_LUA in order to skip.
+#  (e.g. in case Lua's of different versions exist).
+#
+
+   if [ -n "${__SKIP_LIST_DEPS_LUA}" ] || check_prog lua
then
luapaths=($(lua -e 'print(package.path..";"..package.cpath)' | 
tr '\;' ' '))
luapaths+=" ${DEPS_PATH//:/ }"
-- 
2.30.0



0001-Add-a-flag-__SKIP_LIST_DEPS_LUA-to-skip-detecting-de.patch
Description: Binary data


Re: [ITA] libnice-0.1.18-1

2021-01-15 Thread Marco Atzeri via Cygwin-apps

On 14.01.2021 16:29, Ken Brown via Cygwin-apps wrote:

On 1/14/2021 10:11 AM, Ken Brown via Cygwin-apps wrote:

On 1/14/2021 1:41 AM, Marco Atzeri via Cygwin-apps wrote:

On 14.01.2021 03:53, Ken Brown via Cygwin-apps wrote:

On 1/10/2021 8:36 AM, Lemures Lemniscati via Cygwin-apps wrote:

On Sun, 10 Jan 2021 12:46:43 +0100, Marco Atzeri via Cygwin-apps

On 10.01.2021 01:07, Lemures Lemniscati via Cygwin-apps wrote:
Building on my system I found that gobject-introspection will need
a rebuild for python3.


I played with gobject-introspection-1.64.1 last summer and updated the 
patches.   If you're curious, you can find what I did in the 1.64 
branch at the same source repo that I cited above.  But in order to 
build it, I had to build and install an updated glib2.0, since it 
required glib2.0 >= 2.58.0.  (I also used pip to install 
python-markdown, which was a new build requirement.)


also python-markdown is up

Regards
Marco


Re: Aw: Re: Re: Re: Recompilation problems opencv (python3-cv2 --> python3.8)

2021-01-15 Thread Marco Atzeri via Cygwin



On 15.01.2021 09:13, wilhelm-eger--- via Cygwin wrote:

Gesendet: Donnerstag, 14. Januar 2021 um 23:52 Uhr


Please try by downloading the complete Cygwin source package, and try a vanilla
rebuild first with zero changes, then change only the .cygport VERSION= to the
latest, rebuild, and fix any problems with that as you go.


I have done the following

mkdir opencv
cd opencv
git clone http://cygwin.com/git/cygwin-packages/opencv.git .
cygport opencv.cygport fetch
cygport opencv.cygport all

Same error.



I see this as first error

/pub/devel/opencv/opencv-3.4.1-3.x86_64/src/opencv-3.4.1/modules/python/src2/cv2.cpp:889:34: 
error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]

it seems the compilers is less tolerant than before.
It does not seem a specific python issue.

I will see to patch it and continue when I found a bit of time


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


[PATCH] Cygwin: pty: Set input_available_event only for cygwin pipe.

2021-01-15 Thread Takashi Yano via Cygwin-patches
- cat exits immediately in the following senario.
1) Execute env CYGWIN=disable_pcon script
2) Execute cmd.exe
3) Execute cat in cmd.exe.
  This is caused by setting input_available_event for the pipe for
  non-cygwin app. This patch fixes the issue.
---
 winsup/cygwin/fhandler_tty.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index e4993bf31..0b9901974 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -394,7 +394,8 @@ fhandler_pty_master::accept_input ()
}
 }
 
-  SetEvent (input_available_event);
+  if (write_to == get_output_handle ())
+SetEvent (input_available_event);
   ReleaseMutex (input_mutex);
   return ret;
 }
-- 
2.30.0



Re: [ITA] libnice-0.1.18-1

2021-01-15 Thread Lemures Lemniscati via Cygwin-apps
On Thu, 14 Jan 2021 10:29:51 -0500, Ken Brown via Cygwin-apps
> On 1/14/2021 10:11 AM, Ken Brown via Cygwin-apps wrote:
>> On 1/14/2021 1:41 AM, Marco Atzeri via Cygwin-apps wrote:
>>> On 14.01.2021 03:53, Ken Brown via Cygwin-apps wrote:
 On 1/10/2021 8:36 AM, Lemures Lemniscati via Cygwin-apps wrote:
> On Sun, 10 Jan 2021 12:46:43 +0100, Marco Atzeri via Cygwin-apps
>> On 10.01.2021 01:07, Lemures Lemniscati via Cygwin-apps wrote:
>> Building on my system I found that gobject-introspection will need
>> a rebuild for python3.
>>>
> Although I'm not sure...
> We might need to rebuild gobject-introspection, as Marco said,
> and python*-mako also.
>>>
>>> I am uploading python*mako as test
>>> I will also try to rebuild gobject-introspection
>>
>> I've just pushed an update for python 3.8 to the playground branch at
>>
>> https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/gobject-introspection.git
>>
 I'd prefer to upgrade gobject-introspection to a more recent release rather
 than just rebuilding the current release.  But, unfortunately, a more 
 recent
 gobject-introspection would require a more recent glib2.0. I'm not sure 
 it's
 a good idea to update glib2.0 without updating all of GNOME.  I tried to
 start a discussion about this last May, but it didn't get very far:
>>>
>> I played with gobject-introspection-1.64.1 last summer and updated the 
>> patches.
>>   If you're curious, you can find what I did in the 1.64 branch at the same
>> source repo that I cited above.  But in order to build it, I had to build and
>> install an updated glib2.0, since it required glib2.0 >= 2.58.0.  (I also 
>> used
>> pip to install python-markdown, which was a new build requirement.)
>>
>> Maybe I'll take a little time right now to push my glib2.0 work in case 
>> someone
>> braver than I am wants to pick this up.
> 
> This is now on the playground branch at
> 
>https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/glib2.0.git

Thank you, everyone.
I'll try it this weekend.

Lem



[PATCH 5/5] Cygwin: pty: Make master thread functions be static.

2021-01-15 Thread Takashi Yano via Cygwin-patches
- The functions pty_master_thread() and pty_master_fwd_thread()
  should be static (i.e. should not access class member) because
  the instance is deleted if the master is dup()'ed and the first
  master is closed. In this case, because the dup()'ed instance
  still exists, these master threads are also still alive even
  though the instance has been deleted. As a result, accesing
  class members in these functions causes accessi violation.

  Addresses:
  https://cygwin.com/pipermail/cygwin-developers/2021-January/012030.html
---
 winsup/cygwin/fhandler.h  |  30 ++-
 winsup/cygwin/fhandler_tty.cc | 154 ++
 2 files changed, 128 insertions(+), 56 deletions(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index ffd19a590..d134b180c 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2274,8 +2274,9 @@ class fhandler_pty_common: public fhandler_termios
   void resize_pseudo_console (struct winsize *);
 
  protected:
-  BOOL process_opost_output (HANDLE h,
-const void *ptr, ssize_t& len, bool is_echo);
+  static BOOL process_opost_output (HANDLE h, const void *ptr, ssize_t& len,
+   bool is_echo, tty *ttyp,
+   bool is_nonblocking);
 };
 
 class fhandler_pty_slave: public fhandler_pty_common
@@ -2352,6 +2353,24 @@ class fhandler_pty_slave: public fhandler_pty_common
 #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit))
 class fhandler_pty_master: public fhandler_pty_common
 {
+public:
+  /* Parameter set for the static function pty_master_thread() */
+  struct master_thread_param_t {
+HANDLE from_master;
+HANDLE from_master_cyg;
+HANDLE to_master;
+HANDLE to_master_cyg;
+HANDLE master_ctl;
+HANDLE input_available_event;
+  };
+  /* Parameter set for the static function pty_master_fwd_thread() */
+  struct master_fwd_thread_param_t {
+HANDLE to_master_cyg;
+HANDLE from_slave;
+HANDLE output_mutex;
+tty *ttyp;
+  };
+private:
   int pktmode; // non-zero if pty in a packet mode.
   HANDLE master_ctl;   // Control socket for handle duplication
   cygthread *master_thread;// Master control thread
@@ -2360,14 +2379,15 @@ class fhandler_pty_master: public fhandler_pty_common
   DWORD dwProcessId;   // Owner of master handles
   HANDLE to_master_cyg, from_master_cyg;
   cygthread *master_fwd_thread;// Master forwarding thread
+  HANDLE thread_param_copied_event;
 
 public:
   HANDLE get_echo_handle () const { return echo_r; }
   /* Constructor */
   fhandler_pty_master (int);
 
-  DWORD pty_master_thread ();
-  DWORD pty_master_fwd_thread ();
+  static DWORD pty_master_thread (const master_thread_param_t *p);
+  static DWORD pty_master_fwd_thread (const master_fwd_thread_param_t *p);
   int process_slave_output (char *buf, size_t len, int pktmode_on);
   void doecho (const void *str, DWORD len);
   int accept_input ();
@@ -2410,6 +2430,8 @@ public:
 return fh;
   }
   bool to_be_read_from_pcon (void);
+  void get_master_thread_param (master_thread_param_t *p);
+  void get_master_fwd_thread_param (master_fwd_thread_param_t *p);
 };
 
 class fhandler_dev_null: public fhandler_base
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 789bcdfdf..e4993bf31 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -301,7 +301,8 @@ fhandler_pty_master::doecho (const void *str, DWORD len)
 {
   ssize_t towrite = len;
   acquire_output_mutex (INFINITE);
-  if (!process_opost_output (echo_w, str, towrite, true))
+  if (!process_opost_output (echo_w, str, towrite, true,
+get_ttyp (), is_nonblocking ()))
 termios_printf ("Write to echo pipe failed, %E");
   release_output_mutex ();
 }
@@ -874,7 +875,8 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
   reset_switch_to_pcon ();
 
   acquire_output_mutex (INFINITE);
-  if (!process_opost_output (get_output_handle_cyg (), ptr, towrite, false))
+  if (!process_opost_output (get_output_handle_cyg (), ptr, towrite, false,
+get_ttyp (), is_nonblocking ()))
 {
   DWORD err = GetLastError ();
   termios_printf ("WriteFile failed, %E");
@@ -1955,8 +1957,15 @@ fhandler_pty_slave::fixup_after_exec ()
calls to CallNamedPipe should have a big enough timeout value.  For now this
is 500ms.  Hope that's enough. */
 
+/* The function pty_master_thread() should be static because the instance
+   is deleted if the master is dup()'ed and the original is closed. In
+   this case, dup()'ed instance still exists, therefore, master thread
+   is also still alive even though the instance has been deleted. As a
+   result, accesing member variables in this function causes access
+   violation. */
+
 DWORD
-fhandler_pty_master::pty_master_thread ()
+fhandler_pty_master::pty_master_thread 

[PATCH 4/5] Cygwin: pty: Prevent pty from changing code page of parent console.

2021-01-15 Thread Takashi Yano via Cygwin-patches
- After commit 232fde0e, pty changes console code page when the first
  non-cygwin app is executed. If pty is started in real console device,
  pty changes the code page of root console. This causes very annoying
  result because changing code page changes the font of command prompt
  if console is in legacy mode. This patch avoids this by creating a
  new invisible console for the first pty started in console device.
---
 winsup/cygwin/fhandler.h  |   5 +-
 winsup/cygwin/fhandler_console.cc |  38 +++--
 winsup/cygwin/fhandler_tty.cc | 126 +-
 winsup/cygwin/spawn.cc|   1 +
 winsup/cygwin/tty.cc  |   2 +
 winsup/cygwin/tty.h   |   2 +
 6 files changed, 163 insertions(+), 11 deletions(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 2077b5245..ffd19a590 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2127,7 +2127,7 @@ private:
   int input_tcsetattr (int a, const struct termios *t);
   void set_cursor_maybe ();
   static bool create_invisible_console (HWINSTA);
-  static bool create_invisible_console_workaround ();
+  static bool create_invisible_console_workaround (bool force);
   static console_state *open_shared_console (HWND, HANDLE&, bool&);
   void fix_tab_position (void);
 
@@ -2185,7 +2185,7 @@ private:
   bool send_winch_maybe ();
   void setup ();
   bool set_unit ();
-  static bool need_invisible ();
+  static bool need_invisible (bool force=false);
   static void free_console ();
   static const char *get_nonascii_key (INPUT_RECORD& input_rec, char *);
 
@@ -2346,6 +2346,7 @@ class fhandler_pty_slave: public fhandler_pty_common
   void mask_switch_to_pcon_in (bool mask);
   void setup_locale (void);
   tty *get_ttyp () { return (tty *) tc (); } /* Override as public */
+  void create_invisible_console (void);
 };
 
 #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit))
diff --git a/winsup/cygwin/fhandler_console.cc 
b/winsup/cygwin/fhandler_console.cc
index a4c054e24..dd00079fa 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -53,6 +53,23 @@ fhandler_console::console_state NO_COPY 
*fhandler_console::shared_console_info;
 
 bool NO_COPY fhandler_console::invisible_console;
 
+/* Mutex for AttachConsole()/FreeConsole() in fhandler_tty.cc */
+HANDLE NO_COPY attach_mutex;
+
+static inline void
+acquire_attach_mutex (DWORD t)
+{
+  if (attach_mutex)
+WaitForSingleObject (attach_mutex, t);
+}
+
+static inline void
+release_attach_mutex ()
+{
+  if (attach_mutex)
+ReleaseMutex (attach_mutex);
+}
+
 /* con_ra is shared in the same process.
Only one console can exist in a process, therefore, static is suitable. */
 static struct fhandler_base::rabuf_t con_ra;
@@ -599,6 +616,8 @@ fhandler_console::process_input_message (void)
   if (!shared_console_info)
 return input_error;
 
+  acquire_attach_mutex (INFINITE);
+
   termios *ti = &(get_ttyp ()->ti);
 
   fhandler_console::input_states stat = input_processing;
@@ -608,6 +627,7 @@ fhandler_console::process_input_message (void)
   if (!PeekConsoleInputW (get_handle (), input_rec, INREC_SIZE, _read))
 {
   termios_printf ("PeekConsoleInput failed, %E");
+  release_attach_mutex ();
   return input_error;
 }
 
@@ -972,6 +992,7 @@ out:
   /* Discard processed recored. */
   DWORD dummy;
   ReadConsoleInputW (get_handle (), input_rec, min (total_read, i+1), );
+  release_attach_mutex ();
   return stat;
 }
 
@@ -2973,6 +2994,7 @@ fhandler_console::write (const void *vsrc, size_t len)
   if (bg <= bg_eof)
 return (ssize_t) bg;
 
+  acquire_attach_mutex (INFINITE);
   push_process_state process_state (PID_TTYOU);
   acquire_output_mutex (INFINITE);
 
@@ -3298,6 +3320,7 @@ fhandler_console::write (const void *vsrc, size_t len)
 
   syscall_printf ("%ld = fhandler_console::write(...)", len);
 
+  release_attach_mutex ();
   return len;
 }
 
@@ -3469,12 +3492,13 @@ fhandler_console::create_invisible_console (HWINSTA 
horig)
function is currently only called at startup and during exec, it shouldn't
be a big deal.  */
 bool
-fhandler_console::create_invisible_console_workaround ()
+fhandler_console::create_invisible_console_workaround (bool force)
 {
-  if (!AttachConsole (-1))
+  /* If force is set, avoid to reattach to existing console. */
+  if (force || !AttachConsole (-1))
 {
   bool taskbar;
-  DWORD err = GetLastError ();
+  DWORD err = force ? 0 : GetLastError ();
   path_conv helper ("/bin/cygwin-console-helper.exe");
   HANDLE hello = NULL;
   HANDLE goodbye = NULL;
@@ -3559,10 +3583,12 @@ fhandler_console::free_console ()
 }
 
 bool
-fhandler_console::need_invisible ()
+fhandler_console::need_invisible (bool force)
 {
   BOOL b = false;
-  if (exists ())
+  /* If force is set, forcibly create a new invisible console
+ even if a console device already exists. */
+  if (exists () && !force)
 

[PATCH 3/5] Cygwin: pty: Make close_pseudoconsole() be a static member function.

2021-01-15 Thread Takashi Yano via Cygwin-patches
- The function close_pseudoconsole() should be static so that it
  can be safely called in spawn.cc even after the fhandler_pty_slave
  instance has been deleted. That is, there is a problem with the
  current code. This patch fixes the issue.
---
 winsup/cygwin/fhandler.h  |  3 ++-
 winsup/cygwin/fhandler_tty.cc | 22 --
 winsup/cygwin/spawn.cc|  6 --
 3 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 45ac17af2..2077b5245 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2339,12 +2339,13 @@ class fhandler_pty_slave: public fhandler_pty_common
 return fh;
   }
   bool setup_pseudoconsole (STARTUPINFOEXW *si, bool nopcon);
-  void close_pseudoconsole (void);
+  static void close_pseudoconsole (tty *ttyp);
   bool term_has_pcon_cap (const WCHAR *env);
   void set_switch_to_pcon (void);
   void reset_switch_to_pcon (void);
   void mask_switch_to_pcon_in (bool mask);
   void setup_locale (void);
+  tty *get_ttyp () { return (tty *) tc (); } /* Override as public */
 };
 
 #define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit))
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 8ff74cdde..0c92f41d4 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -2563,21 +2563,23 @@ fallback:
   return false;
 }
 
+/* The function close_pseudoconsole() should be static so that it can
+   be called even after the fhandler_pty_slave instance is deleted. */
 void
-fhandler_pty_slave::close_pseudoconsole (void)
+fhandler_pty_slave::close_pseudoconsole (tty *ttyp)
 {
-  if (get_ttyp ()->h_pseudo_console)
+  if (ttyp->h_pseudo_console)
 {
-  get_ttyp ()->wait_pcon_fwd ();
-  HPCON_INTERNAL *hp = (HPCON_INTERNAL *) get_ttyp ()->h_pseudo_console;
+  ttyp->wait_pcon_fwd ();
+  HPCON_INTERNAL *hp = (HPCON_INTERNAL *) ttyp->h_pseudo_console;
   HANDLE tmp = hp->hConHostProcess;
-  ClosePseudoConsole (get_ttyp ()->h_pseudo_console);
+  ClosePseudoConsole (ttyp->h_pseudo_console);
   CloseHandle (tmp);
-  get_ttyp ()->h_pseudo_console = NULL;
-  get_ttyp ()->switch_to_pcon_in = false;
-  get_ttyp ()->pcon_pid = 0;
-  get_ttyp ()->pcon_start = false;
-  get_ttyp ()->do_not_resize_pcon = false;
+  ttyp->h_pseudo_console = NULL;
+  ttyp->switch_to_pcon_in = false;
+  ttyp->pcon_pid = 0;
+  ttyp->pcon_start = false;
+  ttyp->do_not_resize_pcon = false;
 }
 }
 
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 94909df4c..bf1b08057 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -664,6 +664,7 @@ child_info_spawn::worker (const char *prog_arg, const char 
*const *argv,
init_console_handler (myself->ctty > 0);
 
   bool enable_pcon = false;
+  tty *ptys_ttyp = NULL;
   STARTUPINFOEXW si_pcon;
   ZeroMemory (_pcon, sizeof (si_pcon));
   STARTUPINFOW *si_tmp = 
@@ -677,6 +678,7 @@ child_info_spawn::worker (const char *prog_arg, const char 
*const *argv,
  c_flags |= EXTENDED_STARTUPINFO_PRESENT;
  si_tmp = _pcon.StartupInfo;
  enable_pcon = true;
+ ptys_ttyp = ptys_primary->get_ttyp ();
}
}
 
@@ -954,7 +956,7 @@ child_info_spawn::worker (const char *prog_arg, const char 
*const *argv,
  if (enable_pcon)
{
  WaitForSingleObject (pi.hProcess, INFINITE);
- ptys_primary->close_pseudoconsole ();
+ fhandler_pty_slave::close_pseudoconsole (ptys_ttyp);
}
  else if (cons_native)
{
@@ -973,7 +975,7 @@ child_info_spawn::worker (const char *prog_arg, const char 
*const *argv,
  if (waitpid (cygpid, , 0) != cygpid)
res = -1;
  if (enable_pcon)
-   ptys_primary->close_pseudoconsole ();
+   fhandler_pty_slave::close_pseudoconsole (ptys_ttyp);
  else if (cons_native)
{
  fhandler_console::request_xterm_mode_output (true,
-- 
2.30.0



[PATCH 2/5] Cygwin: console: Revise the code to switch xterm mode.

2021-01-15 Thread Takashi Yano via Cygwin-patches
- If application changes the console mode, mode management introduced
  by commit 10d8c278 will be corrupted. For example, stdout of jansi
  v2.0.1 or later is piped to less, jansi resets the xterm mode flag
  ENABLE_VIRTUAL_TERMINA_PROCESSING when jansi is terminated. This
  causes garbled output in less because less needs this flag enabled.
  This patch fixes the issue.
---
 winsup/cygwin/fhandler.h  |  18 -
 winsup/cygwin/fhandler_console.cc | 121 +++---
 winsup/cygwin/select.cc   |  15 +---
 winsup/cygwin/spawn.cc|  35 -
 4 files changed, 127 insertions(+), 62 deletions(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index fe76c0781..45ac17af2 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2048,8 +2048,6 @@ class dev_console
   bool raw_win32_keyboard_mode;
   char cons_rabuf[40];  // cannot get longer than char buf[40] in char_command
   char *cons_rapoi;
-  LONG xterm_mode_input;
-  LONG xterm_mode_output;
   bool cursor_key_app_mode;
 
   inline UINT get_console_cp ();
@@ -2086,11 +2084,19 @@ public:
 input_signalled = 2,
 input_winch = 3
   };
+  struct handle_set_t
+  {
+HANDLE input_handle;
+HANDLE output_handle;
+HANDLE input_mutex;
+HANDLE output_mutex;
+  };
 private:
   static const unsigned MAX_WRITE_CHARS;
   static console_state *shared_console_info;
   static bool invisible_console;
   HANDLE input_mutex, output_mutex;
+  handle_set_t handle_set;
 
   /* Used when we encounter a truncated multi-byte sequence.  The
  lead bytes are stored here and revisited in the next write call. */
@@ -2212,8 +2218,12 @@ private:
   size_t  ();
   size_t  ();
 
-  void request_xterm_mode_input (bool);
-  void request_xterm_mode_output (bool);
+  const handle_set_t *get_handle_set (void) {return _set;}
+  void get_duplicated_handle_set (handle_set_t *p);
+  static void close_handle_set (handle_set_t *p);
+
+  static void request_xterm_mode_input (bool, const handle_set_t *p);
+  static void request_xterm_mode_output (bool, const handle_set_t *p);
 
   friend tty_min * tty_list::get_cttyp ();
 };
diff --git a/winsup/cygwin/fhandler_console.cc 
b/winsup/cygwin/fhandler_console.cc
index 41cac37e6..a4c054e24 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -187,11 +187,7 @@ fhandler_console::set_unit ()
  tty_min_state.setntty (DEV_CONS_MAJOR, console_unit (me));
   devset = (fh_devices) shared_console_info->tty_min_state.getntty ();
   if (created)
-   {
- con.owner = myself->pid;
- con.xterm_mode_input = 0;
- con.xterm_mode_output = 0;
-   }
+   con.owner = myself->pid;
 }
   if (!created && shared_console_info)
 {
@@ -279,60 +275,65 @@ fhandler_console::rabuflen ()
   return con_ra.rabuflen;
 }
 
+/* The function request_xterm_mode_{in,out}put() should be static so that
+   they can be called even after the fhandler_console instance is deleted. */
 void
-fhandler_console::request_xterm_mode_input (bool req)
+fhandler_console::request_xterm_mode_input (bool req, const handle_set_t *p)
 {
   if (con_is_legacy)
 return;
+  WaitForSingleObject (p->input_mutex, INFINITE);
+  DWORD dwMode;
+  GetConsoleMode (p->input_handle, );
   if (req)
 {
-  if (InterlockedExchange (_mode_input, 1) == 0)
+  if (!(dwMode & ENABLE_VIRTUAL_TERMINAL_INPUT))
{
- DWORD dwMode;
- GetConsoleMode (get_handle (), );
  dwMode |= ENABLE_VIRTUAL_TERMINAL_INPUT;
- SetConsoleMode (get_handle (), dwMode);
+ SetConsoleMode (p->input_handle, dwMode);
  if (con.cursor_key_app_mode) /* Restore DECCKM */
-   WriteConsoleW (get_output_handle (), L"\033[?1h", 5, NULL, 0);
+   {
+ request_xterm_mode_output (true, p);
+ WriteConsoleW (p->output_handle, L"\033[?1h", 5, NULL, 0);
+   }
}
 }
   else
 {
-  if (InterlockedExchange (_mode_input, 0) == 1)
+  if (dwMode & ENABLE_VIRTUAL_TERMINAL_INPUT)
{
- DWORD dwMode;
- GetConsoleMode (get_handle (), );
  dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT;
- SetConsoleMode (get_handle (), dwMode);
+ SetConsoleMode (p->input_handle, dwMode);
}
 }
+  ReleaseMutex (p->input_mutex);
 }
 
 void
-fhandler_console::request_xterm_mode_output (bool req)
+fhandler_console::request_xterm_mode_output (bool req, const handle_set_t *p)
 {
   if (con_is_legacy)
 return;
+  WaitForSingleObject (p->output_mutex, INFINITE);
+  DWORD dwMode;
+  GetConsoleMode (p->output_handle, );
   if (req)
 {
-  if (InterlockedExchange (_mode_output, 1) == 0)
+  if (!(dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING))
{
- DWORD dwMode;
- GetConsoleMode (get_output_handle (), );
  dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
- SetConsoleMode (get_output_handle 

[PATCH 1/5] Cygwin: pty: Add workaround for rlwrap 0.40 or later.

2021-01-15 Thread Takashi Yano via Cygwin-patches
- The workaround for rlwrap introduced by commit 8199b0cc does not
  take effect for rlwrap 0.40 or later. This patch add a workaround
  for rlwrap 0.40 or later as well.
---
 winsup/cygwin/fhandler_tty.cc | 5 +
 1 file changed, 5 insertions(+)

diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 77f7bfe43..8ff74cdde 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1720,6 +1720,11 @@ int
 fhandler_pty_master::tcgetattr (struct termios *t)
 {
   *t = cygwin_shared->tty[get_minor ()]->ti;
+  /* Workaround for rlwrap v0.40 or later */
+  if (get_ttyp ()->pcon_start)
+t->c_lflag &= ~(ICANON | ECHO);
+  if (get_ttyp ()->h_pseudo_console)
+t->c_iflag &= ~ICRNL;
   return 0;
 }
 
-- 
2.30.0



[PATCH 0/5] Some revisions for pty and console code.

2021-01-15 Thread Takashi Yano via Cygwin-patches
Takashi Yano (5):
  Cygwin: pty: Add workaround for rlwrap 0.40 or later.
  Cygwin: console: Revise the code to switch xterm mode.
  Cygwin: pty: Make close_pseudoconsole() be a static member function.
  Cygwin: pty: Prevent pty from changing code page of parent console.
  Cygwin: pty: Make master thread functions be static.

 winsup/cygwin/fhandler.h  |  56 --
 winsup/cygwin/fhandler_console.cc | 159 +++-
 winsup/cygwin/fhandler_tty.cc | 305 +++---
 winsup/cygwin/select.cc   |  15 +-
 winsup/cygwin/spawn.cc|  42 +++-
 winsup/cygwin/tty.cc  |   2 +
 winsup/cygwin/tty.h   |   2 +
 7 files changed, 440 insertions(+), 141 deletions(-)

-- 
2.30.0



Aw: Re: Re: Re: Recompilation problems opencv (python3-cv2 --> python3.8)

2021-01-15 Thread wilhelm-eger--- via Cygwin
Gesendet: Donnerstag, 14. Januar 2021 um 23:52 Uhr

> Please try by downloading the complete Cygwin source package, and try a 
> vanilla
> rebuild first with zero changes, then change only the .cygport VERSION= to the
> latest, rebuild, and fix any problems with that as you go.

I have done the following

mkdir opencv
cd opencv
git clone http://cygwin.com/git/cygwin-packages/opencv.git .
cygport opencv.cygport fetch
cygport opencv.cygport all

Same error.

Is there any other location where I could get the opencv source package from?

Btw. there is no need to change to another Version, I just want to have cv2 
also in python3.8 working. From what I have experienced with this package I 
assume that this would also not compile with python3.6 atm. Seems to be a cmake 
or gcc error to me.


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


[ANNOUNCEMENT] Updated: flint-2.7.0-1

2021-01-15 Thread Marco Atzeri via Cygwin-announce via Cygwin

Version 2.7.0-1  of packages

   flint(source only)
   libflint-devel
   libflint15   (API bump)

are available in the Cygwin distribution:

CHANGES
Latest upstream version
http://flintlib.org/news.html

DESCRIPTION
FLINT: Fast Library for Number Theory
It supports arithmetic with numbers, polynomials, power series
and matrices over many base rings,

HOMEPAGE
http://flintlib.org/

Marco Atzeri

If you have questions or comments, please send them to the
cygwin mailing list at: cygwin (at) cygwin (dot) com .
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Updated: flint-2.7.0-1

2021-01-15 Thread Marco Atzeri via Cygwin-announce

Version 2.7.0-1  of packages

   flint(source only)
   libflint-devel
   libflint15   (API bump)

are available in the Cygwin distribution:

CHANGES
Latest upstream version
http://flintlib.org/news.html

DESCRIPTION
FLINT: Fast Library for Number Theory
It supports arithmetic with numbers, polynomials, power series
and matrices over many base rings,

HOMEPAGE
http://flintlib.org/

Marco Atzeri

If you have questions or comments, please send them to the
cygwin mailing list at: cygwin (at) cygwin (dot) com .