Question: 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 ```

```

Answer: 
If you don't need gnuradio's [ControlPort](https://wiki.gnuradio.org/index.php/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.
The answer of @Vasil is valid, but I want to share how I solved the problem in case other people need the library to compile gnuradio. I discovered that we need the  

libthrift-0.10.0 library. Since it is not available on the Ubuntu Repository, I installed the following packets from here (<https://mirror.genesisadaptive.com/deepin/pool/main/t/thrift/>):

* libthrift-dev\_0.10.0-1deepin\_amd64
* libthrift-c-glib0\_0.10.0-1deepin\_amd64
* libthrift-c-glib-dev\_0.10.0-1deepin\_amd64
* libthrift-0.10.0\_0.10.0-1deepin\_amd64