discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] install issue with c++11


From: Jason Matusiak
Subject: Re: [Discuss-gnuradio] install issue with c++11
Date: Tue, 05 Jun 2018 07:27:27 -0700
User-agent: MailAPI

So, the host machine performed much better (and of course much faster), so that got me past the UHD problem, but I still see the c++11 issue that I was trying to solve (I attempted to use Dave's fix.
 
Here is the error I see:

[ 12%] Building CXX object gr-blocks/lib/CMakeFiles/gnuradio-blocks.dir/float_array_to_int.cc.o
In file included from /usr/local/include/c++/4.9.2/cstdint:35:0,
from /opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:30:
/usr/local/include/c++/4.9.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:32:14: error: ‘int64_t’ does not name a type
static const int64_t MAX_INT = INT32_MAX;
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:33:14: error: ‘int64_t’ does not name a type
static const int64_t MIN_INT = INT32_MIN;
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc: In function ‘void float_array_to_int(const float*, int*, float, int)’:
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:39:5: error: ‘int64_t’ was not declared in this scope
int64_t r = llrintf(scale * in[i]);
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:40:9: error: ‘r’ was not declared in this scope
if (r < MIN_INT)
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:40:13: error: ‘MIN_INT’ was not declared in this scope
if (r < MIN_INT)
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:42:18: error: ‘MAX_INT’ was not declared in this scope
else if (r > MAX_INT)
^
/opt/gnuradio/v3.7.12.0_blah/src/gnuradio/gr-blocks/lib/float_array_to_int.cc:44:31: error: ‘r’ was not declared in this scope
out[i] = static_cast<int>(r);
^
make[2]: *** [gr-blocks/lib/CMakeFiles/gnuradio-blocks.dir/float_array_to_int.cc.o] Error 1
make[1]: *** [gr-blocks/lib/CMakeFiles/gnuradio-blocks.dir/all] Error 2
make: *** [all] Error 2

 
 


Marcus, I started to suspect after the thread started that that was the case.  I was doing this work in a VM so as to not hose my host system too much, but I just started another install on my host system to do the work without memory being an issue.
 
That said, the c++11 concerns are definitely there, and the new change to gr-blocks that was committed about 7 days ago was when we decided we need to come up with a good solution since I couldn't simply fetch/mod/rebuild that as easy as I could gqrx.
 
Fingers crossed that Dave's advice works on my beefier setup (sadly, one of my 100 other attempts might have worked, I don't recall when this memory issue started cropping up after I took on the c++11 task, but it wasn't there the other day).
 


On 06/05/2018 09:07 AM, Jason Matusiak wrote:
Thanks Dave, but that did not seem to work for me.  Here were the commands I ran (slightly different than recommended, but that was for some different recipe mods that have nothing to do with this issue):

$ export CXXFLAGS="-std=c++11"
$ PREFIX=/opt/gnuradio/v3.7.12.0
$ yes | pybombs prefix init $PREFIX
$ yes | pybombs -p $PREFIX recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git
$ source /opt/gnuradio/v3.7.12.0/setup_env.sh
$ pybombs -vvv -p $PREFIX install gnuradio

And currently things keep erroring out at the same place while installing UHD:

[ 43%] Building CXX object lib/CMakeFiles/uhd.dir/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp.o
[ 43%] Building CXX object lib/CMakeFiles/uhd.dir/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [lib/CMakeFiles/uhd.dir/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs....

I've also tried env CXXFLAGS=-std=c++11, but it had the same issues.

 
That error is internal to the compiler, it is failing to perform its job correctly.  This has nothing to do with Gnu Radio, per se, or PyBombs
  or any of that.  This ordinarily means you compiler is broken in some way.

HOWEVER.  How much memory do you have on the system?

This issue used to happen on systems with small physical memory, because compiling certain things requires a lot of virtual memory
  on the part of the compiler.



Jason,
 
     You can set the CXXFLAGS env variable to "-std=c++11" and any CMake builds you run (assuming the same shell) will check the CXXFLAGS var first.  This assumes that you don't overwrite the value of CMAKE_CXX_FLAGS.  I just tried it in a terminal with `export CXXFLAGS="-std=c++11"`, then `cmake ..`, and finally `VERBOSE=1 make -j 1`.  The verbose make command will show you if your flags are taking or not.
 
-Dave

On Tue, Jun 5, 2018 at 8:00 AM Jason Matusiak <address@hidden> wrote:
I am trying to install gnuradio onto a Centos 7 box and am having more and more issues with packages that use c++11 commands.  For some of the packages, I add the line:
CMAKE_CXX_FLAGS "-std=c++11"
to the module's CMakeLists.txt file.
 
The issue is that that requires a fetch, the mod, and then a rebuild.  This worked OK with it was just gqrx I was doing it for, but now I need it for other modules it appears, and so I am trying to find a more elegant solution that covers everything that is built via a pybombs install gnuradio command (like gr-blocks, which I can't use this trick for).
 
If I understand the problem correctly, Ubuntu uses new enough tools to realize that it needs to use the c++11 version (or newer I assume) to build since it is needed.  It seems like even though Centos 7 has the c++11 capability, it does not smartly trying to use it, and must be directed to for the installs to work.
 
Is there something I can do at an upper level to make things happy on an install?
_______________________________________________
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

_______________________________________________ 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]