GG: scons trying to install files during build process

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Post Reply
Message
Author
obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

GG: scons trying to install files during build process

#1 Post by obgr_seneca » Wed Dec 17, 2008 9:02 am

Strangely enough I'm now facing a different problem, when trying to build with some test-directory as prefix, I'm getting an error-message about some boost-header, that will be solved in the near future, as Zach said in another topic.
Now I tried installing it for real into /usr and I'm getting the following:

Code: Select all

g++ -o tutorial/minimal.o -c -pthread -Wall -O2 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/freetype2 -I. -Ilibltdl -I/usr/include/SDL tutorial/minimal.cpp
Install file: "libGiGi.so" as "/usr/lib/libGiGi.so.0.6.0"
scons: *** [/usr/lib/libGiGi.so.0.6.0] /usr/lib/libGiGi.so.0.6.0: Permission denied
So you have to be root during the "scons" step of the installation, normaly this should only be necessary during "scons install".
Normally this wouldn't be a problem if you just tried to install GG, but if you try to build an rpm-package, you won't get any further here.
So why is this installation of libGiGi during the compile run necessary? Can't that be changed back to the old behaviour?

Oliver

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: GG: scons trying to install files during build process

#2 Post by obgr_seneca » Fri Dec 19, 2008 11:11 pm

Could anyone at least try to confirm it?

Steps to reproduce: Sty user for the following steps: Then run

Code: Select all

scons configure prefix=/usr
and then

Code: Select all

scons
It should cancel the compile telling you it doesn't have the rights to write some file to /usr/lib/
This should not be the case, it shouldn't try to install anything before the

Code: Select all

scons install
step.
And does anyone have an idea, why it is behaving like that? I tried to look into some files but didn't find anything, but I don't know much about scons...

Oliver

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: GG: scons trying to install files during build process

#3 Post by loonycyborg » Mon Dec 22, 2008 11:25 am

I confirm this issue.
In Soviet Russia, forum posts YOU!!

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: GG: scons trying to install files during build process

#4 Post by loonycyborg » Mon Dec 22, 2008 11:43 am

It happens because GG's scons script now builds tutorials too. Based on LIBS and LIBPATH scons figures out that tutorial binaries depend on GG libs located in install target dir and tries to build them. Solution: prepend "." to LIBPATH so it'll depend on libs in GG's compile dir.

Code: Select all

Index: SConstruct
===================================================================
--- SConstruct  (revision 688)
+++ SConstruct  (working copy)
@@ -643,7 +643,7 @@

     # The tutorials depend on libGiGiSDL, so we add targets for them here
     tutorial_env = sdl_env.Copy()
-    tutorial_env.AppendUnique(LIBPATH = ['.'])
+    tutorial_env.PrependUnique(LIBPATH = ['.'])
     tutorial_env.AppendUnique(LIBS = ['GiGi', 'GiGiSDL'])
     if str(Platform()) == 'win32':
         tutorial_env.AppendUnique(LIBS = [
In Soviet Russia, forum posts YOU!!

obgr_seneca
Space Floater
Posts: 34
Joined: Wed Mar 12, 2008 9:00 am
Location: Horb, Germany

Re: GG: scons trying to install files during build process

#5 Post by obgr_seneca » Mon Dec 22, 2008 8:48 pm

Thanks!

That solved it...

GG and FO built just fine now!

Oliver

User avatar
tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: GG: scons trying to install files during build process

#6 Post by tzlaine » Tue Dec 30, 2008 2:55 am

Nice catch. Committed.

Post Reply