logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Building nghttp2 for Curl and mod_h2 ? Page 1, 2  Next
Author
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 04 Sep '15 13:47    Post subject: Building nghttp2 for Curl and mod_h2 ? Reply with quote

I am puzzling how to build Curl and mod_h2 with http/2. Any hints ?

Last edited by Steffen on Fri 04 Sep '15 16:26; edited 1 time in total
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Fri 04 Sep '15 15:00    Post subject: Reply with quote

Which part is the problem? The building of a static nghttp2.lib, the linking with cUrl or both?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 04 Sep '15 15:14    Post subject: Reply with quote

Building nghttp2.lib and linking in Curl. I see in the lib folder a makefile.msvc, but that does not work as a VS makefile.

Not sure yet what mod_h2 needs.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Fri 04 Sep '15 15:35    Post subject: Reply with quote

No, you need a mixed Cygwin/MSVC environment: vcvarsall.bat + Cygwin
Code:
@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
C:
chdir C:\cygwin\bin
bash --login -i

In that environment, Cygwin does the configure in the root of nghttp2 v1.2.1

$ autoreconf -i
$ autoconf
$ automake
$ ./configure --disable-shared

then you run the Makefile.msvc

$ cd lib
$ make -f Makefile.msvc

The make is Cygwin's make, but be sure to use the lib.exe and the link.exe of MSVC. I temporarily renamed Cygwin's link.exe in /usr/bin to linkcyg.exe to achieve that.

In the nghttp2 sources I changed a couple of things:

1. Every #define NGHTTP2_EXTERN __declspec(dllimport) and #define NGHTTP2_EXTERN __declspec(dllexport) was changed into a plain #define NGHTTP2_EXTERN, because I was only interested in a static lib.

2. I removed $(OBJ_DIR)/r_nghttp2.res and $(OBJ_DIR)/d_nghttp2.res from Makefile.msvc
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Fri 04 Sep '15 16:02    Post subject: Reply with quote

Code:
configure: summary of build options:

    Version:        1.2.1 shared 14:8:0
    Host type:      i686-pc-cygwin
    Install prefix: /usr/local
    C compiler:     gcc
    CFLAGS:         -g -O2
    WARNCFLAGS:
    LDFLAGS:
    LIBS:
    CPPFLAGS:
    C preprocessor: gcc -E
    C++ compiler:   g++
    CXXFLAGS:       -g -O2 -std=c++11
    CXXCPP:         g++ -E
    Library types:  Shared=no, Static=yes
    Python:
      Python:         /usr/bin/python
      PYTHON_VERSION: 2.7
      pyexecdir:      ${exec_prefix}/lib/python2.7/site-packages
      Python-dev:     yes
      PYTHON_CPPFLAGS:-I/usr/include/python2.7
      PYTHON_LDFLAGS: -L/usr/lib -lpython2.7
      Cython:
    Test:
      CUnit:          no
      Failmalloc:     yes
    Libs:
      OpenSSL:        yes
      Libxml2:        no
      Libev:          no
      Libevent(SSL):  no
      Spdylay:        no
      Jansson:        no
      Jemalloc:       no
      Zlib:           yes
      Boost CPPFLAGS:
      Boost LDFLAGS:
      Boost::ASIO:
      Boost::System:
      Boost::Thread:
    Features:
      Applications:   no
      HPACK tools:    no
      Libnghttp2_asio:no
      Examples:       no
      Python bindings:no
      Threading:      yes
      Third-party:    no
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 692

PostPosted: Fri 04 Sep '15 16:35    Post subject: Reply with quote

Thanks! A little complicated, glad you figured it out, appreciate it.

I started with http-1.3.0, I get errors in the autoconf. Coming weekend I shall try 1.2.1 as you did.

Are you aware if there comes a build conf without using cygwin ? So that the Visual Studio compiler is used.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Fri 04 Sep '15 16:45    Post subject: Reply with quote

I got the same error in v1.3.0. Unless someone writes a makefile for nmake there will be no such thing. All the essential tools are already MSVC's: cl.exe, lib.exe, link.exe and mt.exe:
Code:
cl -nologo -MDd -W3 -Z7 -DBUILDING_NGHTTP2 -Ot -D_DEBUG -GF -RTCs -RTCu  -I./inc
ludes -Dssize_t=long -D_U_="" -FoMSVC_obj/d_nghttp2_http.obj -c nghttp2_http.c
nghttp2_http.c
nghttp2_http.c(246): warning C4244: '=': conversion from 'int64_t' to 'int16_t',
 possible loss of data

