Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1360 closed defect (fixed)

[PATCH] Drop unused libboost dependencies

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

Description

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

Tested on Linux.

Attachments (2)

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

Download all attachments as: .zip

Change History (15)

by fabio, 12 years ago

Attachment: drop-unused-boost.patch added

comment:1 by Kieran P, 12 years ago

Keywords: patch, review → patch review
Milestone: Alpha 10Alpha 11

comment:2 by Kieran P, 12 years ago

Priority: Should HaveIf Time Permits

comment:3 by fabio, 12 years ago

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

comment:4 by ben, 12 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 11965:

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

comment:5 by historic_bruno, 12 years ago

Keywords: review removed

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

comment:6 by fcxSanya, 12 years ago

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 12 years ago by fcxSanya (previous) (diff)

by fcxSanya, 12 years ago

Attachment: make_log.tar.xz added

full output of make

in reply to:  6 ; comment:7 by historic_bruno, 12 years ago

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?

in reply to:  7 ; comment:8 by fcxSanya, 12 years ago

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.

in reply to:  8 ; comment:9 by fcxSanya, 12 years ago

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 by leper, 12 years ago

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 12 years ago by leper (previous) (diff)

in reply to:  9 comment:11 by historic_bruno, 12 years ago

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 by leper, 12 years ago

In 11971:

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

comment:13 by ben, 12 years ago

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.