I have been trying to compile the last SVN version of FreeOrion under linux ( Ubuntu 12.04 ). I am using Boost 1.50.0. I get the following error while running cmake in the GG repertory :
[ 53%] Building C object src/CMakeFiles/GiGi.dir/__/libltdl/ltdl.c.o
/home/romain/trucs/freeOrion/FreeOrion/GG/libltdl/ltdl.c:29:22: fatal error: config.h : No such file or directory
Not only that, all scripts also have Windows-style line endings which prevents them from running correctly. Here are three shell commands to fix both issues (to be run from GG folder):
find -name "*" | xargs file | grep "POSIX" | grep -v ".svn" | cut -d':' -f1 | xargs fromdos
fromdos libltdl/config-h.in
find -name "*" | xargs file | grep "POSIX" | grep -v ".svn" | cut -d':' -f1 | xargs chmod +x
Utility 'fromdos' should be installed with "sudo apt-get install tofrodos" if it's not present.
Edit: or even better, here's the patch (zipped to overcome attachment size restriction).
zhur wrote:...Edit: or even better, here's the patch (zipped to overcome attachment size restriction).
I've applied this patch and committed it to SVN (commit#5159). However, as I don't have a FO dev environment on Linux, I can't test if the SVN versions of the patched script files actually work on Linux now. Can someone of you Linux people do that and report back here if erverything works?
raptor wrote:FYI - the easiest way to convert files with different line endings are the utilities 'dos2unix' and 'unix2dos'
These are pretty much the same utilities. I heard on Debian systems they even link to 'fromdos'. Fromdos is a more failproof solution as dos2unix is absent in Ubuntu Lucid.
Vezzra wrote:I've applied this patch and committed it to SVN (commit#5159). However, as I don't have a FO dev environment on Linux, I can't test if the SVN versions of the patched script files actually work on Linux now. Can someone of you Linux people do that and report back here if erverything works?
No, it still doesn't work as execution permissions are not set for scripts. I am not experienced with SVN but seems like it needs a special property for such files. Here's the patch.
Attachments
[The extension patch has been deactivated and can no longer be displayed.]
zhur wrote:...No, it still doesn't work as execution permissions are not set for scripts. I am not experienced with SVN but seems like it needs a special property for such files...
Commit#5162: "set executable-property on script files in GG/libltdl as suggested by zhur on forums (2nd try to make these scripts work on linux)"
Do these scripts work on Linux now when you check them out of SVN?
Vezzra wrote:Commit#5162: "set executable-property on script files in GG/libltdl as suggested by zhur on forums (2nd try to make these scripts work on linux)"
Do these scripts work on Linux now when you check them out of SVN?
Yes, fresh checkout shows no problems for me. Thanks!