Latest Posts

Topic: Building widelands fails on Ubuntu12.04 since revision 6578 src/logic/ship.h:133:24: error: wrong number of template arguments (1, should be 2)

losbehamos
Avatar
Joined: 2013-06-30, 07:52
Posts: 3
Ranking
Just found this site
Posted at: 2013-06-30, 08:53

Hello Widelands team,

I already have a quick and dirty solution for this but I think there could be a better solution for this and others could benefit of this post.

When I use the update.sh script in the Widelands directory the build fails since revision 6578.

After I searched this issue on google without any success I had a look at the ppa widelands daily and saw that the same error affects the daily builds of Widelands for Ubuntu 12.04 and Ubuntu 10.04 amd64 and i386, but newer Ubuntu releases are not affected.

You can see the error in the following link:

https://launchpadlibrarian.net/143295881/buildlog_ubuntu-precise-amd64.widelands_1%3A17-ppa0-bzr6592%2Btrunk%2B~precise1_FAILEDTOBUILD.txt.gz

On some other forums where I searched for the wrong number of template arguments error the key word boost was shown so I tried to get a newer version of boost.

As I said in the beginning I took a quick and dirty solution and used this ppa:

https://launchpad.net/~irie/+archive/boost

I also had to reinstall these two packages:

libboost-signals-dev libboost-test-dev

and the build has gone well and I can finally try the new expedition and colonization feature. Hooooooray!!!

The version of my boost is now 1.49, is this version of boost now needed or was I just unable to tell cmake to use the 1.48 boost libraries which are included in the default Ubuntu12.04 repositories without using this ppa.


Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 18:17
Posts: 829
Ranking
One Elder of Players
Location: Germany
Posted at: 2013-06-30, 09:57

Hello losbehamos,

I do not use ubuntu, therefore I can just guess. However on the BuildingWidelands page in our Wiki there is a reference to Boost 1.35, but that page might be outdated. I am using boost 1.53 since quite a while which works fine, so...

Edit:

I just double checked. In revision 6578 the only boost changes were some added boost::scoped_ptr which were definitely available in boost 1.48, so there should not be a problem with boost at all. Maybe cmake did not recognize the new file src/walkingdir.cc ? Did you try to run ./compile.sh again before installing boost 1.49? (just trying to find out, if there is really a problem or maybe just an inconsistency of cmake or the like)

Edited: 2013-06-30, 10:07
Top Quote
losbehamos
Avatar
Joined: 2013-06-30, 07:52
Posts: 3
Ranking
Just found this site
Posted at: 2013-06-30, 17:05

Hello Nasenbaer,

thank you for your reply.

Yes I tried to run ./compile.sh before the installation of boost 1.49. I also tried a bzr revert -r6577 and the compile.sh worked. I now reastablished the old state with 1.48 and get the same error as before when running ./compile.sh on r6592:

[ 67%] Built target lang_uk [ 67%] Built target lang [ 68%] Building CXX object src/minizip/CMakeFiles/wl_minizip.dir/unzip.cc.o Linking CXX static library libwl_minizip.a [ 68%] Built target wl_minizip [ 68%] Building CXX object src/CMakeFiles/widelands_all.dir/ai/ai_help_structs.cc.o [ 68%] Building CXX object src/CMakeFiles/widelands_all.dir/ai/ai_hints.cc.o [ 68%] Building CXX object src/CMakeFiles/widelands_all.dir/ai/defaultai.cc.o [ 68%] Building CXX object src/CMakeFiles/widelands_all.dir/economy/fleet.cc.o [ 68%] Building CXX object src/CMakeFiles/widelands_all.dir/economy/portdock.cc.o In file included from /home/losbehamos/widelands/src/economy/portdock.cc:29:0: /home/losbehamos/widelands/src/logic/ship.h:133:24: Fehler: falsche Anzahl der Templateargumente (1, sollte 2 sein) /usr/include/boost/detail/container_fwd.hpp:130:47: Fehler: für »template<class allocator="" class="" t,=""> struct std::list« bereitgestellt /home/losbehamos/widelands/src/logic/ship.h:173:37: Fehler: falsche Anzahl der Templateargumente (1, sollte 2 sein) /usr/include/boost/detail/container_fwd.hpp:130:47: Fehler: für »template<class allocator="" class="" t,=""> struct std::list« bereitgestellt /home/losbehamos/widelands/src/logic/ship.h:173:39: Fehler: Templateargument 1 ist ungültig /home/losbehamos/widelands/src/logic/ship.h: In Elementfunktion »const int Widelands::Ship::exp_port_spaces()«: /home/losbehamos/widelands/src/logic/ship.h:137:46: Fehler: Abfrage des Elementes »get« in »((Widelands::Ship)this)->Widelands::Ship::m_expedition.boost::scoped_ptr<t>::operator-> mit T = Widelands::Ship::Expedition->Widelands::Ship::Expedition::seen_port_buildspaces«, das vom Nicht-Klassentyp »int« ist make[2]: [src/CMakeFiles/widelands_all.dir/economy/portdock.cc.o] Fehler 1 make[1]: [src/CMakeFiles/widelands_all.dir/all] Fehler 2 make: *** [all] Fehler 2</t></class></class>

