make failed without librtlsdr even though I have installed rtl-sdr
make succeded only after librtlsdr was installed.
With rtl-sdr installed, but without installing librtlsdr
[abcd@localhost dump1090-fa]$ sudo dnf install rtl-sdr
[abcd@localhost dump1090-fa]$ sudo make BLADERF=no
.... .... ....
Package 'librtlsdr', required by 'virtual:world', not found
cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE -c ais_charset.c -o ais_charset.o
Package librtlsdr was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtlsdr.pc'
to the PKG_CONFIG_PATH environment variable
Package 'librtlsdr', required by 'virtual:world', not found
cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE -c sdr_rtlsdr.c -o sdr_rtlsdr.o
sdr_rtlsdr.c:54:10: fatal error: rtl-sdr.h: No such file or directory
54 | #include <rtl-sdr.h>
| ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:45: sdr_rtlsdr.o] Error 1
.
(B) rtl-sdr
With librtlsdr installed and rtl-sdr removed
[abcd@localhost dump1090-fa]$ sudo dnf remove rtl-sdr
[abcd@localhost dump1090-fa]$ ./dump1090
./dump1090: error while loading shared libraries: librtlsdr.so.0: cannot open shared object file: No such file or directory
.
With rtl-sdr installed
[abcd@localhost dump1090-fa]$ sudo dnf install rtl-sdr
[abcd@localhost dump1090-fa]$ ./dump1090
Wed Jan 22 13:24:29 2020 EST dump1090-fa starting up.
rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832UFA, SN 00000101)
Detached kernel driver
Found Rafael Micro R820T tuner
rtlsdr: tuner gain set to 49.6 dB
Allocating 4 zero-copy buffers
*5dc01aa771a3b9;
CRC: 000000
RSSI: -1.8 dBFS
Score: 750
Time: 8929001.67us
DF:11 AA:C01AA7 IID:0 CA:5
All Call Reply (reliable)
ICAO Address: C01AA7 (Mode S / ADS-B)
Air/Ground: airborne
I don’t think you understand the packaging here. The compile failure will be because you’re missing a development/headers package somewhere.
My point was that it makes no sense to mix the distribution-provided packages with a compiled-from-source library, and doing so is asking for random crashes in anything that uses the library if there have been any ABI changes. If you’re going to build from source and install system-wide, then don’t install the distribution-provided packages, and you should probably rebuild everything that uses librtlsdr from source too.
After some “research” & Googling, I found that make install installs librtlsdr.so.xx file in directory /usr/lib/. This does not match Fedora/RHEL, which requires the x64 library files to be located in /usr/lib64. As a result installing x64 package rtl-sdr from Fedora repository became necessary.
SOLUTION:
Added following flags to cmake ../ command: -DLIB_INSTALL_DIR=/usr/lib64 -DCMAKE_INSTALL_PREFIX=/usr
Added command sudo ldconfig
(ldconfig command alone did not solve the problem untill I first rebuilt and reinstalled using above noted flags with cmake).
By doing above two things, I no longer needed following two commands:
NEXT ISSUE: SkyView fails to load from another computer on same network (This problem is NOT due to disabling of SELinux. It existed even before disabling SELinux)