Hi! I've seen similar issues but don't want to hijack those threads, as they did not solve my problem... I have just started trying to build Wireshark using cmake/msbuild but I fail (64 bit Windows 7, MSVC2015). I try making my build directory with the following command:
However, when I try to build it ( I then made my build directory without the guides ( I then tried to build only that one, as per suggestion ion another thread:
Checking the log file, I get the following errors:
Does anyone have an idea of why this is failing? Seems there is some input to the runa2x.sh missing; could I be missing some environment variable!? Thanks in advance, /Johan asked 02 May '16, 00:35 w8lle edited 02 May '16, 01:16 grahamb ♦ |
One Answer:
You're attempting to build with VS2015 which is not yet officially supported, VS2013 is still the "official" compiler for Windows builds. Having said that, the issue you have doesn't seem to be related to VS2015, but rather that the Cygwin bash shell is having difficulties executing the runa2x.sh script, in particular the line endings in the script. How did you get your sources, from a git clone or from a zip\tarball? Can you check the line-endings of tools\runa2x.sh? My copy, in my git repo, has Unix line endings. answered 02 May '16, 01:22 grahamb ♦ showing 5 of 8 show 3 more comments |
Hi and thanks for the prompt reply!
I get my source code using TortoiseSVN. I've seen in another thread that using GIT could solve the issue, so maybe that's the way to go!?
My script looks like it has Unix line endings; moving it over to a Linux machine and printing it with cat -v did not show any "^M" characters, at least.
I'm mildly surprised that the SVN repo still works, so you're now doing 2 things differently from the Developers Guide instructions, 3 strikes and you're out.
What happens if you execute the command (
path\to\cygwin\bin\bash.exe path/to/runa2x.sh ...
) from the release_notes_html.vcxproj directly? Note you'll have to cd to the sources docbook directory first, and might need to add the Cygwin bin directory to your path.Well, obviously it doesn't work... -As I previously said, maybe I should try to get TurtoiseGIT working...
I went in to the "....\Build\docbook" directory and executed: "C:\cygwin64\bin\base32.exe" "C:\user\Wireshark\eWireshark\trunk\tools\runa2x.sh"
It doesn't report errors; gives me some encoded(?) string...
Hmm. Still not following instructions :-)
cd to the source docbook directory not the build one, and execute the full command as found in the project file. There's not much point showing you what I have as a command as we have different paths to Cygwin and the sources and build directories.
I downloaded Wireshark using GIT and I don't have this issue any longer. I'll keep looking in to this though, as it is annoying that I don't understand...
Thanks for your help!
Anyway, just as an FYI...
Sorry about the confusion! -I'm more used to using Wireshark than actually building it...
I get the same error:
C:\username\Wireshark\eWireshark\trunk\docbook> C:\cygwin64\bin\bash.exe /cygdrive/c/username/Wireshark/eWireshark/trunk/tools/runa2x.sh --format=xhtml --destination-dir=/cygdrive/c/username/Wireshark/eWireshark/Build/docbook --asciidoc-opts= --fop --stylesheet=ws.css release-notes.asciidoc /cygdrive/c/username/Wireshark/eWireshark/trunk/tools/runa2x.sh: line 2: $'\r': command not found /cygdrive/c/username/Wireshark/eWireshark/trunk/tools/runa2x.sh: line 25: $'\r': command not found /cygdrive/c/username/Wireshark/eWireshark/trunk/tools/runa2x.sh: line 30: $'\r': command not found /cygdrive/c/username/Wireshark/eWireshark/trunk/tools/runa2x.sh: line 54: syntax error: unexpected end of file
It was the EOL style that was the issue, as you already suspected! -Changing it to Unix style solved the issue!
If an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.
Shell scripts in Git checkouts should have UNIX-style line endings on all platforms because we have
*.sh eol=lf
in.gitattributes
. Tarballs are created from a Git checkout on Linux, so they should have UNIX-style line endings as well.I'm not sure how you'd translate Git's
eol=lf
attribute to ansvn:eol-style
property.