New issue 34 by eddie.ringle: BuildNumber fails to build in VS 2008
http://code.google.com/p/crisscross/issues/detail?id=34
CrissCross is checked out as a submodule in my project, and CMake generates
the solution but when I build my project, BuildNumber fails with the
following output:
1>------ Build started: Project: BuildNumber, Configuration: Debug Win32 --
----
1>Generating crisscross/build_number.h
1>/cygdrive/d/dev/repos/git/inceku/contrib/crisscross/tools/gen_buildnum_h.
sh: line 2: $'\r': command not found
1>/cygdrive/d/dev/repos/git/inceku/contrib/crisscross/tools/gen_buildnum_h.
sh: line 116: syntax error: unexpected end of file
1>Project : error PRJ0002 : Error result 2 returned from
'C:\WINDOWS\system32\cmd.exe'.
1>Build log was saved at
"file://d:\dev\repos\git\inceku\contrib\crisscross\source\BuildNumber.dir\D
ebug\BuildLog.htm"
1>BuildNumber - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
On line 2 of gen_buildnum_h.sh I guess it tries loading ~/.bashrc, which is
nonexistent
on my computer.
Do you have Cygwin installed at least?
Yup.
It looks like your copy of gen_buildnum_h.sh has \r\n line endings for some
reason (not so in the repo).
dos2unix it and it should work fine.
Thanks, now it builds. However, it does give a few extra lines:
1>/cygdrive/d/dev/repos/git/inceku/contrib/crisscross/tools/gen_buildnum_h.sh:
line
7:
rev: command not found
1>/cygdrive/d/dev/repos/git/inceku/contrib/crisscross/tools/gen_buildnum_h.sh:
line
7:
rev: command not found
1>Is CrissCross under version control? No
This shouldn't cause any problems? Correct?
That DOES cause problems because buildnum.h is then BROKEN.
Install the util-linux package via the Cygwin installer.
Yep, that fixed it.
However, I don't think a Windows developer should have to install Cygwin in
order to
build, especially if it's not noted in the documentation. ;)
Comment #8 on issue 34 by steven.noonan: BuildNumber fails to build in VS
2008
http://code.google.com/p/crisscross/issues/detail?id=34
I agree. Go ahead and come up with a better solution, then. ;)