public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Help needed with wxWidgets3.1 tests compilation error
@ 2022-01-20 17:10 Hamish McIntyre-Bhatty
  2022-01-20 20:38 ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Hamish McIntyre-Bhatty @ 2022-01-20 17:10 UTC (permalink / raw)
  To: cygwin-apps

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

Hi there,

I've been having trouble compiling the unit tests for wxWidgets3.1-3.1.5 
on Cygwin. The same tests build just fine on my Linux Mint 20.3 install, 
however that is using GCC 9.3.0 instead of Cygwin's 11.2.0.

Attached is the full build log, but I will also point out my ideas about 
particular issues here.

Note: -Werror=format-security is used in the Makefile. I couldn't find 
exactly what this does, but I'm probably looking in the wrong place - 
the manpage. Perhaps the following could also be explained by 
differences from GCC 9 to 11?

The first is:

In file included from /usr/include/unistd.h:4,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/usr/include/sys/unistd.h:23:9: error: redundant redeclaration of ‘int 
chmod(const char*, mode_t)’ in same scope [-Werror=redundant-decls]
    23 | int     chmod (const char *__path, mode_t __mode);
       |         ^~~~~
In file included from /usr/include/sys/_default_fcntl.h:211,
                  from /usr/include/sys/fcntl.h:3,
                  from /usr/include/fcntl.h:12,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:83:
/usr/include/sys/stat.h:137:9: note: previous declaration of ‘int 
chmod(const char*, mode_t)’
   137 | int     chmod (const char *__path, mode_t __mode );
       |         ^~~~~

This doesn't happen on my Linux Mint 20.3 (Ubuntu 20.04) host, so I'm 
assuming this is something to do with the standard library?

Next is:

In file included from /usr/include/unistd.h:4,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/usr/include/sys/unistd.h:179:9: error: redundant redeclaration of ‘int 
pthread_atfork(void (*)(), void (*)(), void (*)())’ in same scope 
[-Werror=redundant-decls]
   179 | int     pthread_atfork (void (*)(void), void (*)(void), void 
(*)(void));
       |         ^~~~~~~~~~~~~~
In file included from 
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35,
                  from 
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr.h:148,
                  from 
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ext/atomicity.h:35,
                  from 
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:39,
                  from 
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iomanip:40,
                  from 
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:63:
/usr/include/pthread.h:65:5: note: previous declaration of ‘int 
pthread_atfork(void (*)(), void (*)(), void (*)())’
    65 | int pthread_atfork (void (*)(void), void (*)(void), void 
(*)(void));
       |     ^~~~~~~~~~~~~~

Ditto.

Then there are some wxwidgets-specific ones, but I'll make a separate 
thread for those because I have an idea about what might be causing 
them. I'll probably need to ask the wxWidgets people.

Hopefully someone here with more experience can help.

Also of note, is that Cygwin is several times slower at compiling pretty 
much everything for me. Does anyone know if this is GCC 9 vs 11 speed, 
or running Cygwin in Windows 11 in KVM, or something else? I am running 
on AMD Ryzen 3000, if that has anything to do with it.

Hamish