lib -nologo -out:MSVC_obj/nghttp2d-static.lib MSVC_obj/d_nghttp2_pq.obj MSVC_obj
/d_nghttp2_map.obj MSVC_obj/d_nghttp2_queue.obj MSVC_obj/d_nghttp2_frame.obj MSV
C_obj/d_nghttp2_buf.obj MSVC_obj/d_nghttp2_stream.obj MSVC_obj/d_nghttp2_outboun
d_item.obj MSVC_obj/d_nghttp2_session.obj MSVC_obj/d_nghttp2_submit.obj MSVC_obj
/d_nghttp2_helper.obj MSVC_obj/d_nghttp2_npn.obj MSVC_obj/d_nghttp2_hd.obj MSVC_
obj/d_nghttp2_hd_huffman.obj MSVC_obj/d_nghttp2_hd_huffman_data.obj MSVC_obj/d_n
ghttp2_version.obj MSVC_obj/d_nghttp2_priority_spec.obj MSVC_obj/d_nghttp2_optio
n.obj MSVC_obj/d_nghttp2_callbacks.obj MSVC_obj/d_nghttp2_mem.obj MSVC_obj/d_ngh
ttp2_http.obj

link -nologo -MAP -debug -incremental:no -opt:ref,icf -MANIFEST  -dll -out:MSVC_
obj/nghttp2d.dll -implib:MSVC_obj/nghttp2d.lib MSVC_obj/d_nghttp2_pq.obj MSVC_ob
j/d_nghttp2_map.obj MSVC_obj/d_nghttp2_queue.obj MSVC_obj/d_nghttp2_frame.obj MS
VC_obj/d_nghttp2_buf.obj MSVC_obj/d_nghttp2_stream.obj MSVC_obj/d_nghttp2_outbou
nd_item.obj MSVC_obj/d_nghttp2_session.obj MSVC_obj/d_nghttp2_submit.obj MSVC_ob
j/d_nghttp2_helper.obj MSVC_obj/d_nghttp2_npn.obj MSVC_obj/d_nghttp2_hd.obj MSVC
_obj/d_nghttp2_hd_huffman.obj MSVC_obj/d_nghttp2_hd_huffman_data.obj MSVC_obj/d_
nghttp2_version.obj MSVC_obj/d_nghttp2_priority_spec.obj MSVC_obj/d_nghttp2_opti
on.obj MSVC_obj/d_nghttp2_callbacks.obj MSVC_obj/d_nghttp2_mem.obj MSVC_obj/d_ng
http2_http.obj -PDB:MSVC_obj/nghttp2d.pdb

mt -nologo -manifest MSVC_obj/nghttp2d.dll.manifest -outputresource:MSVC_obj/ngh
ttp2d.dll\;2
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 04 Sep '15 19:21    Post subject: Reply with quote

The problem with 1.3.0 is the "typeof" in nghttp2_helper.h as far as I can tell. typeof is gcc specific from what I've read. So regardless of an nmake file it's not going to happen it seems.

MSVC had _typeof but was depreciated long ago for typeid. I gave up on it at this point.

I manually created my own nghttp2ver.h and then nghttp2.rc from the data in the makefile.

On my machines I have no gcc or cygwin but I do have GNU make and got 1.2.1 building with some editing of the makefile.msvc and it works for mod_h2 at least. I did not create the python bindings either but then the website says they are not complete.

https://www.apachehaus.net/ check the headers, you should see HTTP/2.0 200 OK and in Firefox X-Firefox-Spdy: h2


make -f makefile.msvc

makefile.msvc
Code:
#
# GNU Makefile for nghttp2 / MSVC.
#
# By G. Vanem <gvanem@yahoo.no> 2013
# Updated 3/2015 by Remo Eichenberger @remoe
# The MIT License apply.
#

#
# Choose your weapons:
#  Set 'USE_CYTHON=1' to build and install the 'nghttp2.pyd' Python extension.
#
#THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))

#USE_CYTHON := 1
USE_CYTHON := 0

