discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Fwd: GNURadio/Module builds and std=C++11


From: GhostOp14
Subject: [Discuss-gnuradio] Fwd: GNURadio/Module builds and std=C++11
Date: Tue, 20 Jun 2017 14:06:54 -0400


I ran into it earlier today with the gr-osmosdr module and libfreesrp that produced errors, but I had run into it in some of the modules I had developed that are up in pybombs (gr-clenabled, gr-lfast, and gr-grnet) when I first moved to Ubuntu from a straight debian install.  As soon as I realized it was happening I fixed it in the makefiles with the "set (CMAKE_CXX_STANDARD 11)" workaround so others didn't run into it.  I did it as a "quick fix" thinking others may have a better way on Ubuntu and maybe I was missing something.  If I hadn't moved to Ubuntu I may never have realized it was an issue on some platforms, so I don't know if there's other OS versions it could be happening on with gcc versions prior to 6?

I think that's the long way of asking if there's a better way?


On Tue, Jun 20, 2017 at 1:17 PM, Ron Economos <address@hidden> wrote:
I'm seeing gr-osmosdr fail with freesrp support here on 16.04. Is there another OOT that fails?

Ron

On 06/20/2017 09:25 AM, Ghost Op wrote:
Hi everyone,

I've run into this on every Ubuntu 16.04 box I've installed gnuradio
and OOT modules on and Google doesn't seem to have a nice clean answer
(the search answer is always add a compile flag) so I figured I'd ask
the group.

When I build modules (gr-osmosdr in particular with libfreesrp support
I run into this) on a fresh Ubuntu 16.04.2 LTS install, I run into a
warning like this: "warning: non-static data member initializers only
available with -std=c++11 or -std=gnu++11".  Depending on the code it
may produce errors on some lines preventing compilation.

I know what causes it, the compiler is defaulting to something earlier
than the  c++11 standard (like C++99) with the Ubuntu repo gcc version
(5.4) installed, so some of the syntax in the code is causing the
warning.  I can modify the CMake and add this to it "set
(CMAKE_CXX_STANDARD 11)" and it builds after that, but my guess is
that this builds on everyone else's Ubuntu without these modifications
or the setting would be standard in the CMake files.  What I'd really
like to do is tell the compiler to default to -std=C++11 even if it's
not explicitly provided as a compile flag, but again if everyone were
running into it I think it would have been fixed another way.

If I do the same build on a standard debian build with gcc 6.3 it
builds clean so it's definitely a default standard issue for compilers
on Ubuntu 16.04.

Does anyone have any insight/suggestions?

Thanks!

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]