myriadrf / gr-limesdr

gr-limesdr Plugin for GNURadio
Other
142 stars 77 forks source link

Make error: LMS_SetGaindB and LMS_GetGaindB undeclared #26

Closed sniporbob closed 5 years ago

sniporbob commented 5 years ago

Installing on an Raspberry Pi 3 according to: https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio and using the PPA install of LimeSuite.

cmake outputs the following

~/gr-limesdr/build $ cmake ..
-- Build type not specified: defaulting to release.
-- Configuring Boost C++ Libraries...
-- Boost version: 1.62.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Configuring GNU Radio C++ Libraries...
Checking for GNU Radio Module: RUNTIME
 * INCLUDES=/usr/include
 * LIBS=/usr/lib/arm-linux-gnueabihf/libgnuradio-runtime.so;/usr/lib/arm-linux-gnueabihf/libgnuradio-pmt.so
GNURADIO_RUNTIME_FOUND = TRUE
-- Configuring LimeSuite C++ Libraries...
-- Checking for module 'LimeSuite'
--   No package 'LimeSuite' found
-- Found LimeSuite: /usr/include/lime, /usr/lib/arm-linux-gnueabihf/libLimeSuite.so
-- 
-- Checking for module SWIG
-- Found SWIG version 3.0.10.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/gr-limesdr/build

make fails with the following

make
[  5%] Building CXX object lib/CMakeFiles/gnuradio-limesdr.dir/source_impl.cc.o
[ 11%] Building CXX object lib/CMakeFiles/gnuradio-limesdr.dir/sink_impl.cc.o
[ 16%] Building CXX object lib/CMakeFiles/gnuradio-limesdr.dir/common/device_handler.cc.o
/home/pi/gr-limesdr/lib/common/device_handler.cc: In member function ‘void device_handler::set_gain(int, bool, int, unsigned int)’:
/home/pi/gr-limesdr/lib/common/device_handler.cc:769:107: error: ‘LMS_SetGaindB’ was not declared in this scope
 r::getInstance().get_device(device_number),direction,channel,gain_dB)!=LMS_SUCCESS)
                                                                     ^
/home/pi/gr-limesdr/lib/common/device_handler.cc:779:101: error: ‘LMS_GetGaindB’ was not declared in this scope
 andler::getInstance().get_device(device_number),direction,channel,&gain_value);
                                                                              ^
lib/CMakeFiles/gnuradio-limesdr.dir/build.make:110: recipe for target 'lib/CMakeFiles/gnuradio-limesdr.dir/common/device_handler.cc.o' failed
make[2]: *** [lib/CMakeFiles/gnuradio-limesdr.dir/common/device_handler.cc.o] Error 1
CMakeFiles/Makefile2:135: recipe for target 'lib/CMakeFiles/gnuradio-limesdr.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-limesdr.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
9600 commented 5 years ago

PPAs are for Ubuntu and not Raspbian. You should install Lime Suite from source.