FTBFS with r6967: src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in namespace ‘std’ does not name a type

Bug #1318315 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Hans Joachim Desserud

Bug Description

Revision 6967 fails to build for me with the following output:
[ 5%] Building CXX object src/CMakeFiles/widelands_all.dir/replay_game_controller.cc.o
In file included from /home/wizard/widelands/src/replay_game_controller.cc:20:0:
/home/wizard/widelands/src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in namespace ‘std’ does not name a type
  std::unique_ptr<Widelands::ReplayReader> m_replayreader;
  ^
/home/wizard/widelands/src/replay_game_controller.cc: In constructor ‘ReplayGameController::ReplayGameController(Widelands::Game&, const string&)’:
/home/wizard/widelands/src/replay_game_controller.cc:40:2: error: ‘m_replayreader’ was not declared in this scope
  m_replayreader.reset(new Widelands::ReplayReader(m_game, filename));
  ^
/home/wizard/widelands/src/replay_game_controller.cc: In member function ‘virtual void ReplayGameController::think()’:
/home/wizard/widelands/src/replay_game_controller.cc:58:6: error: ‘m_replayreader’ was not declared in this scope
  if (m_replayreader) {
      ^
make[2]: *** [src/CMakeFiles/widelands_all.dir/replay_game_controller.cc.o] Error 1
make[1]: *** [src/CMakeFiles/widelands_all.dir/all] Error 2
make: *** [all] Error 2

I have also verified this happens out of the box [1]. This happens on Ubuntu with GCC 4.7, 4.8 (and probably later).

I've tried to investigate a bit, but I am not sure why this would fail now, since the line itself didn't change. (We also have a healthy amount of unique_ptr elsewhere in the code base which haven't caused any problems up until now, so presumably the compiler supports it). It might be the ReplayReader which isn't considered a type anymore, though I don't really see how that would be the case either.

The daily build just built r6966 without problems [2], so it has to be this revision somehow.

[1] https://code.launchpad.net/~hjd/+archive/widelands-test/+build/5998940
[2] https://code.launchpad.net/~widelands-dev/+recipe/widelands-daily

Tags: ftbfs
Changed in widelands:
status: New → Triaged
summary: - FTBFS: src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in
- namespace ‘std’ does not name a type
+ FTBFS with r6967: src/replay_game_controller.h:60:2: error: ‘unique_ptr’
+ in namespace ‘std’ does not name a type
Revision history for this message
SirVer (sirver) wrote : Re: [Bug 1318315] [NEW] FTBFS with r6967: src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in namespace ‘std’ does not name a type
Download full text (4.9 KiB)

#include <memory> should fix this.

> Am 11.05.2014 um 12:22 schrieb Hans Joachim Desserud <email address hidden>:
>
> Public bug reported:
>
> Revision 6967 fails to build for me with the following output:
> [ 5%] Building CXX object src/CMakeFiles/widelands_all.dir/replay_game_controller.cc.o
> In file included from /home/wizard/widelands/src/replay_game_controller.cc:20:0:
> /home/wizard/widelands/src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in namespace ‘std’ does not name a type
> std::unique_ptr<Widelands::ReplayReader> m_replayreader;
> ^
> /home/wizard/widelands/src/replay_game_controller.cc: In constructor ‘ReplayGameController::ReplayGameController(Widelands::Game&, const string&)’:
> /home/wizard/widelands/src/replay_game_controller.cc:40:2: error: ‘m_replayreader’ was not declared in this scope
> m_replayreader.reset(new Widelands::ReplayReader(m_game, filename));
> ^
> /home/wizard/widelands/src/replay_game_controller.cc: In member function ‘virtual void ReplayGameController::think()’:
> /home/wizard/widelands/src/replay_game_controller.cc:58:6: error: ‘m_replayreader’ was not declared in this scope
> if (m_replayreader) {
> ^
> make[2]: *** [src/CMakeFiles/widelands_all.dir/replay_game_controller.cc.o] Error 1
> make[1]: *** [src/CMakeFiles/widelands_all.dir/all] Error 2
> make: *** [all] Error 2
>
> I have also verified this happens out of the box [1]. This happens on
> Ubuntu with GCC 4.7, 4.8 (and probably later).
>
> I've tried to investigate a bit, but I am not sure why this would fail
> now, since the line itself didn't change. (We also have a healthy amount
> of unique_ptr elsewhere in the code base which haven't caused any
> problems up until now, so presumably the compiler supports it). It might
> be the ReplayReader which isn't considered a type anymore, though I
> don't really see how that would be the case either.
>
> The daily build just built r6966 without problems [2], so it has to be
> this revision somehow.
>
> [1] https://code.launchpad.net/~hjd/+archive/widelands-test/+build/5998940
> [2] https://code.launchpad.net/~widelands-dev/+recipe/widelands-daily
>
> ** Affects: widelands
> Importance: Medium
> Status: Triaged
>
>
> ** Tags: ftbfs
>
> ** Changed in: widelands
> Status: New => Triaged
>
> ** Summary changed:
>
> - FTBFS: src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in namespace ‘std’ does not name a type
> + FTBFS with r6967: src/replay_game_controller.h:60:2: error: ‘unique_ptr’ in namespace ‘std’ does not name a type
>
> --
> You received this bug notification because you are subscribed to
> widelands.
> https://bugs.launchpad.net/bugs/1318315
>
> Title:
> FTBFS with r6967: src/replay_game_controller.h:60:2: error:
> ‘unique_ptr’ in namespace ‘std’ does not name a type
>
> Status in Widelands:
> Triaged
>
> Bug description:
> Revision 6967 fails to build for me with the following output:
> [ 5%] Building CXX object src/CMakeFiles/widelands_all.dir/replay_game_controller.cc.o
> In file included from /home/wizard/widelands/src/replay_game_controller.cc:20:0:
> /home/wizard/widelands/src/replay_game_controller.h:60:2: error: ...

Read more...

Changed in widelands:
assignee: nobody → Hans Joachim Desserud (hjd)
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Fixed in r6968 as per your suggestion, including it in a few other files too until everything built.

(I skipped code review on this one, both because it was only added includes which can do very little damage, and because I was basically just adding what you suggested.)

Changed in widelands:
status: Triaged → Fix Committed
Revision history for this message
Hans Joachim Desserud (hjd) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Properly fixed now, presumably with r6971.

GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.