#_VERSION    := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -e 's/-DEV], //g')
#_VERSION      := $(subst ., ,$(_VERSION))
#VER_MAJOR     := $(word 1,$(_VERSION))
#VER_MINOR     := $(word 2,$(_VERSION))
#VER_MICRO   := $(word 3,$(_VERSION))
#VERSION     := $(VER_MAJOR).$(VER_MINOR).$(VER_MICRO)
#VERSION_NUM := ($(VER_MAJOR) << 16) + ($(VER_MINOR) << 8) + $(VER_MICRO)

#GENERATED   := 'Generated by $(realpath Makefile.MSVC)'

OBJ_DIR := MSVC_obj
#SUFFIX :=-vc90-mt-x86

#
# Where to copy nghttp2.dll + lib + headers to.
# Note: 'make install' is not in default targets. Do it explicitly.
#
#TARGET_DIR  ?= ../_VC_ROOT
#VC_ROOT     := $(abspath $(TARGET_DIR))
#INSTALL_BIN := $(VC_ROOT)/bin
#INSTALL_LIB := $(VC_ROOT)/lib
#INSTALL_HDR := $(VC_ROOT)/include
DLL_R   := $(OBJ_DIR)/nghttp2$(SUFFIX).dll
DLL_D   := $(OBJ_DIR)/nghttp2d$(SUFFIX).dll
LIB_R   := $(OBJ_DIR)/nghttp2-static.lib
LIB_D   := $(OBJ_DIR)/nghttp2d-static.lib
IMP_R   := $(OBJ_DIR)/nghttp2.lib
IMP_D   := $(OBJ_DIR)/nghttp2d.lib

#
# Build for DEBUG-model and RELEASE at the same time.
#
TARGETS := $(LIB_R) $(DLL_R) $(IMP_R) \
          $(LIB_D) $(DLL_D) $(IMP_D)

EXT_LIBS =

NGHTTP2_PDB_R := $(OBJ_DIR)/nghttp2.pdb
NGHTTP2_PDB_D := $(OBJ_DIR)/nghttp2d.pdb

CC       = cl
LD       := link
AR       := lib
#CC       := icl
#LD       := xilink
#AR       := xilib
RC       := rc
CFLAGS   := -I./includes -Dssize_t=long -D_U_=""

CFLAGS_R := -nologo -MD  -W3 -Z7 -DBUILDING_NGHTTP2
CFLAGS_D := -nologo -MDd -W3 -Z7 -DBUILDING_NGHTTP2 \
           -Ot -D_DEBUG -GF -RTCs -RTCu # -RTCc -GS

LDFLAGS := -nologo -MAP -debug -incremental:no -opt:ref,icf -MANIFEST # -verbose


NGHTTP2_SRC := nghttp2_pq.c \
  nghttp2_map.c \
  nghttp2_queue.c \
  nghttp2_frame.c \
  nghttp2_buf.c \
  nghttp2_stream.c \
  nghttp2_outbound_item.c \
  nghttp2_session.c \
  nghttp2_submit.c \
  nghttp2_helper.c \
  nghttp2_npn.c \
  nghttp2_hd.c \
  nghttp2_hd_huffman.c \
  nghttp2_hd_huffman_data.c \
  nghttp2_version.c \
  nghttp2_priority_spec.c \
  nghttp2_option.c \
  nghttp2_callbacks.c \
  nghttp2_mem.c \
  nghttp2_http.c

NGHTTP2_OBJ_R := $(addprefix $(OBJ_DIR)/r_, $(notdir $(NGHTTP2_SRC:.c=.obj)))
NGHTTP2_OBJ_D := $(addprefix $(OBJ_DIR)/d_, $(notdir $(NGHTTP2_SRC:.c=.obj)))

#.PHONY: all intro test_ver install copy_headers_and_libs \
#   install_nghttp2_pyd_0 install_nghttp2_pyd_1 \
#   build_nghttp2_pyd_0 build_nghttp2_pyd_1 \
#   clean_nghttp2_pyd_0 clean_nghttp2_pyd_1


all: intro $(OBJ_DIR) $(TARGETS) build_nghttp2_pyd_$(USE_CYTHON)
   @echo 'Welcome to NgHTTP2 (release + debug).'
   @echo 'Do a "make -f Makefile.MSVC install" at own risk!'

intro:
   @echo 'Building NgHTTP (MSVC) ver. "$(VERSION)".'

test_ver:
   @echo '$$(VERSION):   "$(VERSION)".'
   @echo '$$(_VERSION):  "$(_VERSION)".'
   @echo '$$(VER_MAJOR): "$(VER_MAJOR)".'
   @echo '$$(VER_MINOR): "$(VER_MINOR)".'
   @echo '$$(VER_MICRO): "$(VER_MICRO)".'

