Opened 9 years ago

#8607 new Patches

Duplicate Symbols when using Parameter or Graph Library on HP-UX

Reported by: James Hugard <james_hugard@…> Owned by: Daniel Wallin
Milestone: To Be Determined Component: parameter
Version: Boost 1.48.0 Severity: Problem
Keywords: HP-UX hpux hppa link linker gcc Cc:

Description

On HP-UX 11i v2 (B.11.23), using gcc 4.0.1 and the native linker (ld B.11.59)

When linking a shared library which has multiple object files using the Boost Graph library or other code using the Parameter library, the link process fails with several dozen "duplicate symbol" errors, such as:

[18:50:06]/usr/ccs/bin/ld: Duplicate symbol "boost::graph::keywords::(anonymous namespace)::_vertices_equivalent" in files .libs/a.o and .libs/b.o

Root cause seems to be that the linker has an issue collapsing variables defined with a templated type into a single definition; specifically when boost/parameter/name.hpp is included in multiple files.

This also appears to be an issue with versions of MSVC before 1300.

The attached patch file corrects the issue by enabling the same fix for MSVC <1300 when compiled on HPPA systems.

Note that this issue does not appear on HPUX 11.23 Itanium (ia64), which has a different native linker implementation.

Attachments (1)

boost-parameter-library-hppa-fix.patch (725 bytes ) - added by James Hugard <james_hugard@…> 9 years ago.
Patch to correct hpux (hppa) linker issue when using Boost Graph or Parameters library

Download all attachments as: .zip

Change History (1)

by James Hugard <james_hugard@…>, 9 years ago

Patch to correct hpux (hppa) linker issue when using Boost Graph or Parameters library

Note: See TracTickets for help on using tickets.