[-- Attachment #2: wxwidgets-gtk2-tests-errors.txt --]
[-- Type: text/plain, Size: 14167 bytes --]

/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/build/gtk2/bk-deps g++ -c -o test_allheaders_allheaders.o  -I/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/build/gtk2/lib/wx/include/gtk2-unicode-3.1 -I/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -D_REENTRANT  -D__WXGTK__      -I/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests -DWXUSINGDLL -I/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/../samples -I/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/3rdparty/catch/include -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -D_REENTRANT -I/usr/include/gtk-unix-print-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/atk-1.0 -I/usr/include/SDL2 -I/usr/include/libsecret-1 -ggdb -O2 -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fno-strict-aliasing -fdebug-prefix-map=/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/build=/usr/src/debug/wxWidgets3.1-3.1.5-1 -fdebug-prefix-map=/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5=/usr/src/debug/wxWidgets3.1-3.1.5-1 -I/usr/include/webkitgtk-1.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/gstreamer-1.0     -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fno-strict-aliasing -fdebug-prefix-map=/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/build=/usr/src/debug/wxWidgets3.1-3.1.5-1 -fdebug-prefix-map=/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5=/usr/src/debug/wxWidgets3.1-3.1.5-1 /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp
In file included from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/defs.h:45,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/wxprec.h:12,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:4,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/platform.h:262: warning: "_GNU_SOURCE" redefined
  262 | #        define _GNU_SOURCE
      |
In file included from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:55:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/build/gtk2/lib/wx/include/gtk2-unicode-3.1/wx/setup.h:44: note: this is the location of the previous definition
   44 | #define _GNU_SOURCE 1
      |
In file included from /usr/include/unistd.h:4,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/usr/include/sys/unistd.h:23:9: error: redundant redeclaration of ‘int chmod(const char*, mode_t)’ in same scope [-Werror=redundant-decls]
   23 | int     chmod (const char *__path, mode_t __mode);
      |         ^~~~~
In file included from /usr/include/sys/_default_fcntl.h:211,
                 from /usr/include/sys/fcntl.h:3,
                 from /usr/include/fcntl.h:12,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:83:
/usr/include/sys/stat.h:137:9: note: previous declaration of ‘int chmod(const char*, mode_t)’
  137 | int     chmod (const char *__path, mode_t __mode );
      |         ^~~~~
In file included from /usr/include/unistd.h:4,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/usr/include/sys/unistd.h:80:9: error: redundant redeclaration of ‘int fchmod(int, mode_t)’ in same scope [-Werror=redundant-decls]
   80 | int     fchmod (int __fildes, mode_t __mode);
      |         ^~~~~~
In file included from /usr/include/sys/_default_fcntl.h:211,
                 from /usr/include/sys/fcntl.h:3,
                 from /usr/include/fcntl.h:12,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:83:
/usr/include/sys/stat.h:138:9: note: previous declaration of ‘int fchmod(int, mode_t)’
  138 | int     fchmod (int __fd, mode_t __mode);
      |         ^~~~~~
In file included from /usr/include/unistd.h:4,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/usr/include/sys/unistd.h:179:9: error: redundant redeclaration of ‘int pthread_atfork(void (*)(), void (*)(), void (*)())’ in same scope [-Werror=redundant-decls]
  179 | int     pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
      |         ^~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr.h:148,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ext/atomicity.h:35,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:39,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iomanip:40,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:63:
/usr/include/pthread.h:65:5: note: previous declaration of ‘int pthread_atfork(void (*)(), void (*)(), void (*)())’
   65 | int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
      |     ^~~~~~~~~~~~~~
In file included from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/html/helpctrl.h:19,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/help.h:27,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cshelp.h:18,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.h:85,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:435:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/html/helpfrm.h:74:50: error: declaration of ‘wxWindowID’ shadows a global declaration [-Werror=shadow]
   74 |     wxHtmlHelpFrame(wxWindow* parent, wxWindowID wxWindowID,
      |                                       ~~~~~~~~~~~^~~~~~~~~~
In file included from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/wxprec.h:12,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:4,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/defs.h:1965:13: note: shadowed declaration is here
 1965 | typedef int wxWindowID;
      |             ^~~~~~~~~~
In file included from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/tls.h:60,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.h:355,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:435:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/unix/tls.h: In constructor ‘wxTlsKey::wxTlsKey(wxTlsDestructorFunction)’:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/unix/tls.h:28:21: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
   28 |             m_key = 0;
      |                     ^
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/unix/tls.h: In member function ‘bool wxTlsKey::IsOk() const’:
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/unix/tls.h:32:41: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
   32 |     bool IsOk() const { return m_key != 0; }
      |                                         ^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/deque:67,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/queue:60,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/msgqueue.h:24,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.h:239,
                 from /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:435:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_deque.h: In instantiation of ‘std::_Deque_iterator<const wxModalExpectation*, const wxModalExpectation*&, const wxModalExpectation**>::difference_type std::operator-(const _Self&, const _Self&)’:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_deque.h:1233:40:   required from ‘std::deque<_Tp, _Alloc>::size_type std::deque<_Tp, _Alloc>::size() const [with _Tp = const wxModalExpectation*; _Alloc = std::allocator<const wxModalExpectation*>; std::deque<_Tp, _Alloc>::size_type = long unsigned int]’
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/deque.tcc:489:6:   required from ‘void std::deque<_Tp, _Alloc>::_M_push_back_aux(_Args&& ...) [with _Args = {const wxModalExpectation*}; _Tp = const wxModalExpectation*; _Alloc = std::allocator<const wxModalExpectation*>]’
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/deque.tcc:176:20:   required from ‘std::deque<_Tp, _Alloc>::reference std::deque<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {const wxModalExpectation*}; _Tp = const wxModalExpectation*; _Alloc = std::allocator<const wxModalExpectation*>; std::deque<_Tp, _Alloc>::reference = const wxModalExpectation*&]’
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_deque.h:1511:21:   required from ‘void std::deque<_Tp, _Alloc>::push_back(std::deque<_Tp, _Alloc>::value_type&&) [with _Tp = const wxModalExpectation*; _Alloc = std::allocator<const wxModalExpectation*>; std::deque<_Tp, _Alloc>::value_type = const wxModalExpectation*]’
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_queue.h:271:20:   required from ‘void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = const wxModalExpectation*; _Sequence = std::deque<const wxModalExpectation*, std::allocator<const wxModalExpectation*> >; std::queue<_Tp, _Sequence>::value_type = const wxModalExpectation*]’
/home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/testing.h:350:28:   required from here
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_deque.h:356:58: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
  356 |           * (__x._M_node - __y._M_node - int(__x._M_node != 0))
      |                                              ~~~~~~~~~~~~^~~~
