Scons -c throwing an exception, generally going haywire.

Scons -c throwing an exception, generally going haywire.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Scons -c throwing an exception, generally going haywire.

Post by YokoZar »

Something is really really weird with building, at least on Linux.

Download and extract the new source, then run scons -c. This should do nothing, as there's nothing to clean. Instead, it bugs out and throws an exception.

This is a problem, as it prevents Linux packages from building properly since the package build process will stop when an unhandled exception comes up.

Now, run scons configure. it seems to be working fine. But suppose we now need to clean up, such as when building a package. This time scons -c doesn't crash; instead, it behaves very wierdly:

Code: Select all

scons -c
scons: Reading SConscript files ...
rm -f *.o streflop.a libstreflop.a arithmeticTest randomTest 
make -C libm clean
rm -f flt-32/*.o dbl-64/*.o ldbl-96/*.o flt-target dbl-target ldbl-target
Succes building streflop!
scons: done reading SConscript files.
scons: Cleaning targets ...
scons: done cleaning targets.
Why is it building anything when I gave it the clean command?

Even weirder, after this step a whole bunch of (empty) directories get deleted, and some binary files are left lying around. Here's what dpkg found when building:

Code: Select all

scott@scott-desktop:~/debian/spring/spring-0.75~b1$ dpkg-buildpackage -S -rfakeroot
dpkg-buildpackage: source package is spring
dpkg-buildpackage: source version is 0.75~b1-1
dpkg-buildpackage: source changed by Scott Ritchie <scottritchie@ubuntu.com>
dpkg-buildpackage: source version without epoch 0.75~b1-1
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
scons -c
scons: Reading SConscript files ...
rm -f *.o streflop.a libstreflop.a arithmeticTest randomTest 
make -C libm clean
rm -f flt-32/*.o dbl-64/*.o ldbl-96/*.o flt-target dbl-target ldbl-target
Succes building streflop!
scons: done reading SConscript files.
scons: Cleaning targets ...
scons: done cleaning targets.
dh_clean 
 dpkg-source -b spring-0.75~b1
dpkg-source: building spring using existing spring_0.75~b1.orig.tar.gz
dpkg-source: building spring in spring_0.75~b1-1.diff.gz
dpkg-source: cannot represent change to rts/build/scons/filelist.pyc: binary file contents changed
dpkg-source: cannot represent change to rts/build/scons/rts.pyc: binary file contents changed
dpkg-source: cannot represent change to rts/build/scons/config.pyc: binary file contents changed
dpkg-source: cannot represent change to rts/build/scons/detect.pyc: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_10' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_10: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_12' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_12: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_18' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_18: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_23' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_23: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_25' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_25: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_28' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_28: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_30' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_30: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_32' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_32: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_10.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_11.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_12.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_13.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_14.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_15.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_16.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_17.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_18.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_19.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_20.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_21.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_22.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_23.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_24.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_25.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_26.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_27.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_28.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_29.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_30.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_31.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_32.o: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_2' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_2: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_4' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_4: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_6' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_6: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_8' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_8: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_1.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_2.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_3.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_4.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_5.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_6.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_7.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_8.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_9.o: binary file contents changed
dpkg-source: cannot represent change to build/scons_signatures.dblite: binary file contents changed
dpkg-source: warning: ignoring deletion of directory AI/Global/KAI-0.12/build-gcc-32
dpkg-source: warning: ignoring deletion of directory AI/Global/KAI-0.12/build-mingw-32
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/log
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/cache
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/learn
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/learn/map
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/learn/mod
dpkg-source: warning: ignoring deletion of directory game/AI/Bot-libs
dpkg-source: warning: ignoring deletion of directory game/AI/Helper-libs
dpkg-source: warning: ignoring deletion of directory game/base
dpkg-source: warning: ignoring deletion of directory game/base/spring
dpkg-source: warning: ignoring deletion of directory game/maps
dpkg-source: warning: ignoring deletion of directory game/mods
dpkg-source: warning: ignoring deletion of directory installer/builddata/springcontent/gamedata/explosions
dpkg-source: building spring in spring_0.75~b1-1.dsc
dpkg-source: unrepresentable changes to source
Note all the .o and .pyc files that should have been removed at the clean step.


What's going on? The best guess I have is some weirdness in our scons scripts that I don't yet understand.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Scons -c throwing an exception, generally going haywire.

Post by Tobi »

YokoZar wrote:Now, run scons configure. it seems to be working fine. But suppose we now need to clean up, such as when building a package. This time scons -c doesn't crash; instead, it behaves very wierdly:

Code: Select all

scons -c
scons: Reading SConscript files ...
rm -f *.o streflop.a libstreflop.a arithmeticTest randomTest 
make -C libm clean
rm -f flt-32/*.o dbl-64/*.o ldbl-96/*.o flt-target dbl-target ldbl-target
Succes building streflop!
scons: done reading SConscript files.
scons: Cleaning targets ...
scons: done cleaning targets.
Why is it building anything when I gave it the clean command?
The message is just wrong, it isn't really building anything. (It always says 'Success building streflop' after calling the makefile, even if it actually called make clean.)
Even weirder, after this step a whole bunch of (empty) directories get deleted, and some binary files are left lying around. Here's what dpkg found when building:

Code: Select all

scott@scott-desktop:~/debian/spring/spring-0.75~b1$ dpkg-buildpackage -S -rfakeroot
dpkg-buildpackage: source package is spring
dpkg-buildpackage: source version is 0.75~b1-1
dpkg-buildpackage: source changed by Scott Ritchie <scottritchie@ubuntu.com>
dpkg-buildpackage: source version without epoch 0.75~b1-1
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
scons -c
scons: Reading SConscript files ...
rm -f *.o streflop.a libstreflop.a arithmeticTest randomTest 
make -C libm clean
rm -f flt-32/*.o dbl-64/*.o ldbl-96/*.o flt-target dbl-target ldbl-target
Succes building streflop!
scons: done reading SConscript files.
scons: Cleaning targets ...
scons: done cleaning targets.
dh_clean 
 dpkg-source -b spring-0.75~b1
dpkg-source: building spring using existing spring_0.75~b1.orig.tar.gz
dpkg-source: building spring in spring_0.75~b1-1.diff.gz
dpkg-source: cannot represent change to rts/build/scons/filelist.pyc: binary file contents changed
dpkg-source: cannot represent change to rts/build/scons/rts.pyc: binary file contents changed
dpkg-source: cannot represent change to rts/build/scons/config.pyc: binary file contents changed
dpkg-source: cannot represent change to rts/build/scons/detect.pyc: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_10' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_10: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_12' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_12: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_18' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_18: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_23' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_23: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_25' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_25: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_28' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_28: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_30' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_30: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_32' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_32: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_10.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_11.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_12.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_13.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_14.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_15.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_16.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_17.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_18.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_19.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_20.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_21.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_22.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_23.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_24.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_25.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_26.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_27.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_28.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_29.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_30.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_31.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_32.o: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_2' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_2: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_4' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_4: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_6' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_6: binary file contents changed
dpkg-source: warning: executable mode 0755 of `build/sconf_temp/conftest_8' will not be represented in diff
dpkg-source: cannot represent change to build/sconf_temp/conftest_8: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_1.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_2.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_3.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_4.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_5.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_6.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_7.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_8.o: binary file contents changed
dpkg-source: cannot represent change to build/sconf_temp/conftest_9.o: binary file contents changed
dpkg-source: cannot represent change to build/scons_signatures.dblite: binary file contents changed
dpkg-source: warning: ignoring deletion of directory AI/Global/KAI-0.12/build-gcc-32
dpkg-source: warning: ignoring deletion of directory AI/Global/KAI-0.12/build-mingw-32
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/log
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/cache
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/learn
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/learn/map
dpkg-source: warning: ignoring deletion of directory game/AI/AAI/learn/mod
dpkg-source: warning: ignoring deletion of directory game/AI/Bot-libs
dpkg-source: warning: ignoring deletion of directory game/AI/Helper-libs
dpkg-source: warning: ignoring deletion of directory game/base
dpkg-source: warning: ignoring deletion of directory game/base/spring
dpkg-source: warning: ignoring deletion of directory game/maps
dpkg-source: warning: ignoring deletion of directory game/mods
dpkg-source: warning: ignoring deletion of directory installer/builddata/springcontent/gamedata/explosions
dpkg-source: building spring in spring_0.75~b1-1.dsc
dpkg-source: unrepresentable changes to source
Note all the .o and .pyc files that should have been removed at the clean step.


What's going on? The best guess I have is some weirdness in our scons scripts that I don't yet understand.
This seems weird...

In any case the buildsystem has quite some weirdness, it really needs another rewrite TBH. (and I'm not sure using scons again would be a really good idea)

Either way, I don't really have time for that, so as long is it doesn't totally fall apart I can live with it...
YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Re: Scons -c throwing an exception, generally going haywire.

Post by YokoZar »

Tobi wrote:The message is just wrong, it isn't really building anything. (It always says 'Success building streflop' after calling the makefile, even if it actually called make clean.)
The message isn't to be ignored, it's definately indicating some weirdness, you can check it for yourself. Search for .o files in a (fresh) build directory: you should find none. Then run scons configure, then run scons -c -- you'll see some .o files left around. SOMETHING is getting built after clean, unless you've specifically marked those files not to be cleaned with the NoClean() tag.
This seems weird...

In any case the buildsystem has quite some weirdness, it really needs another rewrite TBH. (and I'm not sure using scons again would be a really good idea)

Either way, I don't really have time for that, so as long is it doesn't totally fall apart I can live with it...
Well, I've worked around the problem in the Deb package for now. There is, however, some sort of bug in one of the make files.

Regardless, switching away from scons is not a good idea - it really is the best cross platform build system out there. Especially when compared with autoconf and all that garbage from the stone age.
Post Reply

Return to “Engine”