steve-m / kalibrate-rtl

fork of http://thre.at/kalibrate/ for use with rtl-sdr devices
BSD 2-Clause "Simplified" License
472 stars 146 forks source link

Kali installation kalibrate-rtl (kalibrate for rtl-sdr) error reporting #19

Open gameking2oo8 opened 5 years ago

gameking2oo8 commented 5 years ago

root@kali:~# cd kalibrate-rtl/ root@kali:~/kalibrate-rtl# ./bootstrap root@kali:~/kalibrate-rtl# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of g++... gcc3 checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking whether ln -s works... yes checking for ranlib... ranlib checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for inline... inline checking for working strtod... yes checking for floor... no checking for getpagesize... yes checking for memset... yes checking for sqrt... no checking for strtoul... yes checking for strtol... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for FFTW3... yes checking for LIBRTLSDR... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands b>root@kali</b:~/kalibrate-rtl# make make all-recursive make[1]: Entering directory '/root/kalibrate-rtl' Making all in src make[2]: Entering directory '/root/kalibrate-rtl/src' g++ -I/ -g -O2 -o kal kal-arfcn_freq.o kal-c0_detect.o kal-circular_buffer.o kal-fcch_detector.o kal-kal.o kal-offset.o kal-usrp_source.o kal-util.o -lfftw3 -L -lrtlsdr -lrt /usr/bin/ld: kal-usrp_source.o: in function usrp_source::~usrp_source()&apos;: /root/kalibrate-rtl/src/usrp_source.cc:81: undefined reference tortlsdr_close' /usr/bin/ld: kal-usrp_source.o: in function usrp_source::tune(double)&apos;: /root/kalibrate-rtl/src/usrp_source.cc:127: undefined reference tortlsdr_set_center_freq' /usr/bin/ld: kal-usrp_source.o: in function usrp_source::set_gain(float)&apos;: /root/kalibrate-rtl/src/usrp_source.cc:154: undefined reference tortlsdr_set_tuner_gain_mode' /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:159: undefined reference to rtlsdr_set_tuner_gain&apos; /usr/bin/ld: kal-usrp_source.o: in functionusrp_source::open(unsigned int)': /root/kalibrate-rtl/src/usrp_source.cc:175: undefined reference to rtlsdr_get_device_count&apos; /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:183: undefined reference tortlsdr_get_device_name' /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:186: undefined reference to rtlsdr_get_device_name&apos; /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:190: undefined reference tortlsdr_open' /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:197: undefined reference to rtlsdr_set_sample_rate&apos; /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:202: undefined reference tortlsdr_reset_buffer' /usr/bin/ld: /root/kalibrate-rtl/src/usrp_source.cc:202: undefined reference to rtlsdr_reset_buffer&apos; /usr/bin/ld: kal-usrp_source.o: in functionusrp_source::fill(unsigned int, unsigned int*)': /root/kalibrate-rtl/src/usrp_source.cc:229: undefined reference to rtlsdr_read_sync&apos; /usr/bin/ld: kal-usrp_source.o: in functionusrp_source::set_freq_correction(int)': /root/kalibrate-rtl/src/usrp_source.cc:142: undefined reference to `rtlsdr_set_freq_correction' collect2: error: ld returned 1 exit status make[2]: [Makefile:401: kal] Error 1 make[2]: Leaving directory '/root/kalibrate-rtl/src' make[1]: [Makefile:376: all-recursive] Error 1 make[1]: Leaving directory '/root/kalibrate-rtl' make: *** [Makefile:317: all] Error 2

I don't know what's wrong.

CompKingCanada commented 4 years ago

Same here. Can't compile

knatsakis commented 4 years ago

I have had the same issue with ubuntu/disco and librtlsdr-dev version 0.6-1.

In my case the problem was caused by the invalid pkg-config file at /usr/lib/x86_64-linux-gnu/pkgconfig/librtlsdr.pc that comes with version 0.6-1.

I fixed it by upgrading librtsdr-dev to version 0.6-2 from ubuntu/eoan.

robrackn commented 4 years ago

try adjusting /usr/local/lib/pkgconfig/librtlsdr.pc I'm still running librtlsdr-dev 0.6-1

Had the same/similar issue on a RasPi 4 aarch64 running Raspbian 10 (Buster). undefined usrp_source was my issue. I modified /usr/local/lib/pkgconfig/librtlsdr.pc to the following to find the missing references:

prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include

The missing references in my situation are all related to ./src/usrp_source.cc:line xxx: rtlsdr_get_device_name' rtlsdr_get_device_name' rtlsdr_open' rtlsdr_set_sample_rate' rtlsdr_reset_buffer' rtlsdr_reset_buffer' usrp_source::fill(unsigned int, unsigned int*)': rtlsdr_read_sync'

jeff-luszcz commented 4 years ago

robrackn's librtlsdr.pc fix above was what allowed me to finally compile calibrate-rtl on my raspberry pi running the SatNOGS "Raspbian image with SatNOGS Client Ansible "

If you are banging your head on alternative rtlsdr compiles and whatnot, try this first.

On my systems the left hand side was present but all the variables to the right were blank. A quick edit fixed the compile problems right away.

conradstorz commented 4 years ago

Worked for me too. Same problem of the missing variables. I simply used sudo nano /usr/local/lib/pkgconfig/librtlsdr.pc to edit the file.

SloCompTech commented 4 years ago

If anybody still needs solution, I fixed it with sed:

cd build
cmake ../  -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR:PATH=lib && \
        sed -i 's/^prefix=.*/prefix=\/usr/g' librtlsdr.pc && \
        sed -i 's/^exec_prefix=.*/exec_prefix=\$\{prefix\}/g' librtlsdr.pc && \
        sed -i 's/^libdir=.*/libdir=\$\{exec_prefix\}\/lib/g' librtlsdr.pc && \
        sed -i 's/^includedir=.*/includedir=\$\{prefix\}\/include/g' librtlsdr.pc
JamesSmi-ux commented 3 years ago

I have the same problem.. My kal doesn't work..is not searching for frequencies.. what can I do ? ++++ collect2: error: ld returned 1 exit status make[2]: [Makefile:403: kal] Error 1 make[2]: Leaving directory '/root/kalibrate-rtl/src' make[1]: [Makefile:378: all-recursive] Error 1 make[1]: Leaving directory '/root/kalibrate-rtl' make: *** [Makefile:319: all] Error 2

Thank you