Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to boost 1.72.0 fails #19

Open
geissonator opened this issue Mar 30, 2020 · 6 comments
Open

Upgrade to boost 1.72.0 fails #19

geissonator opened this issue Mar 30, 2020 · 6 comments

Comments

@geissonator
Copy link
Contributor

Was trying an upgrade to boost 1.72.0 so we could use sourceforge to download and avoid the issue documented in boostorg/boost#299 but something with the new boost library causes objmgr to fail to compile.

make[2]: Entering directory '/phosphor-objmgr-c52be0d21755e23d67128fbcaec17e5952f4af9e'
  CC       libmapper/mapper-app.o
  CC       libmapper/la-mapper.lo
  CXX      src/mapperx-main.o
  CXX      src/mapperx-argument.o
  CXX      src/mapperx-processing.o
  CXX      src/mapperx-associations.o
  CCLD     libmapper.la
  CCLD     mapper
In file included from /usr/local/include/boost/coroutine/coroutine.hpp:10,
                 from /usr/local/include/boost/coroutine/all.hpp:11,
                 from /usr/local/include/boost/asio/spawn.hpp:19,
                 from /usr/local/include/sdbusplus/asio/object_server.hpp:10,
                 from src/types.hpp:6,
                 from src/associations.hpp:3,
                 from src/associations.cpp:1:
/usr/local/include/boost/coroutine/asymmetric_coroutine.hpp: In function 'typename boost::coroutines::pull_coroutine<R>::iterator boost::coroutines::begin(boost::coroutines::pull_coroutine<Arg>&)':
/usr/local/include/boost/coroutine/asymmetric_coroutine.hpp:2364:17: error: 'begin' is not a member of 'boost'
 2364 | { return boost::begin( c); }
      |                 ^~~~~
/usr/local/include/boost/coroutine/asymmetric_coroutine.hpp:2364:17: note: suggested alternatives:
In file included from /usr/include/c++/9/string:54,
                 from /usr/include/c++/9/stdexcept:39,
                 from /usr/local/include/boost/container/throw_exception.hpp:26,
                 from /usr/local/include/boost/container/new_allocator.hpp:24,
                 from /usr/local/include/boost/container/flat_map.hpp:26,
                 from src/types.hpp:3,
                 from src/associations.hpp:3,
                 from src/associations.cpp:1:
/usr/include/c++/9/bits/range_access.h:105:37: note:   'std::begin'
  105 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
      |                                     ^~~~~
In file included from /usr/local/include/boost/coroutine/coroutine.hpp:10,
                 from /usr/local/include/boost/coroutine/all.hpp:11,
                 from /usr/local/include/boost/asio/spawn.hpp:19,
                 from /usr/local/include/sdbusplus/asio/object_server.hpp:10,
                 from src/types.hpp:6,
                 from src/associations.hpp:3,
                 from src/associations.cpp:1:
/usr/local/include/boost/coroutine/asymmetric_coroutine.hpp:2363:1: note:   'boost::coroutines::begin'
 2363 | begin( pull_coroutine< R > & c)
      | ^~~~~
/usr/local/include/boost/coroutine/asymmetric_coroutine.hpp: In function 'typename boost::coroutines::pull_coroutine<R>::const_iterator boost::coroutines::begin(const boost::coroutines::pull_coroutine<Arg>&)':
/usr/local/include/boost/coroutine/asymmetric_coroutine.hpp:2369:17: error: 'begin' is not a member of 'boost'
 2369 | { return boost::begin( c); }
      |                 ^~~~~

@geissonator
Copy link
Contributor Author

https://lists.boost.org/boost-users/2019/12/90188.php discusses this same issue

@geissonator
Copy link
Contributor Author

Ahh, and boostorg/coroutine#45 is the issue and there is a patch against 1.72.0 in the release note we can pick up:
https://www.boost.org/patches/1_72_0/0001-revert-cease-dependence-on-range.patch

@geissonator
Copy link
Contributor Author

Here's a quick fix that uses latest boost release and applies the patch they released in the release note:

openbmc-build-scripts $git diff build-unit-test-docker.sh
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 65708f4..0ec008f 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -332,8 +332,9 @@ make -j$(nproc) defconfig && \
 make INSTALL_HDR_PATH=/usr/local headers_install
 
 FROM openbmc-base as openbmc-boost
-RUN curl -L https://dl.bintray.com/boostorg/release/${PKG_REV['boost']}/source/boost_$(echo "${PKG_REV['boost']}" | tr '.' '_').tar.bz2 | tar -xj && \
+RUN curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2 | tar -xj && \
 cd boost_*/ && \
+curl -L https://www.boost.org/patches/1_72_0/0001-revert-cease-dependence-on-range.patch | patch -p1 && \
 ./bootstrap.sh --prefix=${PREFIX} --with-libraries=context,coroutine && \
 ./b2 && ./b2 install --prefix=${PREFIX}

@mdmillerii
Copy link

also see boostorg/coroutine#46 that includes the revert commit.

@mine260309
Copy link
Contributor

A drive-by comment: why not use GitHub to download the boost library? I assume GitHub should be stable for most times.
E.g. https://github.com/boostorg/boost/archive/boost-1.72.0.tar.gz

@geissonator
Copy link
Contributor Author

A drive-by comment: why not use GitHub to download the boost library? I assume GitHub should be stable for most times.
E.g. https://github.com/boostorg/boost/archive/boost-1.72.0.tar.gz

I liked this idea but unfortunately the github release doesn't package in the needed tools/build/ scripts. Looks like they are git sub modules and not a part of the package :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants