Ticket #1360 (closed defect: fixed)

Opened 13 months ago

Last modified 10 months ago

[PATCH] Drop unused libboost dependencies

Reported by: fabio Owned by: ben
Priority: If Time Permits Milestone: Alpha 11
Component: Build & Packages Keywords: patch
Cc:

Description

The attached patch remove unneded link-only dependencies on boost_system and boost_filesystem.

Tested on Linux.

Attachments

drop-unused-boost.patch (678 bytes) - added by fabio 13 months ago.
make_log.tar.xz (7.1 KB) - added by fcxSanya 11 months ago.
full output of make

Change History

Changed 13 months ago by fabio

comment:1 Changed 13 months ago by k776

  • Keywords patch added; patch, removed
  • Milestone changed from Alpha 10 to Alpha 11

comment:2 Changed 12 months ago by k776

  • Priority changed from Should Have to If Time Permits

comment:3 Changed 12 months ago by fabio

As an added bonus, with this patch linking pyrogenesis and test is much faster.

comment:4 Changed 11 months ago by ben

  • Owner set to ben
  • Status changed from new to closed
  • Resolution set to fixed

In 11965:

Removes unused Boost link dependencies with patch by fabio. Fixes #1360

comment:5 Changed 11 months ago by historic_bruno

  • Keywords review removed

Tested on Windows, OS X, and Ubuntu - no problems :)

comment:6 follow-up: ↓ 7 Changed 11 months ago by fcxSanya

Hm, it looks like these changes cause some issues to me on Debian wheezy x64. I do:

./clean-workspaces.sh && ./update-workspaces.sh -j5 && cd gcc && make clean && make -j5

and get a lot of errors like this one:

ObjectSetttest_Release/test_root.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:208: undefined reference to `boost::system::get_system_category()'
/usr/include/boost/system/error_code.hpp:209: undefined reference to `boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::get_system_category()'

Edit: previous revision (r11964) builds fine.

Last edited 11 months ago by fcxSanya (previous) (diff)

Changed 11 months ago by fcxSanya

full output of make

comment:7 in reply to: ↑ 6 ; follow-up: ↓ 8 Changed 11 months ago by historic_bruno

Replying to fcxSanya:

Hm, it looks like these changes cause some issues to me on Debian wheezy x64.

I was wondering how it would behave on Debian wheezy :/ Which version of Boost are you using?

comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 11 months ago by fcxSanya

Replying to historic_bruno:

I was wondering how it would behave on Debian wheezy :/ Which version of Boost are you using?

$ dpkg -s libboost-dev

shows

Version: 1.42.0.1

It looks like this is package from squeezy (http://packages.debian.org/squeeze/libboost-dev) and in wheezy it should be 1.49.0.1 (http://packages.debian.org/wheezy/libboost-dev). Probably I can try to update it (when I will come home) or maybe it's worth to understand what's wrong with 1.42.

comment:9 in reply to: ↑ 8 ; follow-up: ↓ 11 Changed 11 months ago by fcxSanya

Replying to fcxSanya:

Probably I can try to update it (when I will come home) or maybe it's worth to understand what's wrong with 1.42.

Updating to 1.49.0.1 solved the problem. I'm not sure what it was - real issue with boost 1.42 or just packages inconsistency in my system or something (but in this case it is strange that previous revisions of 0ad were built fine). It is better to check in clean squeeze VM with boost 1.42.

comment:10 Changed 11 months ago by leper

I suppose that this is an issue with boost 1.42 (the packaged version available in OpenBSD 5.1) as I'm getting the same errors as fcxSanya. (I'm probably going to add the bsd_names back. Or at least adding the removed lines back as a comment and updating BuildInstructions accordingly.)

Last edited 11 months ago by leper (previous) (diff)

comment:11 in reply to: ↑ 9 Changed 11 months ago by historic_bruno

Replying to fcxSanya:

Replying to fcxSanya:

Probably I can try to update it (when I will come home) or maybe it's worth to understand what's wrong with 1.42.

Updating to 1.49.0.1 solved the problem. I'm not sure what it was - real issue with boost 1.42 or just packages inconsistency in my system or something (but in this case it is strange that previous revisions of 0ad were built fine). It is better to check in clean squeeze VM with boost 1.42.

There is a comment in source/lib/pch/pch_boost.h which I didn't notice until yesterday:

// don't compile get_system_category() etc, since we don't use them and they
// sometimes cause problems when linking.
// But Filesystem <= 1.43 requires boost::system::posix, so only disable if newer

We can't break the build on old Boost :( Can you test what happens if boost_system is linked but not boost_filesystem (with Boost <= 1.43)? At least it would be nice to eliminate one unnecessary link dependency.

comment:12 Changed 11 months ago by leper

In 11971:

Link with boost_system as that is needed for Boost <= 1.43. Refs #1360.

comment:13 Changed 10 months ago by ben

In 12229:

Adds support for Boost.Filesystem v3, the only option in Boost 1.50. Fixes #1527. Refs #1360

Note: See TracTickets for help on using tickets.