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

Build fails with Boost 1.73.0 #347

Closed
jwakely opened this issue Jun 3, 2020 · 6 comments
Closed

Build fails with Boost 1.73.0 #347

jwakely opened this issue Jun 3, 2020 · 6 comments

Comments

@jwakely
Copy link
Contributor

jwakely commented Jun 3, 2020

Issue Description

Trying to build with Boost 1.73.0 results in dozens of failures, due to changes in Boost.Bind. One example:

/builddir/build/BUILD/uhd-3.15.0.0-rc2/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp: In constructor 'dma_fifo_block_ctrl_impl::dma_fifo_block_ctrl_impl(const uhd::rfnoc::make_args_t&)':
/builddir/build/BUILD/uhd-3.15.0.0-rc2/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp:61:21: error: '_1' was not declared in this scope
   61 |                     _1,
      |                     ^~

Other headers get this message:

In file included from /usr/include/boost/bind.hpp:30,
                 from /builddir/build/BUILD/uhd-3.15.0.0-rc2/host/lib/rfnoc/nocscript/function_table.cpp:10:
/usr/include/boost/bind.hpp:36:1: note: '#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.'
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~

I've used this patch to get it to build in Fedora:
https://src.fedoraproject.org/rpms/uhd/blob/745534ebabc68ae009475424e8bcee0fc5f0317a/f/uhd-bind-placeholders.patch
The patch doesn't apply cleanly to the current sources, so I'm just reporting an issue, not giving you a pull request, sorry.

@mbr0wn
Copy link
Contributor

mbr0wn commented Jul 16, 2020

I somehow wasn't able to reproduce the bug, even though it's super obvious. Maybe some CMake / Boost version issue on my end. However, I think a proper usage of includes will fix this.

@mbr0wn
Copy link
Contributor

mbr0wn commented Jul 16, 2020

Lol immediately after hitting send I realized what I was doing wrong. Yeah I can see the bug. A better fix is to add the appropriate includes everywhere. I notice a lot of new, unrelated warnings with Boost 1.73 but one thing at a time.

@mbr0wn
Copy link
Contributor

mbr0wn commented Jul 22, 2020

Fixedb by 13caaf0

@mbr0wn
Copy link
Contributor

mbr0wn commented Jul 11, 2024

Check out the commit above. If it's not on 3.13, try backporting.

@TylerWerne40
Copy link

Check out the commit above. If it's not on 3.13, try backporting.

Still trying to get UHD 3.13 working. Adding UHDBoost.cmake didn't address it. Are you suggesting using an older version of boost?

@mbr0wn
Copy link
Contributor

mbr0wn commented Jul 11, 2024

I meant backport the commit, but if you can switch to an older version of Boost (1.53 was the min for 3.13) then you should be fine, too.

Boost often changes things that break builds, so older versions of UHD always bitrot in this way. We're slowly removing our Boost dependencies, but that's an effort that'll take years (and won't help you in this case).

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