From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) by sourceware.org (Postfix) with ESMTPS id 0D3BC3858407 for ; Thu, 20 Jan 2022 20:38:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D3BC3858407 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id AcplnvLDkyr5HAeCfnwZf1; Thu, 20 Jan 2022 20:38:41 +0000 Received: from [192.168.1.105] ([68.147.0.90]) by cmsmtp with ESMTP id AeCenRpiIviGhAeCfng3M7; Thu, 20 Jan 2022 20:38:41 +0000 X-Authority-Analysis: v=2.4 cv=IaOU5Ema c=1 sm=1 tr=0 ts=61e9c851 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 a=IkcTkHD0fZMA:10 a=F21sVn95C_7nIZjZP1EA:9 a=QEXdDO2ut3YA:10 Message-ID: Date: Thu, 20 Jan 2022 13:38:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Reply-To: cygwin-apps@cygwin.com Subject: Re: Help needed with wxWidgets3.1 tests compilation error Content-Language: en-CA To: cygwin-apps@cygwin.com References: From: Brian Inglis Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfIT4sLTlyoKagfJYGD7WWd8EIOW1ZejluNvBMk/o6XxPHbnwC685XZt/9UWAhvNw7zqAhFwU3/WZDDrI1UTPYg7VSZuPszyxsL/rRSOVPa8NalTSHO/P 69uEsMiE3G8uuRw8g0dr3WCYkRWivsZm22CxrUoiZ7WtHt9S6J+ltPczM9rIH/HfE0VO4+TcSn9sx8jCrCdJogV9J5WPK4SRZ8s= X-Spam-Status: No, score=-1159.2 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2022 20:38:44 -0000 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.]