Currently Online

Latest Posts

Topic: MacOSX build file

GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2989
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-04-22, 07:21

I has dome problems with Boost on the AppVeyor builds too. CMake can't find Boost version 1.70 yet, so I had to downgrade it to 1.69.


Busy indexing nil values

Top Quote
Hasi50
Avatar
Joined: 2015-12-28, 16:19
Posts: 98
Ranking
Likes to be here
Posted at: 2019-04-22, 08:05

Checking: current Port file is here: https://github.com/kencu/macports-staging/blob/master/games/widelands/Portfile

I have 'boost @1.66.0_3' which doe not show any problems

I compile with:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix

digging in the logs at /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_widelands/widelands-devel/main.log I find some strange errors I have not seen in any normal build?

:info:build /opt/local/include/boost/smart_ptr/bad_weak_ptr.hpp:50:39: error: dynamic exception specifications are deprecated [-Werror,-Wdeprecated-dynamic-exception-spec]
:info:build     virtual char const * what() const throw()
:info:build                                       ^~~~~~~
:info:build /opt/local/include/boost/smart_ptr/bad_weak_ptr.hpp:50:39: note: use 'noexcept' instead
:info:build     virtual char const * what() const throw()

Gun: which is the latest clang compiler we currently support?

Gun / Ken: I would suggest we open a pro forma Bug at https://bugs.launchpad.net/widelands to track the technical details?

Edited: 2019-04-23, 06:47

Here are the widelands where people may dwell, walking around care that evrythings well.

Top Quote
ken.cunningham.webuse
Avatar
Joined: 2016-10-08, 17:42
Posts: 15
Ranking
Pry about Widelands
Posted at: 2019-04-22, 08:27

It's a "warnings-are-errors" situation. Not a real error.

If itn's not trivial to fix the warning, we could just disable that warning with something like "-Wno-deprecated-dynamic-exception-spec", which usually works for this.

I assume you don't want to turn off -Werror.

Ken


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2989
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-04-22, 11:27

This is what's running on Travis: Apple LLVM version 9.1.0 (clang-902.0.39.2)

That build has only 1 warning in it:

/Users/travis/build/widelands/widelands/src/graphic/image_io.cc:99:6: warning: disabled expansion of recursive macro [-Wdisabled-macro-expansion]
        if (setjmp(png_jmpbuf(png_ptr))) {  // NOLINT
            ^
/Applications/Xcode-9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/setjmp.h:40:21: note: expanded from macro 'setjmp'
#define setjmp(env) setjmp(env)
                    ^
1 warning generated.

Definitely try switching off -Wdeprecated-dynamic-exception-spec only. The warning it creates is code that has been around for ages, so I don't expect that it will create any trouble in the release. We should look into it for Build 21 though.

Edited: 2019-04-22, 11:28

Busy indexing nil values

Top Quote
ken.cunningham.webuse
Avatar
Joined: 2016-10-08, 17:42
Posts: 15
Ranking
Pry about Widelands
Posted at: 2019-04-23, 00:05

I compiled Widelands today on macOS Mojave 10.14 with Xcode 10.2 bzr9059[trunk](Release)

Macports is currently set up to use boost 1.66.

$ port -v installed boost
The following ports are currently installed:
  boost @1.66.0_3+no_single+no_static+python27 (active) platform='darwin 18' archs='x86_64' date='2019-04-14T12:15:01-0700'

I had to turn off one -Werror in the CMakeLists.txt file to get it to compile through to the end.

$ git diff CMakeLists.txt.orig CMakeLists.txt
diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
index 5c5ca8a..13c29b8 100644
--- a/CMakeLists.txt.orig
+++ b/CMakeLists.txt
@@ -210,7 +210,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-unreachable-code")
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Wno-documentation")

-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=deprecated")
+ # wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=deprecated")
   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=non-pod-varargs")

   wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Qunused-arguments")

With only that small patch, it built through to the end. There were many hundreds of warnings, I note.

Is there a different bzr revision I should test other than 9059?

I am not sure yet what will happen when we try the build on our various generations of systems -- this is mostly of relevance to us, but we like to be able to build and run as far back as the code and tools will allow. That hasn't been tested yet. build19 was buildable as far back as 10.6.8 snow leopard I recall, so I'd be hoping for the same. Time will tell.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2989
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2019-04-23, 06:39

No, that revision is fine, thank you.

We have a problem with sound on Mac that we never noticed, because everybody here who uses a Mac also does their own compiling:

https://bugs.launchpad.net/widelands/+bug/1825925


Busy indexing nil values

Top Quote
Hasi50
Avatar
Joined: 2015-12-28, 16:19
Posts: 98
Ranking
Likes to be here
Posted at: 2019-04-23, 07:41

Hello ken: as far as I know MacPorts you can add a patchfile which could apply your change. Can you make that Portfile then th e "offical" one? So I could build this Version locally here. Or maybe put it on some branch on github, so I can build it locally?

And Thanks!

Gun: As we incude the dynamic llibraries in the App anyway we can as well do a static linking.

I think we will have two versions in the End: "OSX current" and "OSX Legacy", with old libs and some extra tweaks. OSX users tend to be on the latest versions, so I would assume that the leagcy version will have a few "customers" only.


Here are the widelands where people may dwell, walking around care that evrythings well.

Top Quote
ken.cunningham.webuse
Avatar
Joined: 2016-10-08, 17:42
Posts: 15
Ranking
Pry about Widelands
Posted at: 2019-04-23, 08:50

Done. If you wait a bit for the rsync farm to catch the new commit, you should see that widelands-devel on MacPorts has been updated to 20190422 (port info widelands-devel). Once you see that, you should be able to just run (sudo port -v install widelands-devel) and you'll get it. If you already have the +HEAD variant installed, you should first do this:

sudo port uninstall widelands-devel

To clear it out.

Now by default you will get a version made by the buildbots of MacPorts identical to the system version you're on. If you want to build it yourself locally, you can force it to build from source like this:

sudo port -v -s install widelands-devel

and it will build from source.

There are other tricks as well that are useful to know about how MacPorts can be made to do your bidding, but that should do it for now.


Top Quote
ken.cunningham.webuse
Avatar
Joined: 2016-10-08, 17:42
Posts: 15
Ranking
Pry about Widelands
Posted at: 2019-04-24, 08:45

Hey, great news. Builds without trouble and runs great all the way back to MacOSX 10.6.8 using MacPorts' build system.

So that covers off nearly every system in current use. I haven't tried the 10.5 PPC machines for this as yet.


Top Quote
Hasi50
Avatar
Joined: 2015-12-28, 16:19
Posts: 98
Ranking
Likes to be here
Posted at: 2019-04-24, 09:40

Hmm, I did not get a compiled versions or sources from macports, but via bzr

It then fails with:

sh-3.2# pwd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_widelands/widelands-devel/work/build
sh-3.2# /usr/bin/make -w all VERBOSE=ON
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_widelands/widelands-devel/work/widelands-20180719/src/scripting/test/scripting_test_main.cc:22:10: fatal error: 
      'boost/test/unit_test.hpp' file not found
#include <boost/test/unit_test.hpp>

Alas I have the file here: /opt/local/include/boost/test/unit_test.hpp

What did I miss?

Edited: 2019-04-24, 10:02

Here are the widelands where people may dwell, walking around care that evrythings well.

Top Quote