# SEGFAULT when using GR\_LOG\_INFO

**URL:** <https://www.ruby-forum.com/t/segfault-when-using-gr-log-info/243026>\
**Category:** GNU Radio\
**Created:** [August 16, 2015, 1:56pm UTC](https://www.ruby-forum.com/t/segfault-when-using-gr-log-info/243026 "2015-08-16T13:56:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [August 16, 2015, 1:56pm UTC](https://www.ruby-forum.com/t/segfault-when-using-gr-log-info/243026/1 "2015-08-16T13:56:32Z")

</div>

Hi everyone,

I want to use logging in GNURadio.

I followed this link to use the logger :  
[https://gnuradio.org/doc/doxygen/page\_logger.html](https://gnuradio.org/doc/doxygen/page_logger.html).  
I modified my CMakiefile.txt to link LOG4CPP dirs & libs.  
I added the FindLog4cpp.module file in cmake/Modules folder.  
I used the -DENABLE\_GR\_LOG=on parameter in cmake

Here is the output when I run cmake -DENABLE\_GR\_LOG=on :  
…  
Checking for GNU Radio Module: RUNTIME

- INCLUDES=/usr/local/include
- 

LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so  
GNURADIO\_RUNTIME\_FOUND = TRUE  
– ENABLE\_GR\_LOG set to on.  
– HAVE\_LOG4CPP set to True.  
– LOG4CPP\_LIBRARIES set to /usr/lib/liblog4cpp.so.  
…

In the constructor of my new block, I use this macro :  
GR\_LOG\_INFO(d\_logger, (“Hello World!”));

But, when I want tu use my block, I get this error :  
Segmentation fault (core dumped)

Am I doing something wrong?

Thanks.

_CACHELIN Marius_  
_Ingénieur Systèmes, Réseaux et Télécommunications_  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mariusc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@mariusc](https://www.ruby-forum.com/u/mariusc)\
**Post date:** [August 20, 2015, 11:10am UTC](https://www.ruby-forum.com/t/segfault-when-using-gr-log-info/243026/2 "2015-08-20T11:10:22Z")

</div>

Does someone could help me to fix it?

I really need to use this feature, and I don’t know what I am doing  
wrong…

Thanks
