# 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/218088>\
**Category:** GNU Radio\
**Created:** [March 20, 2012, 11:03pm UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218088 "2012-03-20T23:03:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 20, 2012, 11:03pm UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218088/1 "2012-03-20T23:03:20Z")

</div>

Success!

Everything works fine as long as I make the following change on the top  
CMakeLists.txt file in gr-howto-write-a-block-cmake  
from  
project(gr-howto-write-a-block CXX)  
to  
project(gr-howto-write-a-block CXX C)

Cmake is now finding the PythonLibs at:  
/usr/lib64/libpython2.7.so

I have no idea why this works…

Also note that the sample project directories generated by the  
gr\_modtool.py  
script produce CMakeLists.txt files with the former declaration of  
“project”  
and thus do not work for me without the above modification.

thanks everyone for the help,  
Achilleas

---

<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 20, 2012, 11:07pm UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218088/2 "2012-03-20T23:07:02Z")

</div>

On 03/20/2012 03:02 PM, Achilleas A. wrote:

> /usr/lib64/libpython2.7.so
> 
> I have no idea why this works…

Hah, I thought of this to myself and said no way… Good find.

The check for python libs (in the version you have) may be using one of  
the macros that uses a C compiler. The call: enable\_language(C) would  
also be an equivalent to this.

-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 21, 2012, 12:59am UTC](https://www.ruby-forum.com/t/re-problem-building-gr-howto-write-a-block-cmake/218088/3 "2012-03-21T00:59:41Z")

</div>

On Tue, Mar 20, 2012 at 6:05 PM, Josh B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > project(gr-howto-write-a-block CXX C)  
> > the macros that uses a C compiler. The call: enable\_language(C) would  
> > also be an equivalent to this.
> 
> -josh

Achilleas,

Good catch! I just updated master and next with this fix.

Thanks!

Tom
