Error compiling Gigi : libltdl issues

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
romain_le_clampin
Space Krill
Posts: 2
Joined: Mon Aug 20, 2012 2:23 pm

Error compiling Gigi : libltdl issues

#1 Post by romain_le_clampin »

Hello,

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 :

Code: Select all

-- Configuring libltdl using "libltdl/configure" ...
-- Configuring GiGi
Error copying file (if different) from "/home/romain/trucs/freeOrion/FreeOrion/GG/libltdl/config.h" to "/home/romain/trucs/freeOrion/FreeOrion/GG/GG/ltdl_config.h".

And of course GG fails to build, with the following error :

Code: Select all

[ 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
Any idea of how to get past this error ?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Error compiling Gigi : libltdl issues

#2 Post by Geoff the Medio »

Someone on IRC was having a similar problem, about which he wrote:
zhur wrote:./libltdl/configure used to generate it doesn't have execution permission
. So try adding execute permission to that file?

This is probably an issue with moving the GG code into the FreeOrion repository...

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: Error compiling Gigi : libltdl issues

#3 Post by zhur »

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).
Attachments
gg-fix-update.zip
(327.73 KiB) Downloaded 114 times
Last edited by zhur on Thu Aug 23, 2012 7:15 am, edited 1 time in total.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Error compiling Gigi : libltdl issues

#4 Post by Vezzra »

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
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

Re: Error compiling Gigi : libltdl issues

#5 Post by raptor »

FYI - the easiest way to convert files with different line endings are the utilities 'dos2unix' and 'unix2dos'

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: Error compiling Gigi : libltdl issues

#6 Post by zhur »

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.

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: Error compiling Gigi : libltdl issues

#7 Post by zhur »

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.]


User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Error compiling Gigi : libltdl issues

#8 Post by Vezzra »

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?

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: Error compiling Gigi : libltdl issues

#9 Post by zhur »

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!

Post Reply