Page 1 of 1

Compile issue

Posted: 25 Nov 2019 21:57
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


Re: Compile issue

Posted: 25 Nov 2019 22:31
by planetmaker
Did you try a newer compiler? 4.9 does sound like a somewhat ancient version, should it refer to gcc.