public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* qt terminal for gnuplot on cygwin workaround)
       [not found] <1001697724.215333.1639890003868.JavaMail.yahoo.ref@mail.yahoo.co.jp>
@ 2021-12-19  5:00 ` Tatsuro MATSUOKA
  2022-01-10  6:35   ` Mark Geisert
  0 siblings, 1 reply; 3+ messages in thread
From: Tatsuro MATSUOKA @ 2021-12-19  5:00 UTC (permalink / raw)
  To: cygwin

A workaround for qt enables qt termnal on Cygwin is shown by  Enrico Forestieri 
https://sourceforge.net/p/gnuplot/mailman/gnuplot-beta/thread/16092.81463.qm@web103110.mail.kks.yahoo.co.jp/

--- a/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
+++ b/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
@@ -239,7 +239,7 @@ void QLocalSocket::connectToServer(OpenM
     }

     // create the socket
-    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0, 
O_NONBLOCK))) {
+    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 
0))) {
         d->errorOccurred(UnsupportedSocketOperationError,
                        
QLatin1String("QLocalSocket::connectToServer"));
         return;

I myself generate library libQt5Network as libQt5Network-gnuplot and used gnuplot  build.
I dp not know that the modification avove is valid but enables me to use qt terminal on cygwin.

Tatsuro


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

* Re: qt terminal for gnuplot on cygwin workaround)
  2021-12-19  5:00 ` qt terminal for gnuplot on cygwin workaround) Tatsuro MATSUOKA
@ 2022-01-10  6:35   ` Mark Geisert
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Geisert @ 2022-01-10  6:35 UTC (permalink / raw)
  To: cygwin

Hi Tatsuro,

Tatsuro MATSUOKA wrote:
> A workaround for qt enables qt termnal on Cygwin is shown by  Enrico Forestieri
> https://sourceforge.net/p/gnuplot/mailman/gnuplot-beta/thread/16092.81463.qm@web103110.mail.kks.yahoo.co.jp/
> 
> --- a/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
> +++ b/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
> @@ -239,7 +239,7 @@ void QLocalSocket::connectToServer(OpenM
>       }
> 
>       // create the socket
> -    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0,
> O_NONBLOCK))) {
> +    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM,
> 0))) {
>           d->errorOccurred(UnsupportedSocketOperationError,
>                          
> QLatin1String("QLocalSocket::connectToServer"));
>           return;
> 
> I myself generate library libQt5Network as libQt5Network-gnuplot and used gnuplot  build.
> I dp not know that the modification avove is valid but enables me to use qt terminal on cygwin.

Apologies for the late response.  As quoted above, the patch changes the number of 
args passed to qt_safe_socket() so maybe that's incorrect?

In any case I think the intent was to change the call from nonblocking to 
blocking.  That seems likely to interfere with other socket or terminal I/O that 
may be expected asynchronously.

I investigated the gnuplot vs Qterm problem several years ago and found the root 
cause: deep within the Qt networking code a call to connect() wasn't expecting the 
error EINPROGRESS to be returned.  POSIX decrees this error when a nonblocking 
connect() cannot immediately be completed.  I opened a Qt BUG for this, but the Qt 
folks declined to fix.  I then tried making a Cygwin-only patch but was stymied by 
my inability to build Qt itself due to bit rot.

If we have or can get a recent Qt build completed, I can supply a patch to fix the 
issue.

..mark

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

* Re: qt terminal for gnuplot on cygwin workaround)
       [not found] <1418916945.1256064.1641807277537.JavaMail.yahoo.ref@mail.yahoo.co.jp>
@ 2022-01-10  9:34 ` Tatsuro MATSUOKA
  0 siblings, 0 replies; 3+ messages in thread
From: Tatsuro MATSUOKA @ 2022-01-10  9:34 UTC (permalink / raw)
  To: mark, cygwin

> ----- Original Message ----- 
> From: "Mark Geisert" 
> To: "cygwin
> Date: 2022/01/10 月 15:36
> Subject: Re: qt terminal for gnuplot on cygwin workaround)
> Hi Tatsuro,
> 
> Tatsuro MATSUOKA wrote:
> > A workaround for qt enables qt termnal on Cygwin is shown by  Enrico Forestieri
> > https://sourceforge.net/p/gnuplot/mailman/gnuplot-beta/thread/16092.81463.qm@web103110.mail.kks.yahoo.co.jp/
> > 
> > --- a/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
> > +++ b/qtbase-everywhere-src-5.10.1/src/network/socket/qlocalsocket_unix.cpp
> > @@ -239,7 +239,7 @@ void QLocalSocket::connectToServer(OpenM
> >       }
> > 
> >       // create the socket
> > -    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0,
> > O_NONBLOCK))) {
> > +    if (-1 == (d->connectingSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM,
> > 0))) {
> >           d->errorOccurred(UnsupportedSocketOperationError,
> >                          
> > QLatin1String("QLocalSocket::connectToServer"));
> >           return;
> > 
> > I myself generate library libQt5Network as libQt5Network-gnuplot and used gnuplot  build.
> > I dp not know that the modification avove is valid but enables me to use qt terminal on cygwin.
> 
> Apologies for the late response.  As quoted above, the patch changes the number of 
> args passed to qt_safe_socket() so maybe that's incorrect?
> 
> In any case I think the intent was to change the call from nonblocking to 
> blocking.  That seems likely to interfere with other socket or terminal I/O that 
> may be expected asynchronously.
> 
> I investigated the gnuplot vs Qterm problem several years ago and found the root 
> cause: deep within the Qt networking code a call to connect() wasn't expecting the 
> error EINPROGRESS to be returned.  POSIX decrees this error when a nonblocking 
> connect() cannot immediately be completed.  I opened a Qt BUG for this, but the Qt 
> folks declined to fix.  I then tried making a Cygwin-only patch but was stymied by 
> my inability to build Qt itself due to bit rot.
> 
> If we have or can get a recent Qt build completed, I can supply a patch to fix the 
> issue.
> 
> ..mark
I undersstand the current states for gnuplot and qt.
I am now wirking in my home and can use very old note PC.
So building of qt is very time comsuming jobs so I cannot to try.

I only build old qt-5.8.4 using tools by cugport.
Qt-5.9.4 cannot be built by gcc-11 and I downgrade gcc from 11 to 10.

I could only som dll files including cygQt5Network and used for patch work.

When I will use the recent PC, I will try the recent Qt build.(qt6 ?)

Tatsuro


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

end of thread, other threads:[~2022-01-10  9:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1001697724.215333.1639890003868.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2021-12-19  5:00 ` qt terminal for gnuplot on cygwin workaround) Tatsuro MATSUOKA
2022-01-10  6:35   ` Mark Geisert
     [not found] <1418916945.1256064.1641807277537.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-10  9:34 ` Tatsuro MATSUOKA

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