Build problems using wxWidgets-2.8.10 / gcc-4.3.4 / cygwin-1.7.1 : multiple definitions of function select()

2010-01-14 Thread Schwerzmann Stephan
Hello all,

I'm upgrading to 1.7.1 from the previous version which I was 
pretty good at keeping up to date; until recently, I had this 
combo in flawless use:
- wxWidgets-2.8.10 / gcc-3.4.4 / cygwin-1.5.25 / WinXP-SP3


The new combo
- wxWidgets-2.8.10 / gcc-4.3.4 / cygwin-1.7.1 / WinXP-SP3
Is giving me a build error for wxWidgets-2.8.10, which I started
discussing at
http://trac.wxwidgets.org/ticket/11626
where the issue is rated as confirmed build error

cite
All my variants of build attempts gave me consistently this error:

$ make BUILD=release SHARED=0
/var/tmp/wxWidgets-2.8.10/bk-deps g++ -c -o baselib_msw_utils.o
-DWXMSW -I./src/tiff -I./src/jpeg -I./src/png -DwxUSE_GUI=0
-DwxUSE_BASE=1 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-I/var/tmp/wxWidgets-2.8.10/lib/wx/include/msw-ansi-release-static-2.8
-I./include -Wall -Wundef -Wno-ctor-dtor-privacy -O2
-fno-strict-aliasing ./src/msw/utils.cpp
In file included from ./src/msw/utils.cpp:56:
 
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winsock.h:4
79: error: declaration of C function 'int select(int, _types_fd_set*,
_types_fd_set*, _types_fd_set*, const timeval*)' conflicts with
/usr/include/sys/select.h:31: error: previous declaration 'int
select(int, _types_fd_set*, _types_fd_set*, _types_fd_set*, timeval*)'
here
./src/msw/utils.cpp: In function 'const wxChar*
wxGetHomeDir(wxString*)':
./src/msw/utils.cpp:407: warning: 'int
cygwin_conv_to_full_win32_path(const char*, char*)' is deprecated
(declared at /usr/include/sys/cygwin.h:52)
./src/msw/utils.cpp:407: warning: 'int
cygwin_conv_to_full_win32_path(const char*, char*)' is deprecated
(declared at /usr/include/sys/cygwin.h:52)
make: *** [baselib_msw_utils.o] Error 1

$

/cite
(do I need to duplicate more details here, or is that link fine?)


It looks like something is mixing bad between cygwins 
sys/select.h and w32api/winsock.h for the declaration of 
function select()


As I do not clearly see thru the problem, I'm asking here
for advice on how to correct what to get wxWidget compiled under
the current cygwin version. Thanks in advance.

Stephan

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



Re: Build problems using wxWidgets-2.8.10 / gcc-4.3.4 / cygwin-1.7.1 : multiple definitions of function select()

2010-01-14 Thread Greg Chicares
On 2010-01-14 10:15Z, Schwerzmann Stephan wrote:
  
 /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winsock.h:4
 79: error: declaration of C function 'int select(int, _types_fd_set*,
 _types_fd_set*, _types_fd_set*, const timeval*)' conflicts with
 /usr/include/sys/select.h:31: error: previous declaration 'int
 select(int, _types_fd_set*, _types_fd_set*, _types_fd_set*, timeval*)'

As to whether select() takes a const or non-const timeval* argument:

  http://msdn.microsoft.com/en-us/library/ms740141%28VS.85%29.aspx
msdn says it's const, so that's what include/w32api must do

  http://www.opengroup.org/onlinepubs/007908799/xsh/select.html
posix says it isn't const, so that's what /usr/include must do

So you can't combine them. See also:
  http://cygwin.com/ml/cygwin/2008-08/msg00133.html
| You're getting a bunch of errors because incluing winsock2.h causes lots
| of namespace clashes.  And how could it not?  It provides a different
| and incompatible set of definitions for the sockets API which is not
| compatible with the standard POSIX definitions in the Cygwin headers.
| Again: the problem is that you should not attempt to use the Winsock API
| from a Cygwin application.

 ./src/msw/utils.cpp:407: warning: 'int
 cygwin_conv_to_full_win32_path(const char*, char*)' is deprecated

http://www.cygwin.com/ml/cygwin-cvs/2008-q1/msg00111.html
| (cygwin_conv_to_win32_path): Just call cygwin_conv_path with size set
| to MAX_PATH.
| (cygwin_conv_to_full_win32_path): Ditto.


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



Re: Build problems using wxWidgets-2.8.10 / gcc-4.3.4 / cygwin-1.7.1 : multiple definitions of function select()

2010-01-14 Thread Corinna Vinschen
On Jan 14 12:32, Greg Chicares wrote:
 On 2010-01-14 10:15Z, Schwerzmann Stephan wrote:
   
  /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winsock.h:4
  79: error: declaration of C function 'int select(int, _types_fd_set*,
  _types_fd_set*, _types_fd_set*, const timeval*)' conflicts with
  /usr/include/sys/select.h:31: error: previous declaration 'int
  select(int, _types_fd_set*, _types_fd_set*, _types_fd_set*, timeval*)'
 
 As to whether select() takes a const or non-const timeval* argument:
 
   http://msdn.microsoft.com/en-us/library/ms740141%28VS.85%29.aspx
 msdn says it's const, so that's what include/w32api must do
 
   http://www.opengroup.org/onlinepubs/007908799/xsh/select.html
 posix says it isn't const, so that's what /usr/include must do
 
 So you can't combine them. See also:
   http://cygwin.com/ml/cygwin/2008-08/msg00133.html
 | You're getting a bunch of errors because incluing winsock2.h causes lots
 | of namespace clashes.  And how could it not?  It provides a different
 | and incompatible set of definitions for the sockets API which is not
 | compatible with the standard POSIX definitions in the Cygwin headers.
 | Again: the problem is that you should not attempt to use the Winsock API
 | from a Cygwin application.

Yes.  Don't mix winsock and Cygwin sockets unless you know *exactly*
what you're doing.  On the application level there's usually no reason
at all to include winsock headers and to use winsock sockets instead
of Cygwin sockets.  If wxWidgets is doing that, the developers should
be able to tell you why.  If it's for instance, IPv6, that's available
in Cygwin now as well.

  ./src/msw/utils.cpp:407: warning: 'int
  cygwin_conv_to_full_win32_path(const char*, char*)' is deprecated
 
 http://www.cygwin.com/ml/cygwin-cvs/2008-q1/msg00111.html
 | (cygwin_conv_to_win32_path): Just call cygwin_conv_path with size set
 | to MAX_PATH.
 | (cygwin_conv_to_full_win32_path): Ditto.

And http://cygwin.com/cygwin-api/func-cygwin-conv-path.html


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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