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

make: boost error #91

Closed
black-pigeon opened this issue Nov 12, 2020 · 4 comments
Closed

make: boost error #91

black-pigeon opened this issue Nov 12, 2020 · 4 comments

Comments

@black-pigeon
Copy link

image
Hello, When I started to work with this project, the problem shows in the picture,what could result this? Thanks a lot!!!

@black-pigeon
Copy link
Author

When I get back to the last version, there shows no error. Maybe the latest version have some problem? Or maybe my computer environment need some changes?

@commodo
Copy link
Contributor

commodo commented Nov 12, 2020

What version of the boost libraries are you using?
And what distro?

@kerrynwood
Copy link

kerrynwood commented Nov 29, 2020

I think this is related to #87. I had a similar problem on Mac (clang V12.0.0), compiling against boost 1.60.

My fix was to add the boost:placeholders namespace.

diff --git a/lib/attr_sink_impl.cc b/lib/attr_sink_impl.cc
index 0bc869c..ae088bb 100644
--- a/lib/attr_sink_impl.cc
+++ b/lib/attr_sink_impl.cc
@@ -29,6 +29,8 @@
 #include <iostream>
 #include <boost/lexical_cast.hpp>

+using namespace boost::placeholders;
+
 namespace gr {
   namespace iio {

@u-eng
Copy link

u-eng commented Nov 3, 2021

Adding 'namespace boost::placeholders' in attr_sink_impl.cc doesn't seem to work for me. I'm on Ubuntu 16.04, installed gnuradio 3.7.9.1 using apt install gnuradio, and cloned the master branch of gr-iio (which is same as maint-3.7 I guess). Any ideas on how you resolved this issue?

Also boost version is 1.58.

This is the error I'm getting if I add 'using namespace boost::placeholders;':

/home/sspace/workarea/gr-iio/lib/attr_sink_impl.cc:32:24: error: ‘placeholders’ is not a namespace-name
using namespace boost::placeholders;
^
/home/sspace/workarea/gr-iio/lib/attr_sink_impl.cc:32:36: error: expected namespace-name before ‘;’ token
using namespace boost::placeholders;
^
/home/sspace/workarea/gr-iio/lib/attr_sink_impl.cc: In constructor ‘gr::iio::attr_sink_impl::attr_sink_impl(const string&, const string&, const string&, int, bool, bool)’:
/home/sspace/workarea/gr-iio/lib/attr_sink_impl.cc:94:99: error: ‘boost::placeholders’ has not been declared
"attr"), boost::bind(&attr_sink_impl::write_attribute, this, boost::placeholder
^
lib/CMakeFiles/gnuradio-iio.dir/build.make:198: recipe for target 'lib/CMakeFiles/gnuradio-iio.dir/attr_sink_impl.cc.o' failed
make[2]: *** [lib/CMakeFiles/gnuradio-iio.dir/attr_sink_impl.cc.o] Error 1
CMakeFiles/Makefile2:218: recipe for target 'lib/CMakeFiles/gnuradio-iio.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-iio.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

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

4 participants