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

Windows Support #4

Open
gsymons opened this issue Mar 30, 2015 · 4 comments
Open

Windows Support #4

gsymons opened this issue Mar 30, 2015 · 4 comments

Comments

@gsymons
Copy link

gsymons commented Mar 30, 2015

Is there any plan to support windows 64bit? I want to use goquic, but it will fail as missing libquic.

@serialx
Copy link
Contributor

serialx commented Mar 31, 2015

We currently don't have any Windows development environment. But since Chromium supports Windows platform, I think this is doable. If you are interested in contributing, we are more than happy to help and guide you. :)

Thanks!

@serialx serialx changed the title Any plan to support windows? Windows Support Apr 30, 2015
@ngjermundshaug
Copy link

@serialx Here are the steps I have made so far in an attempt to compile this on Windows:

  • Installed cmake + added it to PATH
  • Installed ninja + added it to PATH
  • Installed 32bit Strawberry Perl + added it to PATH
  • Installed GO and added it to PATH
  • Installed NASM and installed it to PATH
  • Removed -Werror from boringssl\CMakeLists.txt - line 13 and 14
  • Changed boringssl\crypto\bio\CMakeLists.txt to the following in order to prevent building bio_test.exe (which failed)
include_directories(. .. ../../include)

add_library(
  bio

  OBJECT

  bio.c
  bio_mem.c
  buffer.c
  connect.c
  fd.c
  file.c
  hexdump.c
  pair.c
  printf.c
  socket.c
  socket_helper.c
)

# add_executable(
  # bio_test

  # bio_test.c
# )

# target_link_libraries(bio_test crypto)
# if (WIN32)
  # target_link_libraries(bio_test ws2_32)
# endif()

cmake -GNinja gives the following result

C:\tmp\libquic-master\build>cmake -GNinja ..
Using win32n
-- Configuring done
-- Generating done
-- Build files have been written to: C:/tmp/libquic-master/build

C:\tmp\libquic-master\build>cmake -GNinja ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Debug' as none was specified.
-- Found Perl: C:/StrawberryPerl32/perl/bin/perl.exe (found version "5.22.0")
Using win32n
-- The ASM_NASM compiler identification is unknown
-- Found assembler: C:/nasm/nasm.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/tmp/libquic-master/build

ninja now compiles for a while - but gives the following error:

[348/592] Building CXX object CMakeFiles/quic.dir/src/net/quic/quic_connection.cc.obj
FAILED: C:\StrawberryPerl32\c\bin\c++.exe   -DUSE_OPENSSL -I../src -I../src/third_party/modp_b64 -I../boringssl/include -I../src/third_party/protobuf/src -Wall -std=gnu++11 -gdwarf-4 -g -MMD -MT CMakeFiles/quic.dir/src/net/quic/quic_connection.cc.obj -MF CMakeFiles/quic.dir/src/net/quic/quic_connection.cc.obj.d -o CMakeFiles/quic.dir/src/net/quic/quic_connection.cc.obj -c ../src/net/quic/quic_connection.cc
In file included from ../src/net/quic/quic_connection.cc:18:0:
../src/base/format_macros.h:81:2: error: #error "inttypes.h provided by win toolchain should define these."
 #error "inttypes.h provided by win toolchain should define these."
  ^
../src/net/quic/quic_connection.cc: In member function 'void net::QuicConnection::MaybeCloseIfTooManyOutstandingPackets()':
../src/net/quic/quic_connection.cc:1031:36: error: expected ')' before 'PRIu64'
         StringPrintf("More than %" PRIu64 " outstanding.", kMaxTrackedPackets));
                                    ^
../src/net/quic/quic_connection.cc:1031:78: warning: spurious trailing '%' in format [-Wformat=]
         StringPrintf("More than %" PRIu64 " outstanding.", kMaxTrackedPackets));
                                                                              ^
../src/net/quic/quic_connection.cc:1031:78: warning: too many arguments for format [-Wformat-extra-args]
../src/net/quic/quic_connection.cc:1038:36: error: expected ')' before 'PRIu64'
         StringPrintf("More than %" PRIu64 " outstanding.", kMaxTrackedPackets));
                                    ^
../src/net/quic/quic_connection.cc:1038:78: warning: spurious trailing '%' in format [-Wformat=]
         StringPrintf("More than %" PRIu64 " outstanding.", kMaxTrackedPackets));
                                                                              ^
../src/net/quic/quic_connection.cc:1038:78: warning: too many arguments for format [-Wformat-extra-args]
[348/592] Building CXX object CMakeFiles/quic.dir/src/net/quic/crypto/quic_crypto_server_config.cc.obj
In file included from C:/StrawberryPerl32/c/i686-w64-mingw32/include/ws2tcpip.h:17:0,
                 from ../src/net/base/sys_addrinfo.h:20,
                 from ../src/net/base/ip_endpoint.h:15,
                 from ../src/net/quic/crypto/quic_crypto_server_config.h:16,
                 from ../src/net/quic/crypto/quic_crypto_server_config.cc:5:
C:/StrawberryPerl32/c/i686-w64-mingw32/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
 #warning Please include winsock2.h before windows.h
  ^
ninja: build stopped: subcommand failed.

C:\tmp\libquic-master\build>

@ngjermundshaug
Copy link

After fighting some more and making minor changes to some source files (that only had partial support for win32/64) - i have made some more progress. 407 of 592 files compiled using CMake & Ninja.

[407/592] Building CXX object CMakeFiles/quic.dir/src/net/quic/quic_crypto_client_stream.cc.obj
ninja: build stopped: subcommand failed.

C:\tmp\libquic-master\build>

@serialx Any clue on how to proceed? 😄

@igorgatis
Copy link

Any progress? I'd like to run a QUIC reverse proxy in the same VM my HTTP/1.1 webserver.

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

No branches or pull requests

4 participants