Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build the Windows version #110

Closed
brugnara opened this issue Jul 24, 2018 · 4 comments
Closed

Unable to build the Windows version #110

brugnara opened this issue Jul 24, 2018 · 4 comments
Labels

Comments

@brugnara
Copy link
Contributor

brugnara commented Jul 24, 2018

Hi there.

First of all, thank you for this great tool.

Sadly I am not able to build the Windows version. Following the guide provided, the build of both json-c and libwebsocket fails. I tried upgrading json-c to the latest version and it builds but after the build, the ttyd build fails saying json-p is missing (please note that the first check says json-c is built but the build itself fails). Also, upgrading the libwebsocket didn't helped.

As someone else stated, it would be useful providing the binaries into the release here on github. #101

I hope you can fix this as this tool is great!
Many thanks.

@brugnara
Copy link
Contributor Author

Here some more details:

msys2 is updated/upgraded

IEUser@IE8WIN7 MINGW32 ~/dev/ttyd/msys2
$ pacman -Su
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
 there is nothing to do

IEUser@IE8WIN7 MINGW32 ~/dev/ttyd/msys2
$ pacman -Syu
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
 there is nothing to do

json-c compile error

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -march=i686 -mtune=generic -O2 -pipe -MT json_c_version.lo -MD -MP -MF .deps/json_c_version.Tpo -c json_c_version.c -o json_c_version.o >/dev/null 2>&1
json_object.c: In function 'json_object_get_int64':
json_object.c:554:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
  if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint;
     ^
json_object.c:555:3: note: here
   default:
   ^~~~~~~
mv -f .deps/json_c_version.Tpo .deps/json_c_version.Plo

libwebsockets build error

The build starts but the msys2 freezes itself.

Best regards.

@tsl0922
Copy link
Owner

tsl0922 commented Aug 15, 2018

Fixed by 44272fa

@tsl0922 tsl0922 closed this as completed Aug 15, 2018
@brugnara
Copy link
Contributor Author

Thank you.

Same problem occurs, but we understood the problem here is Windows 7 386. Compiling with Windows 10 x64, everything worked as expected.

I also suggest you to add this line to the msys2 building instructions as are both required in order to build:

pacman -S git binutils

@brugnara
Copy link
Contributor Author

brugnara commented Aug 21, 2018

In order to build libwebsocket on a 32 bit windows, a lib is required:

pacman -S mingw-w64-i686-cmake

Source: https://github.com/warmcat/libwebsockets/blob/master/READMEs/README.build.md

If on Windows (MSYS2) you will need to install CMake in the MSYS2 environment:
pacman -S mingw-w64-i686-cmake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants