[package] boost/1.70.0: Incorrectly applied bcp_namespace_issues.patch turns 1.70.0 into 1.71.0
See original GitHub issuePackage and Environment Details (include every applicable attribute)
- Package Name/Version: boost/1.70.0
- Operating System+version: Linux Ubuntu 18.04
- Compiler+version: GCC 7.4.0
- Conan version: conan 1.19.2
- Python version: Python 3.7.5
Conan profile (output of conan profile show default
or conan profile show <profile>
if custom profile is in use)
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++11
build_type=Release
[options]
*:fPIC=True
*:shared=False
boost:shared=True
[build_requires]
[env]
Steps to reproduce (Include if Applicable)
- Remove installed boost, if any:
conan remove -f boost/1.70.0@conan/stable
- Install boost from conan-center (you may force rebuilding, it doesn’t matter):
conan install --build -o boost:shared=True boost/1.70.0@conan/stable
- Look at the shared libraries produced in the cache, they all have incorrect 1.71.0 embedded into their names:
$ cd ~/.conan/data/boost/1.70.0/conan/stable/package/5b61a950a8e504865808bd4e284db10c833b020f/lib
$ ls -1 libboost_*.so.*.*.*
libboost_atomic.so.1.71.0
libboost_chrono.so.1.71.0
libboost_container.so.1.71.0
libboost_context.so.1.71.0
libboost_contract.so.1.71.0
libboost_coroutine.so.1.71.0
libboost_date_time.so.1.71.0
libboost_fiber.so.1.71.0
libboost_filesystem.so.1.71.0
libboost_graph.so.1.71.0
libboost_iostreams.so.1.71.0
libboost_locale.so.1.71.0
libboost_log_setup.so.1.71.0
libboost_log.so.1.71.0
libboost_math_c99f.so.1.71.0
libboost_math_c99l.so.1.71.0
libboost_math_c99.so.1.71.0
libboost_math_tr1f.so.1.71.0
libboost_math_tr1l.so.1.71.0
libboost_math_tr1.so.1.71.0
libboost_prg_exec_monitor.so.1.71.0
libboost_program_options.so.1.71.0
libboost_random.so.1.71.0
libboost_regex.so.1.71.0
libboost_serialization.so.1.71.0
libboost_stacktrace_addr2line.so.1.71.0
libboost_stacktrace_backtrace.so.1.71.0
libboost_stacktrace_basic.so.1.71.0
libboost_stacktrace_noop.so.1.71.0
libboost_system.so.1.71.0
libboost_thread.so.1.71.0
libboost_timer.so.1.71.0
libboost_type_erasure.so.1.71.0
libboost_unit_test_framework.so.1.71.0
libboost_wave.so.1.71.0
libboost_wserialization.so.1.71.0
Logs (Include/Attach if Applicable)
Prompt investigation reveals the problem in the patch bcp_namespace_issues.patch
which obviously was generated against 1.71.0 and being incorrectly applied, replacing one extra line of context in Jamfile as well, which basically renames version 1.70.0 into 1.71.0.
Here is the relevant hunk from the aforementioned patch:
path-constant BOOST_ROOT : . ;
constant BOOST_VERSION : 1.71.0 ;
@@ -311,8 +312,8 @@ rule boost-install ( libraries * )
# stage and install targets via boost-install, above.
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
{
+ autolink = <link>shared:<define>BOOST_$(name:U)_DYN_LINK=1 ;
name = boost_$(name) ;
- autolink = <link>shared:<define>$(name:U)_DYN_LINK=1 ;
lib $(name)
: $(sources)
: $(requirements) $(autolink)
I think the hunk should get rejected in the first place because of context lines mismatch, and the patch should be rebased properly onto 1.70.0. But it ended up incorrectly applied by conan, seriously breaking the package.
For now, editing bcp_namespace_issues.patch on the line https://github.com/conan-io/conan-center-index/blob/5d3a76231eeab86d24dda08cb0ee92fa307ef50f/recipes/boost/all/patches/bcp_namespace_issues.patch#L23 to have constant BOOST_VERSION : 1.70.0 ;
fixes the issue. So do just dropping the patch whatsoever.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10 (5 by maintainers)
Top GitHub Comments
Hi, @helmesjo
Conan supports references without
user/channel
since v1.18.0 and it is the way to go for libraries in conan-center. (all packages in conan-center-index follow this approach). The extra fields in the references should only be used to disambiguate, for example, if your company modifies a particular version of boost for its needs, it could beboost/<version>@mycompany/stable
.Okay, keeping that in mind, I think I can safely close the bug. Thank you for your work guys, appreciate that!