2025-07-24 00:37 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004507Spring engineGeneralpublic2014-08-16 12:49
ReporterSvenstaro 
Assigned Tocleanrock 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0004507: spring doesn't compile on boost 1.56
DescriptionWell, spring doesn't compile on boost 1.56 and this is due to multiple issues that seem to be easy to fix from a quick glance. I'm not going to post logs here as it's always reproducible as long as you attempt to compile with boost 1.56. This is due to changes in boost.optional among other things.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • log file icon build.log (50,201 bytes) 2014-08-15 11:58
  • patch file icon optional.patch (470 bytes) 2014-08-16 08:43 -
    diff --git a/rts/System/ThreadPool.cpp b/rts/System/ThreadPool.cpp
    index 0ce4b11..8e9d68e 100644
    --- a/rts/System/ThreadPool.cpp
    +++ b/rts/System/ThreadPool.cpp
    @@ -136,12 +136,11 @@ static bool DoTask(boost::shared_lock<boost::shared_mutex>& lk_)
     static bool DoTask(std::shared_ptr<ITaskGroup> tg)
     {
     	auto p = tg->GetTask();
    -	const bool f = p;
    -	if (f) {
    +	if (p) {
     		SCOPED_MT_TIMER("::ThreadWorkers (accumulated)");
     		(*p)();
     	}
    -	return f;
    +	return p;
     }
     
     
    
    patch file icon optional.patch (470 bytes) 2014-08-16 08:43 +
  • patch file icon optional2.patch (489 bytes) 2014-08-16 11:58 -
    diff --git a/rts/System/ThreadPool.cpp b/rts/System/ThreadPool.cpp
    index 0ce4b11..34e53ab 100644
    --- a/rts/System/ThreadPool.cpp
    +++ b/rts/System/ThreadPool.cpp
    @@ -136,12 +136,11 @@ static bool DoTask(boost::shared_lock<boost::shared_mutex>& lk_)
     static bool DoTask(std::shared_ptr<ITaskGroup> tg)
     {
     	auto p = tg->GetTask();
    -	const bool f = p;
    -	if (f) {
    +	if (p) {
     		SCOPED_MT_TIMER("::ThreadWorkers (accumulated)");
     		(*p)();
     	}
    -	return f;
    +	return static_cast<bool>(p);
     }
     
     
    
    patch file icon optional2.patch (489 bytes) 2014-08-16 11:58 +

-Relationships
+Relationships

-Notes

~0013512

abma (administrator)

logs would be VERY useful as ubuntu doesn't have 1.56 in its default repo (=a lot of work to install for just seeing the error)

~0013513

Svenstaro (reporter)

Ok there you go. Feel free to ignore the non-boost errors for now.

~0013514

cleanrock (reporter)

A bit odd that you are testing 1.56, its not even in arch testing yet.
Try the attached patch.

~0013515

Svenstaro (reporter)

Last edited: 2014-08-16 11:58

View 2 revisions

I looked into it and boost.optional has this change note:
Using explicit operator bool() on platforms that support it (0004227) (breaking change).

So, we need to explicitly cast. I'm attaching a patch that works for me.

Also, the reason I'm doing this with boost 1.56 is that I'm the spring maintainer in Arch and in order for boost 1.56 to hit testing in Arch, all packages depending on boost need to compile properly against it. As such, spring is currently blocking and therefore boost isn't in testing yet.

~0013516

cleanrock (reporter)

Apply your patch to your arch spring 97.0 PKGBUILD. Fix will be in coming 98.0.
Btw,
97.0 was skipped and is not used in multi-player games at least, players are mostly using static builds downloaded by their lobby.
+Notes

-Issue History
Date Modified Username Field Change
2014-08-15 03:45 Svenstaro New Issue
2014-08-15 09:57 abma Note Added: 0013512
2014-08-15 09:57 abma Status new => feedback
2014-08-15 11:58 Svenstaro File Added: build.log
2014-08-15 11:58 Svenstaro Note Added: 0013513
2014-08-15 11:58 Svenstaro Status feedback => new
2014-08-16 08:43 cleanrock File Added: optional.patch
2014-08-16 08:44 cleanrock Note Added: 0013514
2014-08-16 08:44 cleanrock Status new => feedback
2014-08-16 11:56 Svenstaro Note Added: 0013515
2014-08-16 11:56 Svenstaro Status feedback => new
2014-08-16 11:58 Svenstaro Note Edited: 0013515 View Revisions
2014-08-16 11:58 Svenstaro File Added: optional2.patch
2014-08-16 12:43 cleanrock Note Added: 0013516
2014-08-16 12:49 cleanrock Changeset attached => spring develop 6bb69fcb
2014-08-16 12:49 cleanrock Assigned To => cleanrock
2014-08-16 12:49 cleanrock Status new => resolved
2014-08-16 12:49 cleanrock Resolution open => fixed
+Issue History