Boost 1.53

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines


  • Author
  • Message
Offline
User avatar

bwrsandman

  • Posts: 45
  • Joined: 25 Sep 2011, 05:30
  • Location: Montreal

Boost 1.53

Post02 Apr 2013, 02:30

Archlinux users are having trouble compiling openMW on the new version of boost.
The issue happens on both upstream (last checked the morning of april 1st) and 0.22.0.

I know lgromanowski bought up the issue recently.
These compile errors aren't just localized to opencs.

Code: Select all
Linking CXX executable ../../esmtool
[ 76%] Built target esmtool
[ 76%] Generating ui_playpage.h
[ 76%] Generating qrc_launcher.cxx
[ 76%] Generating moc_datafilespage.cxx
[ 76%] Generating moc_graphicspage.cxx
[ 77%] Generating moc_maindialog.cxx
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse
error at "BOOST_JOIN"
make[2]: *** [apps/launcher/moc_maindialog.cxx] Error 1
make[1]: *** [apps/launcher/CMakeFiles/omwlauncher.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build openmw.
==> Restart building openmw ? [y/N]
==> -------------------------------


I have a very important presentation to Ubisoft and Autodesk in a couple days, so I won't be able to spend a lot of time to resolving this or making a custom patch to 0.22.

Any help is greatly appreciated.
Offline

Chris

  • Posts: 1045
  • Joined: 04 Sep 2011, 08:33

Re: Boost 1.53

Post02 Apr 2013, 03:06

I'm wondering if we should phase out Boost. The last two versions (1.52 and 1.53) individually broke existing code, and the 1.52 break still isn't fixed (and it's not straight forward how to fix).

I don't think there's much we need it for that isn't already provided by Ogre or that we couldn't replace with our own. Getting rid of Boost will also make it easier to cross-compile or build on Windows as it's one less dependency to worry about, and a hefty one at that. May also improve general compilation time since Boost's templates are notorious for increasing compile times.
Offline
User avatar

lgromanowski

Site Admin

  • Posts: 1040
  • Joined: 05 Aug 2011, 22:21
  • Location: Wroclaw, Poland

Re: Boost 1.53

Post02 Apr 2013, 05:27

bwrsandman wrote:Archlinux users are having trouble compiling openMW on the new version of boost.
The issue happens on both upstream (last checked the morning of april 1st) and 0.22.0.

I know lgromanowski bought up the issue recently.
These compile errors aren't just localized to opencs.

Code: Select all
Linking CXX executable ../../esmtool
[ 76%] Built target esmtool
[ 76%] Generating ui_playpage.h
[ 76%] Generating qrc_launcher.cxx
[ 76%] Generating moc_datafilespage.cxx
[ 76%] Generating moc_graphicspage.cxx
[ 77%] Generating moc_maindialog.cxx
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse
error at "BOOST_JOIN"
make[2]: *** [apps/launcher/moc_maindialog.cxx] Error 1
make[1]: *** [apps/launcher/CMakeFiles/omwlauncher.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build openmw.
==> Restart building openmw ? [y/N]
==> -------------------------------

Any help is greatly appreciated.


The problem wasn't in boost but in broken Qt MOC compiler. You need to add #ifndef Q_MOC_RUN/#endif around the #includes which are using boost.
best regards,
Lukasz
Offline
User avatar

Zini

  • Posts: 4901
  • Joined: 06 Aug 2011, 15:16

Re: Boost 1.53

Post02 Apr 2013, 09:54

Chris wrote:I'm wondering if we should phase out Boost. The last two versions (1.52 and 1.53) individually broke existing code, and the 1.52 break still isn't fixed (and it's not straight forward how to fix).

I don't think there's much we need it for that isn't already provided by Ogre or that we couldn't replace with our own. Getting rid of Boost will also make it easier to cross-compile or build on Windows as it's one less dependency to worry about, and a hefty one at that. May also improve general compilation time since Boost's templates are notorious for increasing compile times.


We are using dozens of boost libraries, a lot of them very extensively (try doing a git grep boost | wc -l). Phasing out boost is not an option and I don't consider it desirable. Boost doesn't break stuff a lot more worse than other libraries and as lgro already mentioned the last instance of breakage is a bug in Qt, not in boost.
Offline

Chris

  • Posts: 1045
  • Joined: 04 Sep 2011, 08:33

Re: Boost 1.53

Post02 Apr 2013, 13:12

Zini wrote:We are using dozens of boost libraries, a lot of them very extensively (try doing a git grep boost | wc -l).

The vast majority of Boost's usage seem to be boost::shared_ptr and boost::lexical_cast (to convert between int/floats and strings). Both of which Ogre can do. The two other big ones seem to be boost:filesystem and boost::program_options. Admittedly I don't have much of an idea for how to replace these, right now (at least where standard iostream/cstdio can't work for boost::filesystem; getopt can probably help with boost::program_options).

But even still, replacing shared_ptr and lexical_cast with Ogre's equivalents would quite likely be an improvement. Having a policy of avoiding boost as much as possible, with strict regulations on including boost (i.e. don't include boost in a header that a lot of sources directly or indirectly include) would really help with compile times. Obviously I wouldn't expect complete and immediate do-away with boost::shared_ptr and lexical_cast, but it might be a good newbie task to replace a few uses of it at a time (for someone familiar with C++ but not OpenMW).
Offline
User avatar

Zini

  • Posts: 4901
  • Joined: 06 Aug 2011, 15:16

Re: Boost 1.53

Post02 Apr 2013, 13:24

Since it is not desirable to get rid of boost, this would be pointless.
Offline

Chris

  • Posts: 1045
  • Joined: 04 Sep 2011, 08:33

Re: Boost 1.53

Post02 Apr 2013, 13:39

Zini wrote:Since it is not desirable to get rid of boost, this would be pointless.

Boost is a well-known cause for killing compilation times. Currently, it takes me over an hour to do a full build of the project. I can't say I agree that it would be pointless to remove and restrict the use of Boost where appropriate.
Offline
User avatar

Zini

  • Posts: 4901
  • Joined: 06 Aug 2011, 15:16

Re: Boost 1.53

Post02 Apr 2013, 13:55

That may be true for certain parts of boost, but I don't see that here. Compiling OpenMW takes a long time on a slow box, because the box is slow. OpenMW is a medium to large project that makes heavy use of templates in many places. Substantial compile time is to be expected.
Offline
User avatar

Zini

  • Posts: 4901
  • Joined: 06 Aug 2011, 15:16

Re: Boost 1.53

Post02 Apr 2013, 14:10

btw. over an hour sounds excessive. I just ran a test and a full rebuild takes me 2 minutes and 23 seconds. I have a top of the line CPU, but still. You are not building single-threaded, are you? May a ask the specs of your box?
Offline

Chris

  • Posts: 1045
  • Joined: 04 Sep 2011, 08:33

Re: Boost 1.53

Post02 Apr 2013, 14:43

Zini wrote:btw. over an hour sounds excessive. I just ran a test and a full rebuild takes me 2 minutes and 23 seconds. I have a top of the line CPU, but still. You are not building single-threaded, are you? May a ask the specs of your box?

I have a dual-core Athlon 64 X2 4200+ (dual-core 2.2GHz). Not top of the line, but not a bad little thing. I do build single-threaded because -j2 still takes a good half hour, and having both cores pegged degrades my system's responsiveness and overall usability while I'm waiting for it to finish.

Next


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest