Search code examples
c++gnuradiognuradio-companion

make: cannot find -lthrift


Scenario: I'm compiling GNuRadio (I'm doing a very simple modification to the GnuRadio module qtgui) with "sudo make install" the content of "/prefix/default/src/gnuradio/build". When I try to compile, I receive this error.

I thought that I did't install thrift, but I have it.

Any suggestions?

/usr/bin/ld: cannot find -lthrift
collect2: error: ld returned 1 exit status
make[2]: *** [gr-qtgui/lib/CMakeFiles/gnuradio-qtgui.dir/build.make:1182: gr-qtgui/lib/libgnuradio-qtgui-3.7.13.5.so.0.0.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:12843: gr-qtgui/lib/CMakeFiles/gnuradio-qtgui.dir/all] Error 2
make: *** [Makefile:163: all] Error 2 ```

Solution

  • If you don't need gnuradio's ControlPort you may try recompiling without it so thrift won't be required. Go to the gnuradio's build directory, remove CMakeCache.txt and then run cmake with -DENABLE_CTRLPORT_THRIFT=OFF parameter.

    If you need ControlPort add the full output of grep "^THRIFT" CMakeCache.txt (executed from the build directory) to your question.