Why the 1.6.x's mangle name rule is different from 1.5.x

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why the 1.6.x's mangle name rule is different from 1.5.x

Boost - Build mailing list
Recently I built boost 1.66, found the build libraries contain
different mangled name  with the former one in 1.59.
For example
In 1.59,
# nm -CD ./stage/lib/libboost_regex-single.so.1.59.0 | grep get_mem_block
00000000000ad530 T boost::re_detail::get_mem_block()

while in 1.66,
nm -CD ./stage/lib/libboost_regex-single.so.1.66.0 | grep get_mem_block
00000000001f5f78 T boost::re_detail_106600::get_mem_block()

The new version's mangled name contains the boost version number '_106600'.
That make the link fail.

Is this a bug or a rule change?

BTW, my build command is as below.
./b2 -j 8 --layout=tagged --buildid=single threading=single
link=shared,static cxxflags=-fPIC  --without-locale --without-thread
--without-wave stage

Thanks,

--
Sun Jiang Dong
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Why the 1.6.x's mangle name rule is different from 1.5.x

Boost - Build mailing list
AMDG

On 03/01/2018 10:23 PM, jiang dong Sun via Boost-build wrote:

> Recently I built boost 1.66, found the build libraries contain
> different mangled name  with the former one in 1.59.
> For example
> In 1.59,
> # nm -CD ./stage/lib/libboost_regex-single.so.1.59.0 | grep get_mem_block
> 00000000000ad530 T boost::re_detail::get_mem_block()
>
> while in 1.66,
> nm -CD ./stage/lib/libboost_regex-single.so.1.66.0 | grep get_mem_block
> 00000000001f5f78 T boost::re_detail_106600::get_mem_block()
>
> The new version's mangled name contains the boost version number '_106600'.
> That make the link fail.
>
> Is this a bug or a rule change?
>

  This is specific to Boost.Regex and is intentional.
You can't reliably link to a different version of
Boost from the version with which you compiled your
code.

> BTW, my build command is as below.
> ./b2 -j 8 --layout=tagged --buildid=single threading=single
> link=shared,static cxxflags=-fPIC  --without-locale --without-thread
> --without-wave stage
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Why the 1.6.x's mangle name rule is different from 1.5.x

Boost - Build mailing list
Thank Steven for your reply.
Anyway the error happens at compiling my application time but not run time.
The total process is as following.
a) build my boost version and then install
b) build my application which depends on the boost lib.
When the boost version is 1.5.x, then the link at step b) always succeeds.
If the boost version is 1.6.x, then the step b) should fail due to not able
to find the matched member function name.

Do I need to add special flags for my application to link the boost 1.6
successfully?  Thanks.





--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Build-f2685023.html
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build