$(OBJ_DIR):
   - mkdir $(OBJ_DIR)

install: includes/nghttp2/nghttp2.h includes/nghttp2/nghttp2ver.h \
         $(TARGETS) \
         copy_headers_and_libs install_nghttp2_pyd_$(USE_CYTHON)

#
# This MUST be done before using the 'install_nghttp2_pyd_1' rule.
#
copy_headers_and_libs:
   - mkdir -p $(INSTALL_HDR)/nghttp2 $(INSTALL_BIN) $(INSTALL_LIB)
   cp --update $(addprefix includes/nghttp2/, nghttp2.h nghttp2ver.h)     $(INSTALL_HDR)/nghttp2
   cp --update $(DLL_R) $(DLL_D) $(NGHTTP2_PDB_R) $(NGHTTP2_PDB_D) $(INSTALL_BIN)
   cp --update $(IMP_R) $(IMP_D) $(LIB_R) $(LIB_D) $(INSTALL_LIB)
   @echo

$(LIB_R): $(NGHTTP2_OBJ_R)
   $(AR) -nologo -out:$@ $^
   @echo

$(LIB_D): $(NGHTTP2_OBJ_D)
   $(AR) -nologo -out:$@ $^
   @echo


$(IMP_R): $(DLL_R)

$(DLL_R): $(NGHTTP2_OBJ_R) $(OBJ_DIR)/r_nghttp2.res
   $(LD) $(LDFLAGS) -dll -out:$@ -implib:$(IMP_R) $(NGHTTP2_OBJ_R) -PDB:$(NGHTTP2_PDB_R) $(OBJ_DIR)/r_nghttp2.res $(EXT_LIBS)
   mt -nologo -manifest $@.manifest -outputresource:$@\;2
   @echo

$(IMP_D): $(DLL_D)
   
$(DLL_D): $(NGHTTP2_OBJ_D) $(OBJ_DIR)/d_nghttp2.res
   $(LD) $(LDFLAGS) -dll -out:$@ -implib:$(IMP_D) $(NGHTTP2_OBJ_D) -PDB:$(NGHTTP2_PDB_D) $(OBJ_DIR)/d_nghttp2.res $(EXT_LIBS)
   mt -nologo -manifest $@.manifest -outputresource:$@\;2
   @echo


WIN_OBJDIR:=$(OBJ_DIR)
#WIN_OBJDIR:=$(subst \,/,$(WIN_OBJDIR))

../python/setup.py: ../python/setup.py.in $(THIS_MAKEFILE)
   cd ../python ; \
   echo '# $(GENERATED). DO NOT EDIT.' > setup.py ; \
   sed -e 's/@top_srcdir@/../'   \
       -e 's%@top_builddir@%$(WIN_OBJDIR)%' \
       -e 's/@PACKAGE_VERSION@/$(VERSION)/' setup.py.in >> setup.py ;

build_nghttp2_pyd_0: ;

build_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
   cd ../python ; \
   python setup.py build_ext -i -f bdist_wininst

install_nghttp2_pyd_0: ;
      
install_nghttp2_pyd_1: $(addprefix ../python/, setup.py nghttp2.pyx)
   cd ../python ; \
   pip install .

clean_nghttp2_pyd_0: ;

clean_nghttp2_pyd_1:
   cd ../python ; \
   rm -fR build dist

$(OBJ_DIR)/r_%.obj: %.c $(THIS_MAKEFILE)
   $(CC) $(CFLAGS_R) $(CFLAGS) -Fo$@ -c $<
   @echo

$(OBJ_DIR)/d_%.obj: %.c $(THIS_MAKEFILE)
   $(CC) $(CFLAGS_D) $(CFLAGS) -Fo$@ -c $<
   @echo

$(OBJ_DIR)/r_nghttp2.res: $(OBJ_DIR)/nghttp2.rc
   $(RC) -nologo -D_RELEASE -Fo $@ $<
   @echo

$(OBJ_DIR)/d_nghttp2.res: $(OBJ_DIR)/nghttp2.rc
   $(RC) -nologo -D_DEBUG -Fo $@ $<
   @echo

