Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130154

[CYGWIN] qtbase: build failed, pipe2 undeclared

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.8.0
    • Core: Other
    • None
    • Windows

    Description

      When compiling version 6.8.0, I got this error message:

      In file included from qt-build/include/QtCore/6.8.0/QtCore/private/qcore_unix_p.h:1,
                       from qtbase-everywhere-src-6.8.0/src/corelib/global/qlogging.cpp:61:
      qtbase-everywhere-src-6.8.0/src/corelib/kernel/qcore_unix_p.h: In function ‘int qt_safe_pipe(int*, int)’:
      qtbase-everywhere-src-6.8.0/src/corelib/kernel/qcore_unix_p.h:233:14: error: ‘::pipe2’ has not been declared; did you mean ‘pipe’?
        233 |     return ::pipe2(pipefd, flags); // pipe2 is documented not to return EINTR
            |              ^~~~~
            |              pipe
      

      Actually, the error happens because pipe2() is available only when _GNU_SOURCE is defined:

      https://man7.org/linux/man-pages/man2/pipe.2.html

      CYGWIN doesn't define this macro by default, so this is reason because the error happens.
      Unless it escaped to my attention, I have not found a way to define _GNU_SOURCE at configure time, so that macro probably just needs to be declared in the right source header, as it has been already done into other .h files.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            carlo-bramini Carlo Bramini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes