|
Boost Users : |
Subject: Re: [Boost-users] Static linking program_options on ARM
From: Pau Garcia i Quiles (pgquiles_at_[hidden])
Date: 2015-09-07 03:43:46
On Sun, Sep 6, 2015 at 8:06 PM, Vladimir Prus <vladimir.prus_at_[hidden]> wrote:
> On 06-Sep-15 2:58 AM, Pau Garcia i Quiles wrote:
>>
>> Hello,
>>
>> I am having trouble when linking Boost::Program_Options statically on
>> Linux ARM 32-bit: it spits an error about a duplicate symbol for a
>> guard-variable.
>>
>> It works fine on Linux ARM 32-bit (same compiler) if using shared
>> libraries, and also on Linux x86-64 both with static and shared
>> libraries.
>>
>> I can reproduce the problem with the examples included in the
>> libs/program_options/examples: real.cpp and custom_syntax.cpp compile
>> and run fine but first.cpp, multiple_sources.cpp
>> options_description.cpp, option_groups.cpp and regex.cpp fail:
>>
>> $ armv7a-openelec-linux-gnueabi-g++ -std=c++11 -o option_groups
>> option_groups.cpp -L $SYSROOT/usr/lib -lboost_program_options
>>
>>
>> /tmp/cch3i9Yf.ltrans0.ltrans.o:(.bss._ZGVZN5boost15program_options10validators17get_single_stringIcEERKSbIT_St11char_traitsIS3_ESaIS3_EERKSt6vectorIS7_SaIS7_EEbE5empty[_ZGVZN5boost15program_options10validators17get_single_stringIcEERKSbI
>> T_St11char_traitsIS3_ESaIS3_EERKSt6vectorIS7_SaIS7_EEbE5empty]+0x0):
>> multiple definition of `guard variable for std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> > const&
>> boost::program_options::validators::get_single_
>> string<char>(std::vector<std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> >,
>> std::allocator<std::basic_string<char, std::char_traits<char>,
>> std::allocator<char> > > > const&, bool)::empty'
>
>
>> Has anyone faced something like this?
>
>
> Hi Pau,
>
> I did not see such an error before, and I suspect it might be a bug in your
> toolchain. What version armv7-openelec-linux-gnueabi-g++ is, and who built
> that version? Maybe they might be more helpful with this error.
>
I built it from scratch using OpenElec 6.0:
https://github.com/pgquiles/OpenELEC.tv/tree/openelec-6.0-s82plus-from-minix-x8hp
I will check with OpenElec upstream, thank you.
-- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net