Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Kalbintion on January 04, 2010, 07:54:17 AM

Title: SVN Errors Within Cygwin
Post by: Kalbintion on January 04, 2010, 07:54:17 AM
Getting the following list of error feed when attempting to make the latest build via Cygwin. All works according to the Simple Guide to Compiling up until the 'make' portion (Specifically, section 3 B is when it speaks of using the 'make' command). Not exactly sure why, seeing as i cd into the recommended folder name, build under the rockbox development directory (in my case its G:/rockbox/, and build directory being G:/rockbox/build/) and creating the build without any errors at all...

Code: [Select]
svn: '\cygdrive\g\rockbox' does not exist
svn: '\cygdrive\g\rockbox\tools' does not exist
Generating dependencies
/bin/sh: /cygdrive/g/rockbox/tools/addtargetdir.pl: /usr/bin/perl^M: bad interpreter: Invalid argument
Can't open perl script "/cygdrive/g/rockbox/tools/multigcc.pl": No such file or directory
Can't open perl script "/cygdrive/g/rockbox/tools/multigcc.pl": No such file or directory
/bin/sh: /cygdrive/g/rockbox/tools/addtargetdir.pl: /usr/bin/perl^M: bad interpreter: Invalid argument
Can't open perl script "/cygdrive/g/rockbox/tools/multigcc.pl": No such file or directory
/bin/sh: /cygdrive/g/rockbox/tools/addtargetdir.pl: /usr/bin/perl^M: bad interpreter: Invalid argument
svn: '\cygdrive\g\rockbox' does not exist
svn: '\cygdrive\g\rockbox\tools' does not exist
CC tools/rdf2binary
make: gcc: Command not found
make: *** [/cygdrive/g/rockbox/tools/rdf2binary] Error 127
Title: Re: SVN Errors Within Cygwin
Post by: torne on January 04, 2010, 07:57:30 AM
Your line endings are being interpreted incorrectly. Did you select unix or dos line endings when you installed cygwin, and what are you using to get the source?
Title: Re: SVN Errors Within Cygwin
Post by: Kalbintion on January 04, 2010, 08:04:13 AM
Whatever the default line endings would be is what I would guess Cygwin selected. As i do not recall ever actually selecting any specific one when installing it. And i am using SlikSVN x86 (32 bit) (http://www.sliksvn.com/en/download/) to acquire the source code via the CMD Shell in Win XP SP3, which honestly, are they (the SVN programs) not all the same in essence in acquiring the files?
Title: Re: SVN Errors Within Cygwin
Post by: torne on January 04, 2010, 08:18:29 AM
Windows SVN programs will download the files with DOS line endings. The command line svn program in Cygwin will download the files with UNIX line endings. You will probably find it works if you check out the code with Cygwin's command line svn. You may also be able to get it to work by changing Cygwin's line ending settings but this is a bit of a nasty hack. Cygwin defaults (correctly) to UNIX line endings as this is the only option guaranteed to behave consistently.
Title: Re: SVN Errors Within Cygwin
Post by: Kalbintion on January 04, 2010, 08:37:31 AM
Which I'd assume goes back to the whole fact that Windows uses 2 bytes to indicate a line return where Unix uses one... If so, life is life and that problem is easily fixable for me. I have no problem using a compatible text editor on Windows, I do enjoy programming on Win, *Nix, and Mac systems simultaneously :)

But, to which what you had said. Using the built-in svn command of cygwin is still causing the make to fail with the same lines as my original post.
Title: Re: SVN Errors Within Cygwin
Post by: [Saint] on January 04, 2010, 04:19:53 PM
Kalbintion,

Is G:/rockbox the directory that the SVN revision was checked out into?

I mean, are you building to a sub-dir in your source directory, or another directory altogether?

If it's the latter, that'd explain it.

[St.]
Title: Re: SVN Errors Within Cygwin
Post by: GodEater on January 04, 2010, 04:27:21 PM
No it wouldn't.

The problem is precisely what torne has said.

The solution is to change his line endings in the source files he has. This either means getting a decent SVN client, or a reinstall of cygwin to the appropriate line ending.
Title: Re: SVN Errors Within Cygwin
Post by: Kalbintion on January 04, 2010, 04:35:05 PM
my list of commands for pulling SVN and attempting to compile

Code: [Select]
cd G:/
svn co svn://svn.rockbox.org/rockbox/trunk rockbox
cd G:/rockbox
mkdir build
cd build
../tools/configure
  56
  N
make

im attempting to have this as a normal installation for the e200v2 [hence the '56' and 'N' in the list of commands]


Also, i never set any line ending options in cygwin so its default should be what it wishes to chose which i would hope to be the UNIX one. Also if you read GodEater, i used the built-in command that torne said to use and the same error had occured
Title: Re: SVN Errors Within Cygwin
Post by: saratoga on January 04, 2010, 05:02:10 PM
Just check the line endings in your files and that will settle if they are correct. 
Title: Re: SVN Errors Within Cygwin
Post by: Kalbintion on January 04, 2010, 07:32:24 PM
Well, i used a hex editor and checked out a single file, the one im actually particularly interested in editing right now (pegbox) and found that, there is indeed a DOS line return instead of UNIX, regardless if i used Cygwin or windows-based SVN to get the files.
Title: Re: SVN Errors Within Cygwin
Post by: GodEater on January 05, 2010, 03:34:35 AM
This sort of confusion is exactly why we recommend using VMWare instead of cygwin.
Title: Re: SVN Errors Within Cygwin
Post by: torne on January 05, 2010, 06:40:29 AM
Cygwin svn creates files with UNIX line endings for me, and google suggests that it always does so regardless of the Cygwin line ending setting (though this may no longer be current information?). What fun. :)
Title: Re: SVN Errors Within Cygwin
Post by: roolku on January 05, 2010, 03:17:38 PM
Code: [Select]
cd G:/
svn co svn://svn.rockbox.org/rockbox/trunk rockbox
cd G:/rockbox
mkdir build
cd build
../tools/configure
  56
  N