#includes/nghttp2/nghttp2ver.h: includes/nghttp2/nghttp2ver.h.in $(THIS_MAKEFILE)
#   sed < includes/nghttp2/nghttp2ver.h.in     \
#        -e 's/@PACKAGE_VERSION@/$(VERSION)/g' \
#        -e 's/@PACKAGE_VERSION_NUM@/($(VERSION_NUM))/g' > $@
#   touch --reference=includes/nghttp2/nghttp2ver.h.in $@


define RES_FILE
  #include <winver.h>

  VS_VERSION_INFO VERSIONINFO
    FILEVERSION    $(VER_MAJOR), $(VER_MINOR), $(VER_MICRO), 0
    PRODUCTVERSION $(VER_MAJOR), $(VER_MINOR), $(VER_MICRO), 0
    FILEFLAGSMASK  0x3fL
    FILEOS         0x40004L
    FILETYPE       0x2L
    FILESUBTYPE    0x0L
  #ifdef _DEBUG
    #define        VER_STR  "$(VERSION).0 (MSVC debug)"
    #define        DBG      "d"
    FILEFLAGS      0x1L
  #else
    #define        VER_STR  "$(VERSION).0 (MSVC release)"
    #define        DBG      ""
    FILEFLAGS      0x0L
  #endif
  BEGIN
    BLOCK "StringFileInfo"
    BEGIN
      BLOCK "040904b0"
      BEGIN
        VALUE "CompanyName",      "http://tatsuhiro-t.github.io/nghttp2/"
        VALUE "FileDescription",  "nghttp2; HTTP/2 C library"
        VALUE "FileVersion",      VER_STR
        VALUE "InternalName",     "nghttp2" DBG
        VALUE "LegalCopyright",   "The MIT License"
        VALUE "LegalTrademarks",  ""
        VALUE "OriginalFilename", "nghttp2" DBG ".dll"
        VALUE "ProductName",      "NGHTTP2."
        VALUE "ProductVersion",   VER_STR
      END
    END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 1200
  END
  END
endef

export RES_FILE

#$(OBJ_DIR)/nghttp2.rc: Makefile.MSVC
#   @echo 'Generating $@...'
#   @echo ' /* $(GENERATED). DO NOT EDIT.' > $@
#   @echo '  */'                          >> $@
#   @echo "$RES_FILE"                     >> $@

