question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[package] boost/1.70.0: Incorrectly applied bcp_namespace_issues.patch turns 1.70.0 into 1.71.0

See original GitHub issue

Package 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jgsogocommented, Dec 21, 2019

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 be boost/<version>@mycompany/stable.

1reaction
ghostcommented, Dec 10, 2019

Okay, keeping that in mind, I think I can safely close the bug. Thank you for your work guys, appreciate that!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version 1.70.0 - Boost C++ Libraries
New Libraries. Outcome: A set of tools for reporting and handling function failures in contexts where directly using C++ exception handling is ...
Read more >
Boost C++ Libraries - Browse /boost-binaries/1.70.0 at ...
These installers provide the listed binaries along with the complete source release (headers, source, documentation, tests, tools), so there is no need to ......
Read more >
1558278 – boost-1.72.0 is available - Red Hat Bugzilla
Since Boost 1.67 fails to build in rawhide, it seems optimistic to state that 1.68 will be used as a fallback. The default...
Read more >
Getting error for Boost 1.71.0 library with Visual Studio 2019 ...
you should Add include directory to your project: Right click on The project then: properties ==> C/C++ ==> Additional include directory ...
Read more >
boost C/C++ Package - JFrog ConanCenter - Conan.io
Version 1.80.0 of the boost package. Boost provides free peer-reviewed portable C++ source libraries.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found