2024-04-25 03:15 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002109Spring engineLinuxpublic2011-06-10 15:56
Reporterdfreeman 
Assigned Tohoijui 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version0.82.5 
Target VersionFixed in Version0.82.7+git 
Summary0002109: "make install-spring" does too much
DescriptionLike most people, I tend to run "make install" as superuser. But the current workflow of "cmake .", "make spring", "sudo make install-spring" has a lot of extra stuff being built as the superuser. It seems to be mainly building the AIs in the installation, which should have been built under "make spring".

Aside from the known dangers of doing too much as root, this also leaves behind files belonging to root that won't be overwritten during subsequent builds as a regular user.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0005503

dfreeman (reporter)

Also, the install fails. Here are the last few lines of output:

[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/__/__/rts/Map/SMF/SmfMapFile.cpp.o
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/__/__/rts/Rendering/Textures/Bitmap.cpp.o
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/unitsync.cpp.o
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/LuaParserAPI.cpp.o
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/Syncer.cpp.o
[100%] Building CXX object tools/unitsync/CMakeFiles/unitsync.dir/stdafx.cpp.o
Linking CXX shared module ../../libunitsync.so
[100%] Built target unitsync
Scanning dependencies of target gamedata
Using build directory: /opt/spring_0.82.5/base/ ...
Updating spring/bitmaps.sdz
Updating springcontent.sdz
Updating maphelper.sdz
Updating cursors.sdz
[100%] Built target gamedata
Scanning dependencies of target install-spring
[100%] spring: Installing ...
-- Install configuration: "RELWITHDEBINFO"
CMake Error at rts/builds/default/cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/opt/spring_0.82.5/rts/builds/default/CMakeFiles/CMakeRelink.dir/spring"
  to install.


make[3]: *** [rts/builds/default/CMakeFiles/install-spring] Error 1
make[2]: *** [rts/builds/default/CMakeFiles/install-spring.dir/all] Error 2
make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Error 2
make: *** [install-spring] Error 2

~0005516

hoijui (reporter)

thanks :-)

should be fixed by:
http://github.com/spring/spring/commit/4d36af91240c39b6bf50caf3909648ef69d5e6dd

~0005577

dfreeman (reporter)

I'm quite the novice with GIT, I come from SVN-land. My apologies if this is irrelevant. Probably the fix just isn't in the stable branch.

I've just checked out the "remote/origin/0.82-branch", and done the following:

cmake .
make
sudo make install-spring

The last step, installing, gave the following error, which is basically the same one as before:

--------8<--------8<--------8<--------

[ 97%] Built target gamedata
Scanning dependencies of target install-spring
[ 97%] spring: Installing ...
-- Install configuration: "RELWITHDEBINFO"
CMake Error at rts/builds/default/cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/home/dfreeman/spring/rts/builds/default/CMakeFiles/CMakeRelink.dir/spring"
  to install.


make[3]: *** [rts/builds/default/CMakeFiles/install-spring] Error 1
make[2]: *** [rts/builds/default/CMakeFiles/install-spring.dir/all] Error 2
make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Error 2
make: *** [install-spring] Error 2

~0005578

SirMaverick (reporter)

> Probably the fix just isn't in the stable branch.
It isn't. You can check for example with
"git branch --contains 4d36af91240c39b6bf50caf3909648ef69d5e6dd"

~0005629

dfreeman (reporter)

Could you please apply this to the branch? I presume there will be another point release. It's not great that the install script fails :)

~0005630

hoijui (reporter)

just run all the compile targets manually, before running the install target.
spring
unitsync
AAI
KAIK
...

~0005632

dfreeman (reporter)

That doesn't fix the second part of the bug:

[ 97%] spring: Installing ...
-- Install configuration: "RELWITHDEBINFO"
CMake Error at rts/builds/default/cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/home/dfreeman/spring/rts/builds/default/CMakeFiles/CMakeRelink.dir/spring"
  to install.

~0005633

dfreeman (reporter)

I have to manually symlink a bunch of files to get the install to succeed. Here's an example fix to get a fresh source tree to build and install.

cmake .
make

ln -s ../../../../../spring rts/builds/default/CMakeFiles/CMakeRelink.dir/
ln -s ../../../../../spring-multithreaded rts/builds/GML/CMakeFiles/CMakeRelink.dir/
ln -s ../../../../libunitsync.so tools/unitsync/CMakeFiles/CMakeRelink.dir/
ln -s ../../libSkirmishAI.so AI/Skirmish/AAI/CMakeFiles/CMakeRelink.dir/
ln -s ../../libSkirmishAI.so AI/Skirmish/RAI/CMakeFiles/CMakeRelink.dir/
ln -s ../../libSkirmishAI.so AI/Skirmish/KAIK/CMakeFiles/CMakeRelink.dir/
ln -s ../../libSkirmishAI.so AI/Skirmish/CppTestAI/CMakeFiles/CMakeRelink.dir/

sudo make install-spring install-spring-multithreaded

~0005634

dfreeman (reporter)

Actually the relative links don't work. I've been using absolute links before, which worked, but now I find that the install script copies the links and not what they point to. Thus, relative links will fail.

~0005640

hoijui (reporter)