clean:
   rm -f $(OBJ_DIR)/* includes/nghttp2/nghttp2ver.h
   @echo

vclean realclean: clean clean_nghttp2_pyd_$(USE_CYTHON)
   - rm -rf $(OBJ_DIR)
   - rm -f .depend.MSVC

#
# Use gcc to generated the dependencies. No MSVC specific args please!
#
REPLACE_R = 's/\(.*\)\.o: /\n$$(OBJ_DIR)\/r_\1.obj: /'
REPLACE_D = 's/\(.*\)\.o: /\n$$(OBJ_DIR)\/d_\1.obj: /'

depend: includes/nghttp2/nghttp2ver.h
   @echo '# $(GENERATED). DO NOT EDIT.' > .depend.MSVC
   gcc -MM $(CFLAGS) $(NGHTTP2_SRC)    >> .depend.tmp
   @echo '#'                           >> .depend.MSVC
   @echo '# Release lib objects:'      >> .depend.MSVC
   sed -e $(REPLACE_R) .depend.tmp     >> .depend.MSVC
   @echo '#'                           >> .depend.MSVC
   @echo '# Debug lib objects:'        >> .depend.MSVC
   sed -e $(REPLACE_D) .depend.tmp     >> .depend.MSVC
   rm -f .depend.tmp

-include .depend.MSVC
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 04 Sep '15 21:35    Post subject: Reply with quote

I should also mention that h2 requires ALPN and the only OpenSSL version to support it is 1.0.2. The only cipher I've seen working on FF, Chrome and IE11 is
ECDHE-RSA-AES128-GCM-SHA256

So I used
Code:
SSLProtocol -all +TLSv1 +TLSv1.1 +TLSv1.2
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:!RC4:!LOW:!MD5:!aNULL:!eNULL:!3DES:!EXP:!PSK:!SRP:!DSS


There's a big blacklist of ciphers https://http2.github.io/http2-spec/#BadCipherSuites

The h2 protocol (http/2 over TLS/1.2) is the only protocol that the current major browsers support. The h2c is (http/2 over TCP) which is a non-encrypted protocol that mod_h2 also supports and maybe the browsers will chill out eventually and support it. After all, not everything needs encryption and therefor a waste of resources on both ends of a connection.

When mod_h2 finally hits 2.4 there will be two new core directives available, Protocols and ProtocolsHonorOrder. In the case of mod_h2
Code:
  <IfModule h2_module>
    ProtocolsHonorOrder On
    Protocols h2c h2 http/1.1
  </IfModule>


Sorry for the long read.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Fri 04 Sep '15 23:40    Post subject: Reply with quote

@glsmith Thanks for the info and clarifications. Appreciate it very much.

I see that Chrome gives h2 with apachehaus.net

I have cygwin on the dev machine, so I give coming days 1.2.1 a try with it.

Hope there is soon a tag with mod_h2, so it is more easy for the community to thorough test it.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Fri 04 Sep '15 23:52    Post subject: Reply with quote

glsmith wrote:
The problem with 1.3.0 is the "typeof" in nghttp2_helper.h as far as I can tell. typeof is gcc specific from what I've read. So regardless of an nmake file it's not going to happen it seems.

MSVC had _typeof but was depreciated long ago for typeid. I gave up on it at this point.

I manually created my own nghttp2ver.h and then nghttp2.rc from the data in the makefile.

If this is a generic solution: create a PR for the NGHTTP2 sources.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 05 Sep '15 0:42    Post subject: Reply with quote

Jan-E wrote:
If this is a generic solution: create a PR for the NGHTTP2 sources.


For this maybe
Code:
nghttp2_stream.c(36) : error C2059: syntax error : '{'
nghttp2_stream.c(36) : error C2065: 'nghttp2__mptr' : undeclared identifier


I wouldn't add anything beyond that to any PR.
I don't have a github account so I haven't done it.

I'm perfectly happy with 1.2.1 for the time being.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Sat 05 Sep '15 17:17    Post subject: Reply with quote

Did you disable it? https://apachehaus.net/ gives me
Status: HTTP/1.1 200 OK
in Chrome

Edit Found it: for some reason or another my shortcut to Chrome contained the options --use-spdy=off and --disable-quic. I cannot remember putting it there manually. But after removing it I got the http/2.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 07 Sep '15 11:37    Post subject: Reply with quote

Build curl:

curl 7.44.0 (x86_64-pc-win32) libcurl/7.44.0 OpenSSL/1.0.2d zlib/1.2.8 nghttp2/1.2.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL libz HTTP2

For mod_h2 I wait for the (test)tag.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Mon 07 Sep '15 11:55    Post subject: Reply with quote

C:\php-sdk\php70dev>curl --version
curl 7.44.0 (x86_64-pc-win32) libcurl/7.44.0 OpenSSL/1.0.2d zlib/1.2.8 WinIDN libssh2/1.6.0 nghttp2/1.2.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz HTTP2

I would at least add USE_IDN=yes to your build line. SSH2 is probably not needed.

And missing the IPv6 feature is strange, because a configure line like those on https://github.com/winlibs/cURL enables that without asking. Did you build it otherwise?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 07 Sep '15 14:11    Post subject: Reply with quote

I build by purpose with: USE_SSPI=no USE_IPV6=no USE_IDN=no
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1265
Location: Amsterdam, NL, EU

PostPosted: Mon 07 Sep '15 14:22    Post subject: Reply with quote

Steffen wrote:
I build by purpose with: USE_SSPI=no USE_IPV6=no USE_IDN=no

Do you need those features disabled for mod_h2?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 07 Sep '15 14:38    Post subject: Reply with quote

No. Not with mod_h2 in mind. I start with mod_h2 when there is a (test)tag of httpd.
Back to top
Brisingr Aerowing



Joined: 25 Jan 2013
Posts: 10

PostPosted: Thu 10 Sep '15 1:57    Post subject: I Use MozillaBuild Reply with quote

I use the MozillaBuild system to build NGHttp2 (and various other libraries) on Windows using MSVC. It works quite well.
Back to top
Brisingr Aerowing



Joined: 25 Jan 2013
Posts: 10

PostPosted: Fri 11 Sep '15 1:57    Post subject: NGHttp2 Git has MSVC fix Reply with quote

Steffen, I posted a bug to NGHttp2 about the broken MSVC builds, and the owner quickly committed a fix. The current Git master should build with MSVC.
Back to top


Reply to topic   Topic: Building nghttp2 for Curl and mod_h2 ? View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads Page 1, 2  Next