BAH.libwebsockets Build Error

BlitzMax Forums/Brucey's Modules/BAH.libwebsockets Build Error

RustyKristi(Posted 2016) [#1]
MinGW 5.1 (bcc[ng] 0.79) this fails to build..

[  5%] Compiling:extension-deflate-frame.c
In file included from C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/libwebsockets.h:38:0,
                 from C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/private-libwebsockets.h:113,
                 from C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension-deflate-frame.c:1:
C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/win32port/win32helpers/websock-w32.h:20:16: error: conflicting types for '_sleep'
 #define usleep _sleep
                ^
In file included from C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/private-libwebsockets.h:40:0,
                 from C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension-deflate-frame.c:1:
C:/BlitzMaxNG/MinGW32/x86_64-w64-mingw32/include/stdlib.h:604:24: note: previous declaration of '_sleep' was here
   _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
                        ^
Build Error: failed to compile C:/BlitzMaxNG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension-deflate-frame.c



Hezkore(Posted 2016) [#2]
I'm using BMX-NG and also get the same message
Building libwebsockets
[  1%] Compiling:glue.cpp
[  2%] Compiling:base64-decode.c
[  3%] Compiling:client-handshake.c
[  4%] Compiling:client-parser.c
[  5%] Compiling:client.c
[  6%] Compiling:extension-deflate-frame.c
[  7%] Compiling:extension-deflate-stream.c
[  8%] Compiling:extension.c
[  9%] Compiling:handshake.c
[ 10%] Compiling:libwebsockets.c
[ 11%] Compiling:minilex.c
[ 12%] Compiling:output.c
[ 13%] Compiling:parsers.c
[ 14%] Compiling:server-handshake.c
[ 15%] Compiling:server.c
[ 16%] Compiling:sha-1.c
In file included from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/libwebsockets.h:38:0,
                 from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/private-libwebsockets.h:113,
                 from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension-deflate-frame.c:1:
C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/win32port/win32helpers/websock-w32.h:20:16: error: conflicting types for '_sleep'
 #define usleep _sleep
                ^
In file included from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/private-libwebsockets.h:40:0,
                 from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension-deflate-frame.c:1:
C:/Program Files/BMX NG/MinGW32/x86_64-w64-mingw32/include/stdlib.h:604:24: note: previous declaration of '_sleep' was here
   _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
                        ^
In file included from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/libwebsockets.h:38:0,
                 from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/private-libwebsockets.h:113,
                 from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension.c:1:
C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/win32port/win32helpers/websock-w32.h:20:16: error: conflicting types for '_sleep'
 #define usleep _sleep
                ^
In file included from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/private-libwebsockets.h:40:0,
                 from C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension.c:1:
C:/Program Files/BMX NG/MinGW32/x86_64-w64-mingw32/include/stdlib.h:604:24: note: previous declaration of '_sleep' was here
   _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
                        ^
Build Error: failed to compile (1) C:/Program Files/BMX NG/mod/bah.mod/libwebsockets.mod/libwebsockets/lib/extension.c
Process complete



Brucey(Posted 2016) [#3]
There's actually a good chance I'll miss reported problems if they are only posted on the forum.

Feel free to log issues on github, where I'm more likely to deal with them eventually: https://github.com/maxmods/bah.mod/issues


Hezkore(Posted 2016) [#4]
Okay will do that!
Not everyone has (or wants) a Github account though.


Derron(Posted 2016) [#5]
And not everyone has (or wants) an account on blitzmax.com to use the open source BlitzMax NG.


Seriously: GitHub makes issue tracking a bit more convenient: you receive emails if one opens an issue, fixes issues etc... this is not true for collaboration here in the forums.


bye
Ron


Hezkore(Posted 2016) [#6]
Yeah sure, but he has to atleast check his own part of the forums heh.
I've posted an issue on Github, hope this gets fixed soon!


Hezkore(Posted 2016) [#7]
Thanks for fixing the issue Brucey!
I have however some problems with the test_server.bmx
[100%] Linking:test_server.debug.mt.exe
Executing:test_server.debug.mt.exe
[1471999859:6660] NOTICE: Initial logging level 7
[1471999859:6660] NOTICE: Library version: 1.3 6c58228577306c023b072b5c7c7a2b044a94f12a
[1471999859:6660] NOTICE:  static allocation: 4464 + (24 x 30000 fds) = 724464 bytes
[1471999859:6709] NOTICE:  canonical_hostname = Hezkore-PC
[1471999859:6709] NOTICE:  Compiled without SSL support
[1471999859:6709] NOTICE:  per-conn mem: 168 + 1360 headers + protocol rx buf
[1471999859:6719] NOTICE:  Listening on port 7681

Process complete