I’m trying to build LimeSuite and SoapySDR from source (on Gentoo) and would like to do a local installation without changing any system wide libraries.
~/projects/sdr/limesdr/LimeSuite.git $ rm -fr build
~/projects/sdr/limesdr/LimeSuite.git $ git rev-parse --short HEAD
f53a592
~/projects/sdr/limesdr/LimeSuite.git $ mkdir build;cd build
~/projects/sdr/limesdr/LimeSuite.git/build $ cmake ../
-- The C compiler identification is GNU 4.9.4
...
-- GNUPlot Found
CMake Warning at SoapyLMS7/CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by "SoapySDR" with any
of the following names:
SoapySDRConfig.cmake
soapysdr-config.cmake
Add the installation prefix of "SoapySDR" to CMAKE_PREFIX_PATH or set
"SoapySDR_DIR" to a directory containing one of the above files. If
"SoapySDR" provides a separate development package or SDK, be sure it has
been installed.
...
Then I try again and specify the location of the above cmake file as indicated:
~/projects/sdr/limesdr/LimeSuite.git/build $ cd ..
~/projects/sdr/limesdr/LimeSuite.git $ rm -fr build; mkdir build; cd build
~/projects/sdr/limesdr/LimeSuite.git/build $ SoapySDR_DIR=~/projects/sdr/SoapySDR.git/cmake cmake ../
-- The C compiler identification is GNU 4.9.4
..
-- GNUPlot Found
CMake Error at /home/zener/projects/sdr/SoapySDR.git/cmake/SoapySDRConfig.cmake:161 (message):
cannot find SoapySDR library in /home/zener/projects/lib
Call Stack (most recent call first):
SoapyLMS7/CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/zener/projects/sdr/limesdr/LimeSuite.git/build/CMakeFiles/CMakeOutput.log".
See also "/home/zener/projects/sdr/limesdr/LimeSuite.git/build/CMakeFiles/CMakeError.log".
~/projects/sdr/limesdr/LimeSuite.git/build $
CMakeError.log has an error:
/home/zener/projects/sdr/limesdr/LimeSuite.git/build/CMakeFiles/CMakeTmp/src.c:2:27: error: array type has incomplete element type
int main(){struct i2c_msg messages[2]; return 0;}
Unfortunately, the src.c is removed after cmake has completed.
Thanks, but that’s exactly what I did in my second attempt above, i.e. setting the SoapySDR_DIR variable on the command line and running cmake. The shell would expand the tilde.
I also tried to export the variable by itself using the full path like in your example, but as expected the result is the same.
Thank you. I’m on Gentoo so there is no “i2c-dev” package. But I’ve managed to build it on a different computer (also Gentoo) with a bit more recent kernel where I have enabled more I2C drivers in the kernel. This is the specs:
However, now I’m faced with a different error which seem to tell me that I’ll have to to actually install SoapySDR
~/projects/sdr/LimeSuite.git/build $ SoapySDR_DIR=$HOME/projects/sdr/SoapySDR.git/cmake cmake ../
...
-- GNUPlot Found
CMake Error at /home/zener/projects/sdr/SoapySDR.git/cmake/SoapySDRConfig.cmake:161 (message):
cannot find SoapySDR library in /home/zener/projects/lib
Does this mean I have to install SoapySDR, i.e. that LimeSuite will not be able to find its files where it was built?
But even if I re-run cmake with -DCMAKE_INSTALL_PREFIX, re-build and make install it I get the same error message. I never specified the ~/projects/lib directory anywhere.