Writing it for anyone who could have same problems.
I was a TOTAL idiot. I was trying to compile it in the folder on my iRiver - thus, on fat32 fs! Fortunately, it doesn't see the difference between UPPER & lower case, so there are wonderful problems with filenames.
My advice to you - until you can format your iRiver to another fs, don't do on that disc smth from *nix, until you love problems. Just copy there your music and rockbox and forget about it until you're going out.