jketterl / csdr

A simple DSP library and command-line tool for Software Defined Radio.
GNU General Public License v3.0
49 stars 20 forks source link

Path problems with libcsdr++.so.0.18.2 #11

Closed andimik closed 1 month ago

andimik commented 1 month ago

Due to some compatibility reasons, https://github.com/andimik/fmlist_scan will install csdr in another directory.

cd build_csdr
cmake ../csdr/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local
make

and sudo make install will generate and install all files.

[ 11%] Built target csdr
[ 17%] Built target csdr-bin
[ 88%] Built target csdr++
[ 94%] Built target csdr++-bin
[100%] Built target nmux
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /home/andreas/.local/lib/libcsdr.so.0.18.2
-- Up-to-date: /home/andreas/.local/lib/libcsdr.so
-- Up-to-date: /home/andreas/.local/include/libcsdr.h
-- Up-to-date: /home/andreas/.local/bin/csdr
-- Up-to-date: /home/andreas/.local/lib/pkgconfig/csdr.pc
-- Up-to-date: /home/andreas/.local/lib/cmake/Csdr/CsdrTargets.cmake
-- Up-to-date: /home/andreas/.local/lib/cmake/Csdr/CsdrTargets-release.cmake
-- Up-to-date: /home/andreas/.local/lib/cmake/Csdr/CsdrConfig.cmake
-- Up-to-date: /home/andreas/.local/lib/cmake/Csdr/CsdrConfigVersion.cmake
-- Up-to-date: /home/andreas/.local/lib/libcsdr++.so.0.18.2
-- Up-to-date: /home/andreas/.local/lib/libcsdr++.so
-- Up-to-date: /home/andreas/.local/include/csdr/adpcm.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/agc.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/amdemod.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/async.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/audioresampler.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/benchmark.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/complex.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/converter.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/dbpsk.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/dcblock.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/deemphasis.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/downmix.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/fft.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/fftexchangesides.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/fftfilter.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/filter.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/fir.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/firdecimate.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/fmdemod.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/fractionaldecimator.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/gain.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/limit.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/logaveragepower.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/logpower.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/module.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/power.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/reader.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/realpart.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/ringbuffer.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/shift.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/sink.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/source.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/timingrecovery.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/varicode.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/version.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/window.hpp
-- Up-to-date: /home/andreas/.local/include/csdr/writer.hpp
-- Up-to-date: /home/andreas/.local/bin/csdr++
-- Up-to-date: /home/andreas/.local/bin/nmux

But the problem is, that the generated executables will not find the file libcsdr++.so.0.18.2 although it is under .local/lib

$ find | grep libcsdr++.so.0.18.2
./.local/lib/libcsdr++.so.0.18.2
./apps/fmlist_scan/src/git/jketterl/build_csdr/src/lib/libcsdr++.so.0.18.2
$ /home/andreas/.local/bin/csdr++
/home/andreas/.local/bin/csdr++: error while loading shared libraries: libcsdr++.so.0.18.2: cannot open shared object file: No such file or directory
andreas@E535:~/apps/fmlist_scan/src/git/jketterl/build_csdr$ /home/andreas/.local/bin/csdr
/home/andreas/.local/bin/csdr: error while loading shared libraries: libcsdr.so.0.18.2: cannot open shared object file: No such file or directory

If it helps, this it the install_manifext.txt: install_manifest.txt

Even this following workaround will not work.

cmake ../csdr/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_INSTALL_LIBDIR=$HOME/.local/lib

The only chance is to copy the file to a folder in the path:

sudo cp .local/lib/libcsdr.so.0.18.2 /usr/lib
$ ~/.local/bin/csdr
csdr - a simple commandline tool for Software Defined Radio receiver DSP.

As I am not a programmer, I fear that the path is hardcoded somewhere in your code.

jketterl commented 1 month ago

If you want to install your libraries in a non-standard path, you'll have to set that up accordingly with the linux library resolution configuration. That is beyond the scope of this project though.

andimik commented 1 month ago

Understood. Thanks anyway.