discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] compile gnuradio in cmake


From: ruiy
Subject: Re: [Discuss-gnuradio] compile gnuradio in cmake
Date: Sun, 4 Mar 2018 12:06:35 +0800


Thank you for your debug. It's helpful.
I have try to compile it by rewrite CMakeLists.txt. The detail is to link the program to qt4 instead of qt5. And it's successful.
Although I don't know why it failed by qt5, I can continue my work.
Thanks again !

------------------ Original ------------------
From:  "Sean Horton";<address@hidden>;
Send time: Sunday, Mar 4, 2018 2:45 AM
To: "Sakthivel Velumani"<address@hidden>;
Cc: "ruiy"<address@hidden>; "discuss-gnuradio"<address@hidden>;
Subject:  Re: [Discuss-gnuradio] compile gnuradio in cmake

I haven't solved the problem (sorry), but try running your test in valgrind. I got this:

==8697==  Bad permissions for mapped region at address 0x6DD9AC0
==8697==    at 0x9321184: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==8697==    by 0x400F469: call_init.part.0 (dl-init.c:72)
==8697==    by 0x400F575: call_init (dl-init.c:119)
==8697==    by 0x400F575: _dl_init (dl-init.c:120)
==8697==    by 0x4000ED9: ??? (in /usr/lib/x86_64-linux-gnu/ld-2.26.so)

gdb also shows the problem is while loading libQtGui as well.

Sakthivel, as far as why one might want to build a flowgraph without gnuradio-companion, a flowgraph is static and cannot be reconfigured. I also tend to build my flowgraphs in C++ so I can put them into unit test harnesses to unit test my radio.


On Sat, Mar 3, 2018 at 3:01 AM, Sakthivel Velumani <address@hidden> wrote:
Hi Ruiy,

I am also new to GNU Radio. If I am right, I think you are trying to build a flow graph using C++. Is there a specific reason you are not using GRC and Python?

Regards,
Sakthivel

On Sat, Mar 3, 2018 at 6:02 AM, ruiy <address@hidden> wrote:
I am trying to compile gnuradio by cmake. I have writen the CMakeLists to compile my program.
It can work when I don't use qtgui. But a error occur when I use qtgui.  The error is exit code 139 which showed in  the picture following. I cannot understand what happen.

CMakeLists.txt:
cmake_minimum_required(VERSION 3.9)
project(TestQtGui)

set(CMAKE_PREFIX_PATH /home/calt/Qt5.9.4/5.9.4/gcc_64)
find_package(Qt5Widgets)
find_package(Qt5Core)
find_package(Qt5Gui)

find_package(Boost "1.35" COMPONENTS filesystem system)

set(GR_REQUIRED_COMPONENTS QTGUI)
find_package(Gnuradio "3.7.2" REQUIRED)

include_directories(
${GNURADIO_ALL_INCLUDE_DIRS}
)

set(SOURCE_FILES main.cpp)
add_executable(TestQtGui ${SOURCE_FILES})
target_link_libraries(TestQtGui Qt5::Widgets
Qt5::Gui
${Boost_LIBRARIES}
${GNURADIO_ALL_LIBRARIES})

main.cpp:
#include <gnuradio/top_block.h>
#include <gnuradio/qtgui/time_sink_f.h>

int main() {
int rate = 48000;
gr::top_block_sptr tb = gr::make_top_block("testQtGui");
gr::qtgui::time_sink_f::sptr t_bk = gr::qtgui::time_sink_f::make(1024, rate, "", 1);
}

errors:
home/calt/workspace/TestQtGui/cmake-build-debug/TestQtGui
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

Pictures:


I can't understand what cause the exit code 139. Any wrong with my cmakelists.txt?

I will appreciate it If you can solve. Thank you very much.


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




--
Sean Horton


reply via email to

[Prev in Thread] Current Thread [Next in Thread]