Compile issue

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 344
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Compile issue

Post by dasy2k1 »

Anyone having an issue where the current nightly repository is not compiling?

I'm getting the following error when i try to compile

Code: Select all

[SRC] Compiling gfx_layout.cpp
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp: In member function ‘virtual std::unique_ptr<const ParagraphLayouter::Line> FallbackParagraphLayout::NextLine(int)’:
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:513:10: error: cannot bind ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>’ lvalue to ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>&&’
   return l;
          ^
In file included from /usr/include/c++/4.9/memory:81:0,
                 from /home/dasy2k1/games/OpenTTD/src/stdafx.h:87,
                 from /home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:10:
/usr/include/c++/4.9/bits/unique_ptr.h:220:2: note: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = FallbackParagraphLayout::FallbackLine; _Ep = std::default_delete<FallbackParagraphLayout::FallbackLine>; <template-parameter-2-3> = void; _Tp = const ParagraphLayouter::Line; _Dp = std::default_delete<const ParagraphLayouter::Line>]’
  unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
  ^
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:563:13: error: cannot bind ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>’ lvalue to ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>&&’
      return l;
             ^
In file included from /usr/include/c++/4.9/memory:81:0,
                 from /home/dasy2k1/games/OpenTTD/src/stdafx.h:87,
                 from /home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:10:
/usr/include/c++/4.9/bits/unique_ptr.h:220:2: note: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = FallbackParagraphLayout::FallbackLine; _Ep = std::default_delete<FallbackParagraphLayout::FallbackLine>; <template-parameter-2-3> = void; _Tp = const ParagraphLayouter::Line; _Dp = std::default_delete<const ParagraphLayouter::Line>]’
  unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
  ^
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:590:9: error: cannot bind ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>’ lvalue to ‘std::unique_ptr<FallbackParagraphLayout::FallbackLine>&&’
  return l;
         ^
In file included from /usr/include/c++/4.9/memory:81:0,
                 from /home/dasy2k1/games/OpenTTD/src/stdafx.h:87,
                 from /home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:10:
/usr/include/c++/4.9/bits/unique_ptr.h:220:2: note: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = FallbackParagraphLayout::FallbackLine; _Ep = std::default_delete<FallbackParagraphLayout::FallbackLine>; <template-parameter-2-3> = void; _Tp = const ParagraphLayouter::Line; _Dp = std::default_delete<const ParagraphLayouter::Line>]’
  unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
  ^
/home/dasy2k1/games/OpenTTD/src/gfx_layout.cpp:591:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:234: recipe for target 'gfx_layout.o' failed
make[1]: *** [gfx_layout.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/mnt/shared/games/OpenTTD/objs/release'
Makefile:54: recipe for target 'all' failed
make: *** [all] Error 1

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Compile issue

Post by planetmaker »

Did you try a newer compiler? 4.9 does sound like a somewhat ancient version, should it refer to gcc.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 28 guests