Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#2469 closed defect (fixed)

[PATCH] link failure without not-used Boost.Signals library when Boost.Signals2 is used

Reported by: fabio Owned by: leper
Priority: Must Have Milestone: Alpha 17
Component: Build & Packages Keywords: patch
Cc: Patch:

Description (last modified by fabio)

Since r13716 with Boost >= 1.54 Boost.Signal2 is used rather than Boost.Signal. However it still try to link to Boost.Signal and, if this is not available, linking fails:

/usr/bin/ld: impossibile trovare -lboost_signals
collect2: error: ld returned 1 exit status
make[1]: *** [../../../binaries/system/libAtlasUI.so] Errore 1
make: *** [AtlasUI] Errore 2

So r13716 is not enough to work with a (future) version without signals1, it will compile OK, but will fail at linking.

Possible solutions:

  • change the check to use signals2 from 1.54 and use 1.40 (updated version with signals2, released in 2009), and remove all the signal link flags from extern_libs4.lua (there is no need to add other libs to link, since signals2 is apparently in main boost lib now). This way we'll drop support for older boost versions (it should not be a problem, every supported Ubuntu version (up to lucid/10.04) has at least 1.40, while precise/12.04 (oldest version with 0ad packages in the PPA) has 1.48);
  • just modify extern_libs4.lua to not use the signals link flags whit boost >= 1.54.

I prefer the first approach, it's simpler (remove some code from extern_libs4.lua) and not dependent on the Boost version. The attached patch does this.

Attachments (1)

signals2.diff (4.1 KB ) - added by fabio 10 years ago.
Use Signals2 with Boost >= 1.40 and get rid of useless old Signals (v1), previously required even when using Signals2

Download all attachments as: .zip

Change History (9)

comment:1 by fabio, 10 years ago

Keywords: review patch added
Summary: link failure without not-used Boost.Signals library when Boost.Signals2 is used[PATCH] link failure without not-used Boost.Signals library when Boost.Signals2 is used

Note that r13716 is also useless for the motivation of getting rid of deprecated Signals (v1), since it still needs it during linking.

Attached a patch to require Boost 1.40 (updated version of Signals2, released in 2009) for Atlas and getting rid of old Signals.

Last edited 10 years ago by fabio (previous) (diff)

by fabio, 10 years ago

Attachment: signals2.diff added

Use Signals2 with Boost >= 1.40 and get rid of useless old Signals (v1), previously required even when using Signals2

comment:2 by fabio, 10 years ago

Milestone: Alpha 16Alpha 17

Better to postpone this after a new release.

comment:3 by fabio, 10 years ago

Description: modified (diff)

comment:4 by fabio, 10 years ago

Description: modified (diff)

comment:5 by fabio, 10 years ago

Description: modified (diff)

comment:6 by leper, 10 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 15173:

Use Boost.Signals2 for Atlas. Patch by fabio. Fixes #2469.

comment:7 by ben, 10 years ago

In 15292:

Adds missing Boost.Signals2 1.53 headers for Windows, refs #2469.
Removes unused Boost.Signals headers and static libs.

comment:8 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.