# Ctest can't find gnuradio module!

**URL:** <https://www.ruby-forum.com/t/ctest-cant-find-gnuradio-module/230967>\
**Category:** GNU Radio\
**Created:** [July 15, 2014, 2:53pm UTC](https://www.ruby-forum.com/t/ctest-cant-find-gnuradio-module/230967 "2014-07-15T14:53:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 15, 2014, 2:53pm UTC](https://www.ruby-forum.com/t/ctest-cant-find-gnuradio-module/230967/1 "2014-07-15T14:53:18Z")

</div>

Hi there,

Could someone help me fix this issue, when I try to run my tests, the  
ctest  
returns the following:  
…  
from gnuradio import gr, gr\_unittest  
ImportError: No module named gnuradio  
…  
Nonetheless, when I import any module from gnuradio in python terminal,  
it  
passes without any problem, and I can also run gnuradio-companion !  
which I  
found very strange.

Thank you in advance.  
Mohamed

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/ctest-can-t-find-gnuradio-module-tp49344.html](http://gnuradio.4.n7.nabble.com/ctest-can-t-find-gnuradio-module-tp49344.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![mohamedx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@mohamedx](https://www.ruby-forum.com/u/mohamedx)\
**Post date:** [July 15, 2014, 3:21pm UTC](https://www.ruby-forum.com/t/ctest-cant-find-gnuradio-module/230967/2 "2014-07-15T15:21:57Z")

</div>

On Tue, Jul 15, 2014 at 8:51 AM, mohamedx [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> found very strange.
> 
> Thank you in advance.  
> Mohamed

What version of GNU Radio? And how did you install it in the first  
place?  
When you ran cmake, did you see that “testing-support” was enabled? And,  
just to make sure, you are running ctest within the build directory,  
right?

Tom

---

<div class="post-metadata">

**Author:** ![mohamedx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@mohamedx](https://www.ruby-forum.com/u/mohamedx)\
**Post date:** [July 15, 2014, 3:51pm UTC](https://www.ruby-forum.com/t/ctest-cant-find-gnuradio-module/230967/3 "2014-07-15T15:51:46Z")

</div>

Hi Tom,

Thank you for your prompt response.  
I use 3.7.3 version, I’ve installed it from the source.  
Here is what “cmake -Wno-dev ../” returns:

* * *

– Build type not specified: defaulting to release.  
– Boost version: 1.54.0  
– Found the following Boost libraries:  
– filesystem  
– system  
Checking for GNU Radio Module: RUNTIME  
– checking for module ‘gnuradio-runtime’  
– package ‘gnuradio-runtime’ not found

- INCLUDES=/usr/local/include
- LIBS=/lib64/libgnuradio-runtime.so  
GNURADIO\_RUNTIME\_FOUND = TRUE  
– Configuring done  
– Generating done  
– Build files have been written to: /xxxxxxxxxxxx/build

* * *

So there is no “testing support”, and yes, I’m running ctest within  
build  
directory.  
This a little bit strange, cmake didn’t find the runtime for the first  
place !

I appreciate anything would help.

On Tue, Jul 15, 2014 at 3:21 PM, Tom R.-2 [via GnuRadio] \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> > ImportError: No module named gnuradio  
> > What version of GNU Radio? And how did you install it in the first place?

[http://gnuradio.4.n7.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&id=instant\_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml](http://gnuradio.4.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)

> 

–

_Graduate Student at Supélec, MSc, Advanced Wireless Communication  
Systems,_  
_Élève ingénieur à l’INPT en mobilité internationale._

---

<div class="post-metadata">

**Author:** ![mohamedx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@mohamedx](https://www.ruby-forum.com/u/mohamedx)\
**Post date:** [July 15, 2014, 4:31pm UTC](https://www.ruby-forum.com/t/ctest-cant-find-gnuradio-module/230967/4 "2014-07-15T16:31:08Z")

</div>

On Tue, Jul 15, 2014 at 9:50 AM, mohamedx [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> – system  
> So there is no “testing support”, and yes, I’m running ctest within build  
> directory.  
> This a little bit strange, cmake didn’t find the runtime for the first  
> place !
> 
> I appreciate anything would help.

This doesn’t make sense. This looks like you’re trying to build your own  
OOT module, not GNU Radio itself. So are you trying to run ctest on your  
own code or actually run GNU Radio’s test suite?

And what’s happening with the "package ‘gnuradio-runtime’ not found’ is  
that pkg-config is not finding the .pc file, which means it’s not in a  
path  
known to it (see PKG\_CONFIG\_PATH). However, cmake continued to look  
explicitly for the headers and libraries and found them, which is why  
GNURADIO\_RUNTIME\_FOUND = TRUE.

It’s very odd that you have the headers in /usr/local and the library in  
/lib64, though. I’m thinking that this might have something to do with  
your  
ctest issue.

Tom
