Issue while installing GR 3.7

Hello GR,

While building GR 3.7 (clone it from
https://github.com/gnuradio/gnuradio)
on a Centos machine I got this error.

In file included from
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:27:
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.h:48:
error:
‘mt19937’ in namespace ‘boost::random’ does not name a type
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc: In
constructor
‘gr::blocks::message_strobe_random_impl::message_strobe_random_impl(pmt::pmt_t,
gr::blocks::message_strobe_random_distribution_t, float, float)’:
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:57:
error: class ‘gr::blocks::message_strobe_random_impl’ does not have any
field named ‘d_rng’
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc: In
member function ‘void
gr::blocks::message_strobe_random_impl::update_dist()’:
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:89:
error: ‘d_rng’ was not declared in this scope

make[2]: ***
[gr-blocks/lib/CMakeFiles/gnuradio-blocks.dir/message_strobe_random_impl.cc.o]
Error 1
make[1]: *** [gr-blocks/lib/CMakeFiles/gnuradio-blocks.dir/all] Error 2
make: *** [all] Error 2

I did not figured out how to solve this issue .
Any hints will be appreciated.

Regards,


View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435.html
Sent from the GnuRadio mailing list archive at Nabble.com.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mt19937 refers to the standard mersenne twister random number
generator used in boost; so this is your compiler complaining about
boost::random not having that. Which version of boost does your centos
machine have?

Greetings
Marcus

On 20.02.2014 22:59, Ruecan wrote:

Hello GR,

While building GR 3.7 (clone it from
https://github.com/gnuradio/gnuradio) on a Centos machine I got
this error.

In file included from
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:27:

/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.h:48:
error:

‘mt19937’ in namespace ‘boost::random’ does not name a type
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:
In constructor
‘gr::blocks::message_strobe_random_impl::message_strobe_random_impl(pmt::pmt_t,

gr::blocks::message_strobe_random_distribution_t, float, float)’:

/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:57:

error: class ‘gr::blocks::message_strobe_random_impl’ does not have any

field named ‘d_rng’
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:
In member function ‘void
gr::blocks::message_strobe_random_impl::update_dist()’:
/raid/nae/gnuradio-3.7/gr-blocks/lib/message_strobe_random_impl.cc:89:

error: ‘d_rng’ was not declared in this scope

make[2]: ***
[gr-blocks/lib/CMakeFiles/gnuradio-blocks.dir/message_strobe_random_impl.cc.o]

Error 1

– View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435.html

Sent from the GnuRadio mailing list archive at Nabble.com.

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTBoF2AAoJEAFxB7BbsDrLph4IAIZNzm1pWVh71uGVbZOmebbB
xPEApwWsQCDyCUOaPGkUagximKQ2YJ3Ygacz1LxnXgUnlGUaA386OO8x0pYtpT20
me92586ElkQpQsAZUtkGivv3WDBb7bADXFWETXbztcB756Qomdv3ozPSS67eJ17z
9DfGg1Gto2d40AYOKEm2ddRCyKMmxV35nms8sD0peSRm3soQF6xmhmba7+uwv4oY
VaRikxOMeHYo5k/jJv8FexKZeEIicOUFuxthynn3BR77Kady9YO3NcNRjPEdmb8Z
nG6+UlwbUMXv05C++tsiJbW+OxdOZQkO52ywk8jFLrXiAGhvvyGYbUx+G1tncGY=
=eQjh
-----END PGP SIGNATURE-----

Should be :slight_smile:
Just as side info:
http://www.boost.org/doc/libs/1_54_0/doc/html/boost/random/mt19937.html

Sorry, totally running low on clues here…
This is twice as strange since boost::random is missing mt19937; if it
was std:: I’d guess on a non-C++11 standard library, but like it is…
If cleaning and rebuilding doesn’t help, make sure that libstdc+±devel
is correctly installed

Basically, it should be right here:
http://www.boost.org/doc/libs/1_54_0/boost/random/mersenne_twister.hpp
and is included.

AAAAAAAAAAAND bam.
Found the bug. header include protection by #ifdef at the very beginning
of the file.
you might pull my bugfix from
https://github.com/marcusmueller/gnuradio.git;

git pull https://github.com/marcusmueller/gnuradio.git
master_fix_message_strobe_random_ifndef

Greetings,
Marcus

Thanks Marcus,

Actually the boost version I have is 1.54.0.

Is this ok ?


View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435p46451.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Ruecan:
I got carried away. This is indeed a bugfix for the header file not
being processed in some cases, but since the error appeared although
actually processing the fixed header file, I’ve run out of ideas, still.

Yeah, start completely clean.

Very Respectfully,

Dan CaJacob

I just pulled the changes then did make but get the same error.

I am not so familiar with git. After pulling your bugfix, do I need to
make
clean, remove the CMakeCache then do cmake again then make or am I
missing
some part of the process.


View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435p46457.html
Sent from the GnuRadio mailing list archive at Nabble.com.

good find, this was probably my fault - sorry
We should consider changing headers to use “#pragma once” which is
simpler and less error prone
do people still use gcc older than 3.4 ? I think this is pretty widely
supported now
not sure if that would cause swig issues as well -
-Tim

Guys,
I re make from clean but still got the same error.
PS: after pulling the bugfix, do I need to execute any other command,
other
than

*git pull https://github.com/marcusmueller/gnuradio.git
master_fix_message_strobe_random_ifndef *

Tim, I did not get what you mean by
Tim O’Shea wrote

changing headers to use “#pragma once”


View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435p46461.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Well don’t worry, it wasn’t actually causing problems :wink:

After fixing, I got out my zsh-foo and tried
echo $(( $(git ls-files |grep .h$|xargs git grep --heading “#ifndef
INCLUDED”|wc -l) - $(git ls-files |grep .h$|xargs git grep --heading
#ifndef INCLUDED”| uniq | wc -l) ))
luckily, there are no duplicate lines containing #ifndef INCLUDED, so
I’m hopeful enough everything else is fine in current master.

I agree on the #pragma once suggestion, and choose to believe
http://en.wikipedia.org/wiki/Pragma_once#Portability which says that we
should maybe suggest that people move away from gcc 3.4.
Although I don’t think this would break a relevant numbers of GNU Radio
environments, it could be something maintainers might want to save up
for 3.8 or 4 :wink:

Greetings,
Marcus

Hi Ruecan,

this just the question if we should move away from

#ifndef INCLUDED_FILENAME_OF_HEADER_H
#define INCLUDED_FILENAME_OF_HEADER_H

#endif

to the more sanity-ensuring

#pragma once

preprocessor directive.

Sadly, this was not related to your problem…
Still have no idea what’s causing your problems.

Greetings,
Marcus

Has anyone found a fix for this? I will not be using the
message_strobe_random block and am very time limited, so I simply added
an #ifdef DO_NOT_BUILD at the beginning of the cc and h files, but
would like to know the correct solution.

Thanks,

  • Kevin

Do you think that if I go back and try to install GR 3.7.0 instead, it
may
work ?


View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435p46466.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Incredibly simple fix. In
./gnuradio_src/gr-blocks/lib/message_strobe_random_impl.h, change:

  boost::random::mt19937 d_rng;

to:

  boost::mt19937 d_rng;

Done.

I’m on CentOS 6.5 and just hit this same issue – the default version of
boost for this rev of the OS is 1.41.0-18.el6 – it does appear to be
there,
but I get the same error as the original poster did (I used the
sbrac.org
build-gnuradio script).

From the header (/usr/include/boost/random/mersenne_twister.hpp):
/typedef random::mersenne_twister<uint32_t,32,624,397,31,0x9908b0df,11,
7,0x9d2c5680,15,0xefc60000,18, 3346425566U> mt19937;/

In file included from
/usr/local/src/gnuradio/gnuradio/gr-blocks/lib/message_strobe_random_impl.cc:27:
/usr/local/src/gnuradio/gnuradio/gr-blocks/lib/message_strobe_random_impl.h:48:
error: ‘mt19937’ in namespace ‘boost::random’ does not name a type


View this message in context:
http://gnuradio.4.n7.nabble.com/Issue-while-installing-GR-3-7-tp46435p47304.html
Sent from the GnuRadio mailing list archive at Nabble.com.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs