# Re: problem building gr-howto-write-a-block-cmake

**URL:** <https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218022>\
**Category:** GNU Radio\
**Created:** [March 19, 2012, 1:53am UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218022 "2012-03-19T01:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 19, 2012, 1:53am UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218022/1 "2012-03-19T01:53:32Z")

</div>

Apologies for resurecting this thread, but i still have not resolved  
this issue.  
I have an otherwise perfectly working latest gnuradio-trunk but have  
not been able  
to build gr-howtowriteablock-cmake package.

Is there any way I can trace why cmake cannot find PythonLibs?

thanks for the help,  
Achilleas

# this is the output of cmake --debug-output …/

[anastas@raul build]$ cmake --debug-output …/  
Running with debug output on.  
– The CXX compiler identification is GNU  
Called from: [2]  
/usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Check for working CXX compiler: /usr/lib64/ccache/c++  
Called from: [2] /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Check for working CXX compiler: /usr/lib64/ccache/c++ – works  
Called from: [2] /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Detecting CXX compiler ABI info  
Called from: [2] /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Detecting CXX compiler ABI info - done  
Called from: [2] /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Build type not specified: defaulting to release.  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Boost version: 1.46.0  
Called from: [2] /usr/share/cmake/Modules/FindBoost.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– checking for module ‘gruel’  
Called from:  
[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– found gruel, version 3.5.3git  
Called from:  
[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Found GRUEL: /usr/local/lib64/libgruel.so  
Called from:  
[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– checking for module ‘gnuradio-core’  
Called from:  
[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/FindGnuradioCore.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– found gnuradio-core, version 3.5.3git  
Called from:  
[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/FindGnuradioCore.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Found GNURADIO\_CORE: /usr/local/lib64/libgnuradio-core.so  
Called from:  
[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/FindGnuradioCore.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/include  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/lib  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Boost version: 1.46.0  
Called from: [2] /usr/share/cmake/Modules/FindBoost.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/lib/CMakeLists.txt  
– Found the following Boost libraries:  
Called from: [2] /usr/share/cmake/Modules/FindBoost.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/lib/CMakeLists.txt  
– unit\_test\_framework  
Called from: [2] /usr/share/cmake/Modules/FindBoost.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/lib/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/swig  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Found PythonInterp: /usr/bin/python2.7  
Called from: [3] /usr/share/cmake/Modules/FindPythonInterp.cmake

[2]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/cmake/Modules/GrPython.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/swig/CMakeLists.txt  
– Found SWIG: /usr/bin/swig (found version “2.0.4”)  
Called from: [2] /usr/share/cmake/Modules/FindSWIG.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/swig/CMakeLists.txt  
– Could NOT find PythonLibs (missing: PYTHON\_LIBRARIES)  
Called from: [2] /usr/share/cmake/Modules/FindPythonLibs.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/swig/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/python  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/grc  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/apps  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
Entering  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/docs  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Found Doxygen: /usr/bin/doxygen  
Called from: [2] /usr/share/cmake/Modules/FindDoxygen.cmake

[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/docs/CMakeLists.txt  
Returning to  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake  
Called from:  
[1]  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/CMakeLists.txt  
– Configuring done  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/include  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/lib  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/swig  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/python  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/grc  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/apps  
– Generating  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build/docs  
– Generating done  
– Build files have been written to:  
/home/anastas/gnuradio\_trunk/gr-howto-write-a-block-cmake/build

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [March 19, 2012, 4:04am UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218022/2 "2012-03-19T04:04:05Z")

</div>

On 03/18/2012 05:52 PM, Achilleas A. wrote:

> Apologies for resurecting this thread, but i still have not resolved this issue.  
> I have an otherwise perfectly working latest gnuradio-trunk but have  
> not been able  
> to build gr-howtowriteablock-cmake package.
> 
> Is there any way I can trace why cmake cannot find PythonLibs?

Yea this is totally strange that it finds python libs in the regular  
build and not here. Perhaps there is some variable set prior to finding  
python libs in the howto thats not set in the main build.

I might suggest that you start deleting things until it works. For  
example, start deleting subdir includes (except swig) until it works:

add\_subdirectory(include)  
add\_subdirectory(lib)  
add\_subdirectory(swig)  
add\_subdirectory(python)  
add\_subdirectory(grc)  
add\_subdirectory(apps)  
add\_subdirectory(docs)

or move around the call to find\_package(PythonLibs) higher up in the top  
level Cmakelists until it works.

-Josh

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [March 19, 2012, 3:53pm UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218022/3 "2012-03-19T15:53:23Z")

</div>

On Sun, Mar 18, 2012 at 8:52 PM, Achilleas A.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> wrote:

> 

Achilleas,

Can you also send your output from running cmake in an empty build  
directory for GNU Radio so we can compare those results with these from  
the  
howto directory?

Thanks,  
Tom