Almost the same errors as in the unofficial development builds ppa page so it looks like it is a general issue and don't only affect me:

https://launchpad.net/~widelands-dev/+archive/widelands-daily

The link for Ubuntu12.04 64 Bit

https://launchpad.net/~widelands-dev/+archive/widelands-daily/+build/4742603

(I don't know what I am doing wrong with the links you have to copy them as text and paste them into the adress bar of the browser to see the site.)

I don't understand any of the error messages I just tried boost 1.49 by chance and because it was a keyword in other forums and it luckily worked.

After reinstalling the boost 1.49 libraries the ./compile.sh works again.

I hope this post can be helpful to figure out the best way to describe building Widelands on Ubuntu12.04. I don't think using a ppa for boost to compile Widelands is an desirable state so I hope somebody has a better solution.

For me the bazaar revisions are very important because it was most times very exciting for me to try out the latest development progress in Widelands.


Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 18:17
Posts: 829
Ranking
One Elder of Players
Location: Germany
Posted at: 2013-06-30, 20:27

Hello losbehamos,

thank you for posting more informations. I am a bit clueless concerning this behaviour. I hope someone with more insight to boost knows what's going on there. ( *wink at all boost pros face-smile.png * )


Top Quote
QCS
Joined: 2009-12-29, 22:47
Posts: 256
Ranking
Tribe Member
Posted at: 2013-07-02, 22:19

I did a clean install of Ubuntu 12.04 LTS, installed the build environment and tried ./compile.sh Installed boost version is 1.46.1 ...

Result: I can confirm that it is not building. Error in compiling wui/shipwindow.cc

I will investigate this further in the next days.


CMake is evil.

Top Quote
QCS
Joined: 2009-12-29, 22:47
Posts: 256
Ranking
Tribe Member
Posted at: 2013-07-03, 16:31

I transferred this to a bug report https://bugs.launchpad.net/widelands/+bug/1197429 as this is more appropriate (due to its seriousness).


CMake is evil.

Top Quote
QCS
Joined: 2009-12-29, 22:47
Posts: 256
Ranking
Tribe Member
Posted at: 2013-07-03, 19:43

Fixed. You can update to latest revision and try again =:-)


CMake is evil.

Top Quote
losbehamos
Avatar
Joined: 2013-06-30, 07:52
Posts: 3
Ranking
Just found this site
Posted at: 2013-07-04, 19:51

Thank you QCS and Nasenbaer,

I tried it with boost 1.46.1 on a machine with an Ubuntu 12.04 32 Bit (will try it on the 64 Bit this weekend) and it works.

I also thought needing a newer boost version is not enough for calling it a bug, so I am very pleased you took it that serious.


Top Quote
QCS
Joined: 2009-12-29, 22:47
Posts: 256
Ranking
Tribe Member
Posted at: 2013-07-04, 19:59

losbehamos wrote: not enough for calling it a bug, so I am very pleased you took it that serious.

Well... someone not being able to play widelands is the most serious thing we can think of in this forum face-grin.png


CMake is evil.

Top Quote