"make RAI" does not link RAI?
well... as you solved it for you now... :D

~0005662

dfreeman (reporter)

I followed hoijui's comments under bug 2138, and applied the fix as follows:
git fetch
git cherry-pick 4d36af91240c39b6bf50caf3909648ef69d5e6dd

It still fails to install:


Scanning dependencies of target install-spring-default
[ 97%] spring-default: Installing ...
-- Install configuration: "RELWITHDEBINFO"
CMake Error at rts/builds/default/cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/home/dfreeman/spring-src/rts/builds/default/CMakeFiles/CMakeRelink.dir/spring"
  to install.


make[3]: *** [rts/builds/default/CMakeFiles/install-spring-default] Error 1
make[2]: *** [rts/builds/default/CMakeFiles/install-spring-default.dir/all] Error 2
make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Error 2
make: *** [install-spring] Error 2

~0005746

hoijui (reporter)

please test in master, and if its fixed there, it will be in the next mayor release or earlier.

~0005768

dfreeman (reporter)

I just tested master in the following way. SUSE 11.2, x86-64.

git clone git://github.com/spring/spring.git
cd spring
cmake .
make
sudo make install-spring install-spring-multithreaded

It failed during the last step, installation. So this bug is not fixed, and the next release will fail to install on Linux when compiled from source, as did all of the 0.82 series AFAIK.

--------8<--------8<--------8<--------8<--------

Scanning dependencies of target spring-default
[100%] spring-default: Building all dependencies ...
[100%] Built target spring-default
Scanning dependencies of target install-spring-default
[100%] spring-default: Installing ...
-- Install configuration: "RELWITHDEBINFO"
CMake Error at rts/builds/default/cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/home/dfreeman/spring/rts/builds/default/CMakeFiles/CMakeRelink.dir/spring"
  to install.


make[3]: *** [rts/builds/default/CMakeFiles/install-spring-default] Error 1
make[2]: *** [rts/builds/default/CMakeFiles/install-spring-default.dir/all] Error 2
make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Error 2
make: *** [install-spring] Error 2

~0005797

dfreeman (reporter)

I just tested 0.82.6.1 in the following way.

cmake .
make
sudo make install

This is contrary to the instructions in http://springrts.com/wiki/Build_from_source , however the result was successful.

During the install step, these lines of output appeared in red. Presumably this is a warning that the script is doing things as root that ought not to be done.

--------8<--------8<--------8<--------8<--------8<--------8<--------

Linking CXX shared module CMakeFiles/CMakeRelink.dir/libSkirmishAI.so
Linking CXX shared module CMakeFiles/CMakeRelink.dir/libSkirmishAI.so
Linking CXX shared module CMakeFiles/CMakeRelink.dir/libSkirmishAI.so
Linking CXX shared module CMakeFiles/CMakeRelink.dir/libSkirmishAI.so
Linking CXX shared module CMakeFiles/CMakeRelink.dir/libSkirmishAI.so
Linking CXX shared module CMakeFiles/CMakeRelink.dir/libunitsync.so
Linking CXX executable CMakeFiles/CMakeRelink.dir/spring
Linking CXX executable CMakeFiles/CMakeRelink.dir/spring-multithreaded
Linking CXX executable CMakeFiles/CMakeRelink.dir/engine-dedicated
Linking CXX shared library CMakeFiles/CMakeRelink.dir/libspringserver.so
Linking CXX executable CMakeFiles/CMakeRelink.dir/spring-headless

~0006720

hoijui (reporter)

solved somewhen shortly after the 0.82.7.1 release
+Notes

-Issue History
Date Modified Username Field Change
2010-09-12 17:05 dfreeman New Issue
2010-09-12 17:08 dfreeman Note Added: 0005503
2010-09-14 11:16 hoijui Note Added: 0005516
2010-09-14 11:16 hoijui Status new => resolved
2010-09-14 11:16 hoijui Resolution open => fixed
2010-09-14 11:16 hoijui Assigned To => hoijui
2010-09-19 15:02 dfreeman Note Added: 0005577
2010-09-19 15:02 dfreeman Status resolved => assigned
2010-09-19 15:02 dfreeman Resolution fixed => reopened
2010-09-19 21:15 SirMaverick Note Added: 0005578
2010-09-23 07:58 dfreeman Note Added: 0005629
2010-09-23 09:46 hoijui Note Added: 0005630
2010-09-23 16:03 dfreeman Note Added: 0005632
2010-09-23 16:13 dfreeman Note Added: 0005633
2010-09-23 17:19 dfreeman Note Added: 0005634
2010-09-23 19:22 hoijui Note Added: 0005640
2010-09-26 16:34 dfreeman Note Added: 0005662
2010-10-15 20:40 hoijui Note Added: 0005746
2010-10-21 09:57 dfreeman Note Added: 0005768
2010-10-28 05:53 dfreeman Note Added: 0005797
2011-06-10 15:56 hoijui Note Added: 0006720
2011-06-10 15:56 hoijui Status assigned => resolved
2011-06-10 15:56 hoijui Fixed in Version => 0.82.7+git
2011-06-10 15:56 hoijui Resolution reopened => fixed
+Issue History