C++11

Everything about development and the OpenMW source code.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

Okay. Travis ate it (c++11 branch). If there are any modifications required for Windows or Mac, please send a pull request towards that branch.
User avatar
psi29a
Posts: 5361
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: C++11

Post by psi29a »

Zini wrote:Okay. Travis ate it (c++11 branch). If there are any modifications required for Windows or Mac, please send a pull request towards that branch.
Not so fast, clang spit it back out:
https://travis-ci.org/OpenMW/openmw/jobs/69862665
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

I see. Why is that listed under "Allowed Failures" ? Kinda threw me off
maqifrnswa
Posts: 180
Joined: 14 Jan 2013, 03:57

Re: C++11

Post by maqifrnswa »

Zini wrote:I see. Why is that listed under "Allowed Failures" ? Kinda threw me off
I set it like that since the clang one is using a new version of clang and running it through the static analyzer. I didn't want any bugs in clang or the static analyzer to show up as a build failure, so it is an "allowed failure"
maqifrnswa
Posts: 180
Joined: 14 Jan 2013, 03:57

Re: C++11

Post by maqifrnswa »

psi29a wrote:
Zini wrote:Also, what is the oldest version of boost we still need to support? Anything older than 1.51 still in use?
Well... because travis-ci requires precise, we're still using its default boost libraries.

- Boost version: 1.46.1

-- The CXX compiler identification is GNU 4.6.3
-- The C compiler identification is GNU 4.6.3
We can move to building travis in a newer ubuntu release, set up a chroot for trusty or vivid (or newer). You can do something like this:
https://github.com/mingpj2/cxx-ci-trial ... travis.yml

This way you're not stuck with old boost and gcc
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: C++11

Post by scrawl »

We can move to building travis in a newer ubuntu release, set up a chroot for trusty or vivid (or newer). You can do something like this:
https://github.com/mingpj2/cxx-ci-trial ... travis.yml

This way you're not stuck with old boost and gcc
How long does it take to set up this chroot? Let's not do anything that increases build time. We've already hit the 50 minute limit on coverity-scan builds, I had to disable some of the build targets to get it within the time limit again.
maqifrnswa
Posts: 180
Joined: 14 Jan 2013, 03:57

Re: C++11

Post by maqifrnswa »

scrawl wrote:How long does it take to set up this chroot? Let's not do anything that increases build time. We've already hit the 50 minute limit on coverity-scan builds, I had to disable some of the build targets to get it within the time limit again.
yeah, probably will take at least 10 minutes, I'd guess... just an idea in case someone wanted to try
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: C++11

Post by Zini »

Thanks. But I think we will be fine for now. The impact of the older gcc is small. And unless the problems we are currently seeing on OS X are somehow related to the older boost version we should be fine with boost too.
maqifrnswa
Posts: 180
Joined: 14 Jan 2013, 03:57

Re: C++11

Post by maqifrnswa »

regarding the clang failure:

Code: Select all

[  0%] Building CXX object extern/oics/CMakeFiles/oics.dir/ICSChannel.cpp.o

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videoplayer.cpp:8:

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videostate.hpp:6:

In file included from /usr/include/boost/thread.hpp:13:

In file included from /usr/include/boost/thread/thread.hpp:17:

/usr/include/boost/thread/pthread/thread_data.hpp:36:17: error: call to

      implicitly-deleted copy constructor of

      'boost::shared_ptr<boost::detail::tss_cleanup_function>'

                func(func_),value(value_)

                ^    ~~~~~

/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is

      implicitly deleted because

      'shared_ptr<boost::detail::tss_cleanup_function>' has a user-declared move

      constructor

    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws

    ^

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videoplayer.cpp:8:

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videostate.hpp:6:

In file included from /usr/include/boost/thread.hpp:13:

In file included from /usr/include/boost/thread/thread.hpp:22:

/usr/include/boost/thread/detail/thread.hpp:395:13: error: call to

      implicitly-deleted copy constructor of 'detail::thread_data_ptr' (aka

      'shared_ptr<boost::detail::thread_data_base>')

            thread_data(thread_data_)

            ^           ~~~~~~~~~~~~

/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is

      implicitly deleted because 'shared_ptr<boost::detail::thread_data_base>'

      has a user-declared move constructor

    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws

    ^

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videoplayer.cpp:8:

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videostate.hpp:6:

In file included from /usr/include/boost/thread.hpp:24:

In file included from /usr/include/boost/thread/future.hpp:14:

In file included from /usr/include/boost/exception_ptr.hpp:9:

In file included from /usr/include/boost/exception/detail/exception_ptr.hpp:20:

/usr/include/boost/exception/info.hpp:102:28: error: call to implicitly-deleted

      copy constructor of 'shared_ptr<boost::exception_detail::error_info_base>'

                    return p;

                           ^

/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is

      implicitly deleted because

      'shared_ptr<boost::exception_detail::error_info_base>' has a user-declared

      move constructor

    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws

    ^

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videoplayer.cpp:8:

In file included from /home/travis/build/OpenMW/openmw/extern/osg-ffmpeg-videoplayer/videostate.hpp:6:

In file included from /usr/include/boost/thread.hpp:24:

In file included from /usr/include/boost/thread/future.hpp:14:

In file included from /usr/include/boost/exception_ptr.hpp:9:

/usr/include/boost/exception/detail/exception_ptr.hpp:83:20: error: call to

      implicitly-deleted copy constructor of 'exception_ptr' (aka

      'shared_ptr<const exception_detail::clone_base>')

            return ep;

                   ^~

/usr/include/boost/smart_ptr/shared_ptr.hpp:347:5: note: copy constructor is

      implicitly deleted because 'shared_ptr<const

      boost::exception_detail::clone_base>' has a user-declared move constructor

    shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
It's a bug in boost <= 1.48 when compiled with c++11, travis has boost 1.46.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: C++11

Post by scrawl »

We could replace boost::thread with OpenThreads, the threading library shipped with OSG.
Post Reply