Glad to help. Once you get the segfault, actually things are better because you 
can use gdb to see the actual problem. Forgot to mention that part, but for 
details see [1].


PWG



[1] http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging

TutorialsDebugging - GNU Radio - 
gnuradio.org<http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging>
gnuradio.org
How to debug GNU Radio applications¶ Once you've started creating GNU Radio 
applications, you will probably stumble upon some errors sooner or later.


________________________________
From: Myers, David <[email protected]>
Sent: Friday, January 20, 2017 12:45:23 PM
To: Garver, Paul W; [email protected]
Cc: Harper, Andrew
Subject: Re: issue with boost::chrono::


Paul-


You were right! It was a linking issue.


In my OOT parent director, I modified the following line in the CMakeLists.txt 
file:

find_package(Boost "1.35" COMPONENTS filesystem system)

to read as follows:

find_package(Boost "1.35" COMPONENTS filesystem system chrono)

which fixed the issue.


Side note: For this issue, removing the try/except around the "from xxx_swig 
import *" in the __init__.py file just caused a segfault. Still, I really liked 
the idea and plan to keep that tip in my toolbox!


Thanks for the help!


David Myers

GTRI

________________________________
From: Garver, Paul W
Sent: Thursday, January 19, 2017 2:03 PM
To: Myers, David; [email protected]
Cc: Harper, Andrew
Subject: Re: issue with boost::chrono::


My money is on this being a linking error. Did you ensure the proper linking is 
being done in the cmake file?


Also, when I had I a similar problem this helped debug:


in the python/  directory, look at the __init__.py file and remove the

try / except around the "from xxx_swig import *".


You should actually see what the issue is once you run it again. I suspect an 
undefined symbol.


PWG

________________________________
From: Discuss-gnuradio <[email protected]> on 
behalf of Myers, David <[email protected]>
Sent: Thursday, January 19, 2017 1:36:09 PM
To: [email protected]
Cc: Harper, Andrew
Subject: [Discuss-gnuradio] issue with boost::chrono::


Hello,


I'm trying to use boost::chrono clocks in my OOT block. When I try to include 
the following line of code in this block all the blocks in the OOT module to 
stop working:


boost::chrono::system_clock::now();


To be clear my OOT module still compiles and installs without error, but with 
this line of code in a single block all my blocks fail to run. Anytime I try to 
run a block from my OOT module in GNURadio I get the following error:


AttributeError: 'module' object has no attribute 'name_of_my_oot_block'


It's worth noting I am able to compile and run code using the same 
boost::chrono functions outside GNU Radio using a gcc compiler with no issue.



I'm using GNU Radio v3.7.10.1 and my block uses the following special include 
testaments:

#include <boost/chrono.hpp>
#include <boost/thread/locks.hpp>
#include <boost/thread/thread.hpp>


Any guidance you can offer would be greatly appreciated! With thanks,


David Myers

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

Reply via email to