This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

build wireshark fails on Win7 64bits

0
1

Hi all When I try to setup the wireshark development env on Win7 64bits, there are always errors when build the project with "msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln", do you have some suggestion for the following errors? thanks !

  1. Following the user-guide "developer-giuide-us-0923.pdf"
  2. Software version: Win7-64bits, VS2013, Cygwin64, python2.7, cmake3.7
  3. error information:
    ------ Build started: Project: dfilter (Libs\epan\dfilter\dfilter), Configuration: Debug x64 ------
5>  packet-cattp.c
5>  packet-cbor.c
5>  packet-ccsds.c
5>  packet-cdp.c
5>  packet-cell_broadcast.c
16>  Building Custom Rule E:/Development/wireshark/epan/dfilter/CMakeLists.txt
5>  packet-ceph.c
5>  packet-cfdp.c
16>  CMake does not need to re-run because E:\Development\wsbuild64\epan\dfilter\CMakeFiles\generate.stamp is up-to-date.
16>  Generating scanner.c, scanner_lex.h
5>  packet-cfm.c
16>  C:/cygwin64/bin/flex.exe -> /usr/bin/flex.exe
5>  packet-cgmp.c
5>  packet-chargen.c
5>  packet-chdlc.c
5>  packet-cigi.c
5>  packet-cimd.c
5>  packet-cimetrics.c
5>  packet-cip.c
5>  packet-cipmotion.c
5>  packet-cipsafety.c
5>  packet-cisco-erspan.c
5>  packet-cisco-fp-mim.c
16>  flex: could not create --header-file=./_lex.h
16>  /usr/bin/flex.exe failed: exit status 1
16>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1. 
... ... 
running a2x with args --format=xhtml --destination-dir=/cygdrive/e/Development/wsbuild64/docbook --asciidoc-opts= --fop --stylesheet=ws.css release-notes.asciidoc
5>  packet-hdcp2.c
5>  packet-hdfs.c
5>  packet-hdfsdata.c
26>  drag_and_drop.c
5>  packet-hdmi.c
5>  packet-hip.c
26>  edit_packet_comment_dlg.c
5>  packet-hiqnet.c
5>  packet-hislip.c
26>  expert_comp_table.c
5>  packet-homeplug-av.c
30>        0 [main] python 9108 fork: child 7096 - died waiting for dll loading, errno 11
30>a2x : error : failed: "/usr/bin/asciidoc.py" --backend docbook -a "a2x-format=xhtml"   --out-file "/cygdrive/e/Development/wsbuild64/docbook/release-notes.xml" "/cygdrive/e/Development/wireshark/docbook/release-notes.asciidoc": [Errno 11] Resource temporarily unavailable
26>  export_object_dlg.c
5>  packet-homeplug.c

asked 26 Oct '16, 03:23

scdma's gravatar image

scdma
6122
accept rate: 0%

edited 26 Oct '16, 03:58

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

0

I can see two errors in the output:

16>  flex: could not create --header-file=./_lex.h
16>  /usr/bin/flex.exe failed: exit status 1

Something up with the call to flex, not sure why it's trying to create _lex.h

and:

30>        0 [main] python 9108 fork: child 7096 - died waiting for dll loading, errno 11
30>a2x : error : failed: "/usr/bin/asciidoc.py" --backend docbook -a "a2x-format=xhtml"   --out-file "/cygdrive/e/Development/wsbuild64/docbook/release-notes.xml" "/cygdrive/e/Development/wireshark/docbook/release-notes.asciidoc": [Errno 11] Resource temporarily unavailable

which is something weird with running the python script asciidoc.py

Normally I'd expect odd things on the path with issues like this, but for the first one at least it seems that the build is using the Cygwin version of flex. Note that we now recommend the use of winflexbison rather than the Cygwin version, see the last paragraph of setting up Cygwin in the Developers Guide. If you do install this, you'll need to either delete CMakeCache.txt in your build directory and re-run the CMake generation step, or just delete and recreate the build dir entirely.

When debugging build output it's much better to turn off parallel builds (remove the /m flag given to msbuild) so that project steps are not comingled.

answered 26 Oct '16, 04:07

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Hello Mr.Grahamb,

thanks for your answer, I will try to install the winflexbsion.

do you have some idea for the second error? actually, I can find the file "release-notes.asciidoc" in the correct folder, I don't know why a2x can not find it.

thanks very much

30>a2x : error : failed: "/usr/bin/asciidoc.py" --backend docbook -a "a2x-format=xhtml"   --out-file "/cygdrive/e/Development/wsbuild64/docbook/release-notes.xml" "/cygdrive/e/Development/wireshark/docbook/release-notes.asciidoc": [Errno 11] Resource temporarily unavailable
(26 Oct '16, 18:31) scdma

Hello Mr.Grahamb, I used the winflexbison to build the wireshark-64bits on Win7-64bits & VS2013, the same error occurs, the error information is as below, would you like have some suggestion for it?

99>ClCompile:
         byte_view_tab.cpp
         byte_view_text.cpp
         capture_file.cpp
         capture_file_dialog.cpp
   109>CustomBuild:
         flex: could not create --header-file=./_lex.h
         /usr/bin/flex.exe failed: exit status 1
   107>CustomBuild:
         flex: could not create --header-file=./_lex.h
         /usr/bin/flex.exe failed: exit status 1
   109>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1 。 [e:\Development\wsbuild64\wiretap\wiretap.vcxproj]
(26 Oct '16, 20:51) scdma

I think you meant to write the above answer as a comment!

(26 Oct '16, 22:53) koundi

Still not sure what's up with the docbook issue, but for the flex issue it seems that the build hasn't picked up win_flex as it is still using the Cygwin flex.

Can you please delete and recreate your build directory, rerun the CMake generation step and then try the build again this time removing the /m flag from the msbuild command line.

(26 Oct '16, 23:18) grahamb ♦