cc1plus: some warnings being treated as errors
make: *** [Makefile:1189: test_allheaders_allheaders.o] Error 1

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

* Re: Help needed with wxWidgets3.1 tests compilation error
  2022-01-20 17:10 Help needed with wxWidgets3.1 tests compilation error Hamish McIntyre-Bhatty
@ 2022-01-20 20:38 ` Brian Inglis
  2022-01-21 10:08   ` Hamish McIntyre-Bhatty
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Inglis @ 2022-01-20 20:38 UTC (permalink / raw)
  To: cygwin-apps

On 2022-01-20 10:10, Hamish McIntyre-Bhatty wrote:
> I've been having trouble compiling the unit tests for wxWidgets3.1-3.1.5 
> on Cygwin. The same tests build just fine on my Linux Mint 20.3 install, 
> however that is using GCC 9.3.0 instead of Cygwin's 11.2.0.
> 
> Attached is the full build log, but I will also point out my ideas about 
> particular issues here.
> 
> Note: -Werror=format-security is used in the Makefile. I couldn't find 
> exactly what this does, but I'm probably looking in the wrong place - 
> the manpage. Perhaps the following could also be explained by 
> differences from GCC 9 to 11?

I check first as in `info GCC Wformat-security` should only care about 
*printf string variables without using a separate format string.