make

This works as expected on my cygwin installed with line UNIX endings (the default).
Title: Re: SVN Errors Within Cygwin
Post by: torne on January 05, 2010, 04:15:26 PM
Just one point: svn is not built into Cygwin, it is not installed unless you asked for it specifically. It's possible that the Windows svn program you have installed includes the command line svn, and this has been inserted into your path? The actual Windows command line binary of svn will of course translate to Windows style line endings...
Title: Re: SVN Errors Within Cygwin
Post by: roolku on January 05, 2010, 04:29:49 PM
If you run the quoted commands from the bash shell, no windows path will be searched.

Also rockbox builds fine from source files with DOS/WINDOWS line endings (I have been using tortoise SVN since the change from CVS) so this is not the problem.
Title: Re: SVN Errors Within Cygwin
Post by: Kalbintion on January 05, 2010, 05:54:04 PM
i used to use tortoise SVN, so i may switched to them instead of this slikSVN, ill let you know what i find with that roolku. I did get VMWare working 100% fine though so i have that as a backup just in case (much prefer cygwin due to not having to boot up all the time let alone have it in a constant state of being 'on'). And torne, yes you are right, it isnt built-in. And the program i installed does modify the %PATH% variable but, through a bit of testing, cygwin never actually went through the %PATH% environmental variable set by windows.
Title: Re: SVN Errors Within Cygwin
Post by: GodEater on January 06, 2010, 09:15:09 AM
What does :

Code: [Select]
which svn
say when you run it from the cygwin prompt?
Title: Re: SVN Errors Within Cygwin
Post by: roolku on January 06, 2010, 10:22:30 AM
Okay, I think the UNIX/WINDOWS line endings is not an issue here. Looking at the original post the first error is:

Quote
svn: '\cygdrive\g\rockbox' does not exist

This is clearly an output from version.sh and the problem is that the argument to it contains backward slashes and not forward slashes.

The argument comes from the make file as $(ROOTDIR)

So Kalbintion, before running make can you check the third line of the Makefile that has been created by running ../tools/configure and tell us what it says? Then we can try and reason how it got there. :)