1

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 ```
CipherX
  • 371
  • 5
  • 18
  • 1
    Do you have `libthrift` installed? – fractals Jan 25 '20 at 06:14
  • I don't think so. Since I'm using Ubuntu 18.10, I need libthrift-0.10.0, but I'm not able to find it. I tried with the 0.11 by adding the last repository but it's not working. – CipherX Jan 25 '20 at 07:11
  • It shouldn't have enabled thrift linking if you haven't installed it. This is strange. did you force thrift enabling in CMake? – Marcus Müller Jan 26 '20 at 15:04
  • Indeed, I agree with you MarcusMüller that is was very strange, even because I installed all correctly and all dependencies were satisfied. By the way I didn't force to compile without thrift, but I think that your approach and the approach suggested by @Vasil works. Finally, I tried to download manually the required library (as specified in my answer) and install them with dpkg. – CipherX Jan 26 '20 at 15:09

2 Answers2

1

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.

Vasil Velichkov
  • 1,236
  • 11
  • 17
  • Thank you @Vasil, however I posted another solution to solve the problem in case other people need it. – CipherX Jan 26 '20 at 05:55
0

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
CipherX
  • 371
  • 5
  • 18
  • 1
    you can build GNU Radio without thrift, simply not by force-enabling ctrlport-thrift. We're testing exactly that in the CI. – Marcus Müller Jan 26 '20 at 15:04
  • I agree with you @MarcusMüller but I didn't know if the library is useful for other things (apart GnuRadio). – CipherX Jan 26 '20 at 15:10
  • there's thousands of libraries that are useful for other things – and you don't have to install them to make GNU Radio work, so that's not really helpful to anyone. – Marcus Müller Jan 26 '20 at 16:37
  • I agree, but if I install GnuRadio and it works, and after a moment I want to modify the gr-qtgui to do something, and for some reason it does not compile and I discover that the problem is related to a library, in my life I have two approaches: 1) ignoring and go ahead, 2) try to understand and fix the problem :). – CipherX Jan 26 '20 at 16:41