> The first is:
> 
> In file included from /usr/include/unistd.h:4,
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433: 
> 
> /usr/include/sys/unistd.h:23:9: error: redundant redeclaration of ‘int 
> chmod(const char*, mode_t)’ in same scope [-Werror=redundant-decls]
>     23 | int     chmod (const char *__path, mode_t __mode);
>        |         ^~~~~
> In file included from /usr/include/sys/_default_fcntl.h:211,
>                   from /usr/include/sys/fcntl.h:3,
>                   from /usr/include/fcntl.h:12,
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:83: 
> 
> /usr/include/sys/stat.h:137:9: note: previous declaration of ‘int 
> chmod(const char*, mode_t)’
>    137 | int     chmod (const char *__path, mode_t __mode );
>        |         ^~~~~
> 
> This doesn't happen on my Linux Mint 20.3 (Ubuntu 20.04) host, so I'm 
> assuming this is something to do with the standard library?
> 
> Next is:
> 
> In file included from /usr/include/unistd.h:4,
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5, 
> 
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433: 
> 
> /usr/include/sys/unistd.h:179:9: error: redundant redeclaration of ‘int 
> pthread_atfork(void (*)(), void (*)(), void (*)())’ in same scope 
> [-Werror=redundant-decls]
>    179 | int     pthread_atfork (void (*)(void), void (*)(void), void 
> (*)(void));
>        |         ^~~~~~~~~~~~~~
> In file included from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35, 
> 
>                   from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr.h:148, 
> 
>                   from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ext/atomicity.h:35,
>                   from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:39,
>                   from 
> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iomanip:40,
>                   from 
> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:63: 
> 
> /usr/include/pthread.h:65:5: note: previous declaration of ‘int 
> pthread_atfork(void (*)(), void (*)(), void (*)())’
>     65 | int pthread_atfork (void (*)(void), void (*)(void), void 
> (*)(void));
>        |     ^~~~~~~~~~~~~~
> 
> Ditto.

Looking at chmod(3p), pthread_atfork(3p), pthread.h(0p) sys_stat.h(0p), 
unistd.h(0p) those definitions should *NOT* normally be accessible from 
unistd.h so there should be no conflict, as POSIX specifies what is 
visible.
Perhaps they are there for compatibility with older systems like BSD or 
Solaris and should be suppressed when newer feature macros are defined 
or specific legacy system macros are not defined?

> Also of note, is that Cygwin is several times slower at compiling pretty 
> much everything for me. Does anyone know if this is GCC 9 vs 11 speed, 
> or running Cygwin in Windows 11 in KVM, or something else? I am running 
> on AMD Ryzen 3000, if that has anything to do with it.

VM is always slower than native, Windows than Linux, Cygwin than 
Windows, maybe see if Cygwin under Wine is faster than under Windows in 
KVM?
Windows 11 may have more instrumentation than 10 especially if Developer 
or Insider edition.
Windows performance profile, desktop/laptop busses, CPU count, MT, 
speed, memory, SSD/HDD will also have effects.

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

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

* Re: Help needed with wxWidgets3.1 tests compilation error
  2022-01-20 20:38 ` Brian Inglis
@ 2022-01-21 10:08   ` Hamish McIntyre-Bhatty
  0 siblings, 0 replies; 3+ messages in thread
From: Hamish McIntyre-Bhatty @ 2022-01-21 10:08 UTC (permalink / raw)
  To: cygwin-apps

On 20/01/2022 20:38, Brian Inglis wrote:
> On 2022-01-20 10:10, Hamish McIntyre-Bhatty wrote:
>> I've been having trouble compiling the unit tests for 
>> wxWidgets3.1-3.1.5 on Cygwin. The same tests build just fine on my 
>> Linux Mint 20.3 install, however that is using GCC 9.3.0 instead of 
>> Cygwin's 11.2.0.
>>
>> Attached is the full build log, but I will also point out my ideas 
>> about particular issues here.
>>
>> Note: -Werror=format-security is used in the Makefile. I couldn't find 
>> exactly what this does, but I'm probably looking in the wrong place - 
>> the manpage. Perhaps the following could also be explained by 
>> differences from GCC 9 to 11?
> 
> I check first as in `info GCC Wformat-security` should only care about 
> *printf string variables without using a separate format string.


Ah okay, I guess that doesn't explain the 
-Werror=zero-as-null-pointer-constant errors later. I guess that might 
be a GCC default change.

