Opened 9 years ago
#8607 new Patches
Duplicate Symbols when using Parameter or Graph Library on HP-UX
Reported by: | 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.
Patch to correct hpux (hppa) linker issue when using Boost Graph or Parameters library