← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/freebsd into lp:widelands

 

Hans Joachim Desserud has proposed merging lp:~widelands-dev/widelands/freebsd into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/freebsd/+merge/225867

Note: this branch is WIP.

With all the changes going on in trunk lately, I wanted to check whether it still builds on FreeBSD. So I set up a virtual machine with FreeBSD 10, installed the dependencies and crossed my fingers. 

First I built the ports package of build18 to verify I actually had the necessary packages and setup in place. Build18 went fine.

Then I started building trunk, but it soon complained about not having a member named "setlocale" in namespace "std" and suggested I might have meant "set_locale". This seems to have been an issue with build18 as well, because I found the following patch for the FreeBSD ports package of Widelands: http://svnweb.freebsd.org/ports/head/games/widelands/files/patch-src-i18n.cc?view=markup)

Though when looking closer at it now and seeing the ifdef block below, I don't know whether this is the best solution.

With that in place, building progressed until I hit the next error:
src/wui/mapviewpixelfunctions.cc:114 error: use of undeclared identifier 'abs'; did you mean 'fabs'?
(And then suggests using fabs from math.h)

I tried specifying std::abs, but that lead to another error "call to abs in ambiguous", listing three candidate functions:
abs(float __x)
abs(double __x)
abs(long double __x)


PS. Sorry for paraphrasing and summary of error messages, but I haven't gotten Xorg running properly on the VM yet, so I'm copying the error messages by hand. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/freebsd/+merge/225867
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/freebsd into lp:widelands.
=== modified file 'src/base/i18n.cc'
--- src/base/i18n.cc	2014-06-21 15:17:04 +0000
+++ src/base/i18n.cc	2014-07-07 17:11:05 +0000
@@ -19,6 +19,7 @@
 
 #include "base/i18n.h"
 
+#include <clocale>
 #include <cstdlib>
 #include <map>
 #include <utility>


Follow ups