> 
>> The first is:
>>
>> In file included from /usr/include/unistd.h:4,
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433: 
>>
>> /usr/include/sys/unistd.h:23:9: error: redundant redeclaration of ‘int 
>> chmod(const char*, mode_t)’ in same scope [-Werror=redundant-decls]
>>     23 | int     chmod (const char *__path, mode_t __mode);
>>        |         ^~~~~
>> In file included from /usr/include/sys/_default_fcntl.h:211,
>>                   from /usr/include/sys/fcntl.h:3,
>>                   from /usr/include/fcntl.h:12,
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:83: 
>>
>> /usr/include/sys/stat.h:137:9: note: previous declaration of ‘int 
>> chmod(const char*, mode_t)’
>>    137 | int     chmod (const char *__path, mode_t __mode );
>>        |         ^~~~~
>>
>> This doesn't happen on my Linux Mint 20.3 (Ubuntu 20.04) host, so I'm 
>> assuming this is something to do with the standard library?
>>
>> Next is:
>>
>> In file included from /usr/include/unistd.h:4,
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/filefn.h:23, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/utils.h:20, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/cursor.h:75, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/event.h:22, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/include/wx/evtloop.h:14, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/testprec.h:5, 
>>
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:433: 
>>
>> /usr/include/sys/unistd.h:179:9: error: redundant redeclaration of 
>> ‘int pthread_atfork(void (*)(), void (*)(), void (*)())’ in same scope 
>> [-Werror=redundant-decls]
>>    179 | int     pthread_atfork (void (*)(void), void (*)(void), void 
>> (*)(void));
>>        |         ^~~~~~~~~~~~~~
>> In file included from 
>> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35, 
>>
>>                   from 
>> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/gthr.h:148, 
>>
>>                   from 
>> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ext/atomicity.h:35,
>>                   from 
>> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:39,
>>                   from 
>> /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iomanip:40,
>>                   from 
>> /home/Hamis/wxwidgets3.1/wxWidgets3.1-3.1.5-1.x86_64/src/wxWidgets-3.1.5/tests/allheaders.cpp:63: 
>>
>> /usr/include/pthread.h:65:5: note: previous declaration of ‘int 
>> pthread_atfork(void (*)(), void (*)(), void (*)())’
>>     65 | int pthread_atfork (void (*)(void), void (*)(void), void 
>> (*)(void));
>>        |     ^~~~~~~~~~~~~~
>>
>> Ditto.
> 
> Looking at chmod(3p), pthread_atfork(3p), pthread.h(0p) sys_stat.h(0p), 
> unistd.h(0p) those definitions should *NOT* normally be accessible from 
> unistd.h so there should be no conflict, as POSIX specifies what is 
> visible.
> Perhaps they are there for compatibility with older systems like BSD or 
> Solaris and should be suppressed when newer feature macros are defined 
> or specific legacy system macros are not defined?

Perhaps, can anyone else offer any thoughts. I might go ahead and 
compare the headers from my Linux install to those on Cygwin. Perhaps I 
need to define a special macro for Cygwin, I guess that's the easiest 
fix with least possibility of breaking something else?

> 
>> Also of note, is that Cygwin is several times slower at compiling 
>> pretty much everything for me. Does anyone know if this is GCC 9 vs 11 
>> speed, or running Cygwin in Windows 11 in KVM, or something else? I am 
>> running on AMD Ryzen 3000, if that has anything to do with it.
> 
> VM is always slower than native, Windows than Linux, Cygwin than 
> Windows, maybe see if Cygwin under Wine is faster than under Windows in 
> KVM?
> Windows 11 may have more instrumentation than 10 especially if Developer 
> or Insider edition.
> Windows performance profile, desktop/laptop busses, CPU count, MT, 
> speed, memory, SSD/HDD will also have effects.
> 

Oh that's a good idea, I forgot Cygwin finally at least semi works on 
WINE now. I'll see how fast that is. I don't think I want to use that as 
a build environment just in case there's a deficiency in WINE that 
matters during the build, but it might be useful for testing.

Hamish

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 17:10 Help needed with wxWidgets3.1 tests compilation error Hamish McIntyre-Bhatty
2022-01-20 20:38 ` Brian Inglis
2022-01-21 10:08   ` Hamish McIntyre-Bhatty

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