Author |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Sun 08 Nov '15 21:02 Post subject: nghttp2.dll share Makefile.msvc ? |
|
|
I see you still build the nghttp2.dll with cygwin in C:\cygwin32\home\Administrator\nghttp2-1.4.0\lib
Can you share the Makefile.msvc? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 09 Nov '15 0:49 Post subject: |
|
|
Yes still, and you ?
Only change:
USE_CYTHON := 0
When you run the first time make -f Makefile.msvc,
it gives an error.
Remove in nghttp2.rc all below #include <winver.h>
Run again make -f Makefile.msvc and all is build. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Mon 09 Nov '15 11:58 Post subject: |
|
|
Most of the times I am compiling outside of Cygwin, because the only thing you need is a Gnu make. But for the sake of argument I went into Cygwin again.
There is a curious difference between your nghttp2.dll and mine, if I follow you build procedure literally. Somehow you seem to have an anonymized entry point. When I run dumpbin /headers on the DLL I get this:
Code: | Jan@X220 /cygdrive/n/php-sdk/prebuilt/nghttp2-1.4.0/lib
$ dumpbin -headers MSVC_obj/nghttp2.dll | grep "entry point"
15C79 entry point (10015C79) __DllMainCRTStartup@12
|
On your DLL this reports:
Code: | C:\httpd-2.4.18-dev-win32-VC14\Apache24\bin>dumpbin /headers nghttp2.dll | grep "entry point"
15C79 entry point (10015C79)
|
I ran into this difference because I had stability issues with nghttp2.dll under VC9 and tried to recreate Gregg's VC9 1.3.4 DLL exactly. I even added this to the httpd.rc, to make them completely comparable:
Code: | VALUE "Comments", "Win32 binary by The Apache Haus"
|
But the __DllMainCRTStartup@12 entry point remains included in my dumpbin/headers, while it is only anonymized present in any other nghttp2.dll.
Any idea what could be causing this difference?
BTW, you can correct the error in httpd.rc by changing one line in the Makefile.rc:
Code: | _VERSION := $(shell grep AC_INIT ../configure.ac | cut -d'[' -f3 | sed -e 's/], //g')
|
Note the removal of '-DEV'.
Last edited by Jan-E on Mon 09 Nov '15 13:51; edited 1 time in total |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Mon 09 Nov '15 13:03 Post subject: |
|
|
Found it: the nghttp2.pdb provides the description for the function at address 10015C79. But I am still wondering why Gregg's VC9 1.3.4 DLL is stable and mine is not. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 09 Nov '15 13:09 Post subject: |
|
|
When I do dumpbin under Cygwin with my dll, I get also : 15C79 entry point (10015C79) __DllMainCRTStartup@12
Thanks for the tip. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 09 Nov '15 13:12 Post subject: |
|
|
What issues are you dealing ? |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Mon 09 Nov '15 13:50 Post subject: |
|
|
I was running the VC9 Apache from Apachehaus. With my nghttp2.dll I get this message in Chrome:
Quote: | Deze webpagina is niet beschikbaar
ERR_CONNECTION_CLOSED
|
Firefox will not even try to connect. Stopping Apache, replacing my nghttp2.dll with Gregg's solves the issue. There are no error messages in the logs or the event viewer.
I upgraded to Apache 2.4.18-dev, compiled it with VC9 and have the same experience.
I know you do not support Apache on VC9 anymore, but it is really intriguing why Gregg's DLL is stable and mine is not. Could you (or Gregg) build a VC9 1.4.0 DLL, so I can check if the same issue is present with Nghttp2 1.4.0? |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Mon 09 Nov '15 14:13 Post subject: |
|
|
Error message in sslerror.log when I tried to access the site with Firefox (Apache 2.4.18-dev VC9, nghttp2.dll 1.4.0):
Quote: | [Mon Nov 09 12:58:07.449102 2015] [http2:warn] [pid 5980:tid 2612] [client 127.0.0.1:51788] AH02952: h2_mplx(63): join attempts exhausted, refs=1 |
With nghttp2.dll 1.3.4 I sometimes get:
Quote: | [Sat Nov 07 22:37:24.171306 2015] [http2:warn] [pid 6232:tid 2640] (70015)Could not find specified socket in poll list.: [client 127.0.0.1:51005] AH02953: h2_mplx(39): stream for response 69 |
So it probably is something in the threading (see h2_mplx.c). |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 11 Nov '15 10:33 Post subject: |
|
|
Yes, versions of rc.exe below 6.1.7600.16385 (SDK7)
do not have /nologo so it's best to remove it. That it causes a fatal seems rediculus. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Wed 11 Nov '15 14:51 Post subject: |
|
|
I finally found the solution. I had a Windows 2008R2 test server with a fresh VC9 install. Building there gave the hint to the solution: VC9 does not have a stdint.h, which is mandatory for NGhttp2. I was using a portable stdint.h by Paul Hsieh on my development machine. The Win2k8 box did not yet have any stdint.h.
Installing msinttypes r26 on both machines gave me a DLL without the connection problems. Phewww.
@Gregg: thanks for the PM. Intriguing to see how you are using Perl for the build process. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 11 Nov '15 19:20 Post subject: |
|
|
Huh, I wonder how mine got in there since it's not the one I carry around for vc6 when it's needed.
Glad you figured it out, but it seems the compiler would complain if you didn't have what was needed. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Wed 11 Nov '15 19:48 Post subject: |
|
|
Check the header of C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdint.h and you'll know where you got it from. Maybe you borrowed it from VC10. VC10 and onwards had a sdtint.h once again.
Maybe the compiler gave a warning about possible loss of data. If you compile a lot, you get used to ignoring those warnings. It might have been a genuine loss of data this time. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Wed 11 Nov '15 19:59 Post subject: |
|
|
Error messages with the faulty stdint.h and nghttp2 1.3.4:
Quote: | cl -nologo -MD -W3 -Z7 -DBUILDING_NGHTTP2 -I./includes -Dssize_t=long -D_U_="" -FoMSVC_obj/r_nghttp2_session.obj -c nghttp2_session.c
nghttp2_session.c
c:\php-sdk\prebuilt\nghttp2-1.3.4\lib\nghttp2_session.c(6370) : warning C4715: 'nghttp2_session_get_remote_settings' : not all control paths return a value
cl -nologo -MD -W3 -Z7 -DBUILDING_NGHTTP2 -I./includes -Dssize_t=long -D_U_="" -FoMSVC_obj/r_nghttp2_submit.obj -c nghttp2_submit.c
nghttp2_submit.c
nghttp2_submit.c(160) : warning C4142: benign redefinition of type
cl -nologo -MD -W3 -Z7 -DBUILDING_NGHTTP2 -I./includes -Dssize_t=long -D_U_="" -FoMSVC_obj/r_nghttp2_helper.obj -c nghttp2_helper.c
nghttp2_helper.c
nghttp2_helper.c(215) : warning C4018: '<' : signed/unsigned mismatch |
I do not get the second and third warning with the right stdint.h. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 11 Nov '15 20:12 Post subject: |
|
|
The first is most troublesome. I have never seen the second on anything. On mismatch warnings I often make sure it's unsigned -> signed since that rarely hurts anything unlike the other way around. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
Posted: Thu 12 Nov '15 1:14 Post subject: |
|
|
The first is happening on all platforms, even for VC14 x64 with the 1.4.0 release. Plus some more warnings:
Quote: | cl -nologo -MD -W3 -Z7 -DBUILDING_NGHTTP2 -I./includes -Dssize_t=long -D_U_="" -FoMSVC_obj/r_nghttp2_session.obj -c nghttp2_session.c
nghttp2_session.c
nghttp2_session.c(4870): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(4900): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(5245): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(5472): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(5654): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(5718): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(5848): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
nghttp2_session.c(5919): warning C4244: 'return': conversion from '__int64' to 'long', possible loss of data
c:\php-sdk\prebuilt\nghttp2-1.4.0\lib\nghttp2_session.c(6495) : warning C4715: 'nghttp2_session_get_remote_settings': not all control paths return a value |
It must have been something else that caused my troubles with VC9. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 12 Nov '15 4:38 Post subject: |
|
|
Jan-E wrote: | conversion from '__int64' to 'long', possible loss of data |
You will often see this when compiling x64, well _int64 to int(32) is more likely. You could maybe get rid of these by changing -Dssize_t=long in the makefile from "long" to "_int64" since many functions in nghttp2 are declared as ssize_t, but then others might blow up. VC14 being C99 I would have thought already had ssize_t but I guess not.
L4870: return in - first;
both in and first are defined as uint8_t (unsigned char) and are 1 byte
ssize_t being long is 4 bytes
How it's returning a 8 byte (_int64) seems strange, but that is what it's warning you about. The actual return value can only be 1 byte (0-255) so it's a bogus warning in reality. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
|
Back to top |
|
elav83
Joined: 10 Nov 2014 Posts: 17 Location: India
|
Posted: Wed 06 Jul '16 13:42 Post subject: Building libnghttp2 in windows x64 for Apache |
|
|
Apache is dependent on nghttp2. I want to build nghttp2 in windows x64 machine. Apache requires nghttp2.lib. Please tell me how we can compile nghttp2 in windows x64. |
|
Back to top |
|