skydevgit / crisscross

Automatically exported from code.google.com/p/crisscross
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

BuildNumber fails to build in VS 2008 #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 ==========

Original issue reported on code.google.com by eddie.ri...@gmail.com on 25 Apr 2009 at 7:07

GoogleCodeExporter commented 9 years ago
On line 2 of gen_buildnum_h.sh I guess it tries loading ~/.bashrc, which is 
nonexistent 
on my computer.

Original comment by eddie.ri...@gmail.com on 25 Apr 2009 at 7:17

GoogleCodeExporter commented 9 years ago
Do you have Cygwin installed at least?

Original comment by steven.n...@gmail.com on 25 Apr 2009 at 8:09

GoogleCodeExporter commented 9 years ago
Yup.

Original comment by eddie.ri...@gmail.com on 26 Apr 2009 at 3:18

GoogleCodeExporter commented 9 years ago
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.

Original comment by steven.n...@gmail.com on 26 Apr 2009 at 5:15

GoogleCodeExporter commented 9 years ago
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?

Original comment by eddie.ri...@gmail.com on 26 Apr 2009 at 11:36

GoogleCodeExporter commented 9 years ago
That DOES cause problems because buildnum.h is then BROKEN.

Install the util-linux package via the Cygwin installer.

Original comment by steven.n...@gmail.com on 26 Apr 2009 at 2:21

GoogleCodeExporter commented 9 years ago
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. ;)

Original comment by eddie.ri...@gmail.com on 26 Apr 2009 at 3:32

GoogleCodeExporter commented 9 years ago
I agree. Go ahead and come up with a better solution, then. ;)

Original comment by steven.n...@gmail.com on 26 Apr 2009 at 4:52

GoogleCodeExporter commented 9 years ago
We now just require Perl (which you should have installed if you have Git 
installed) 
instead.

Original comment by neunon on 11 Aug 2009 at 4:39