From www.AA6E.net
Jump to: navigation, search

Typical command-line output when building rtl-sdr on a Raspberry Pi:

pi@rpi-test ~ $ rm -rf rtl-sdr

pi@rpi-test ~ $ git clone git://git.osmocom.org/rtl-sdr.git
Cloning into 'rtl-sdr'...
remote: Counting objects: 1582, done.
remote: Compressing objects: 100% (676/676), done.
remote: Total 1582 (delta 1157), reused 1213 (delta 898)
Receiving objects: 100% (1582/1582), 340.30 KiB | 310 KiB/s, done.
Resolving deltas: 100% (1157/1157), done.

pi@rpi-test ~ $ cd rtl-sdr

pi@rpi-test ~/rtl-sdr $ ls
AUTHORS         configure.ac  git-version-gen  m4           rtl-sdr.rules
cmake           COPYING       include          Makefile.am  src
CMakeLists.txt  Doxyfile.in   librtlsdr.pc.in  README

pi@rpi-test ~/rtl-sdr $ autoreconf -i
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:14: installing `./compile'
configure.ac:15: installing `./config.guess'
configure.ac:15: installing `./config.sub'
configure.ac:5: installing `./install-sh'
configure.ac:5: installing `./missing'
src/Makefile.am: installing `./depcomp'

pi@rpi-test ~/rtl-sdr $ ./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... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking build system type... armv6l-unknown-linux-gnueabihf
checking host system type... armv6l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -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 dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB... yes
checking for doxygen... false
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking for atan2 in -lm... yes
checking for sqrt in -lm... yes
checking for atan2 in -lm... (cached) yes
checking for clock_gettime in -lrt... yes
checking if gcc supports -fvisibility=hidden... yes
checking whether compiler understands -Wall... yes
configure: creating ./config.status
config.status: creating librtlsdr.pc
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating Doxyfile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

pi@rpi-test ~/rtl-sdr $ make
echo 0.5.3.5-6ee5 > .version-t && mv .version-t .version
make  all-recursive
make[1]: Entering directory `/home/pi/rtl-sdr'
Making all in include
make[2]: Entering directory `/home/pi/rtl-sdr/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/pi/rtl-sdr/include'
Making all in src
make[2]: Entering directory `/home/pi/rtl-sdr/src'
  CC     librtlsdr.lo
  CC     tuner_e4k.lo
  CC     tuner_fc0012.lo
  CC     tuner_fc0013.lo
  CC     tuner_fc2580.lo
  CC     tuner_r82xx.lo
  CCLD   librtlsdr.la
  CC     rtl_sdr.o
  CC     convenience/convenience.o
  CCLD   rtl_sdr
  CC     rtl_tcp.o
  CCLD   rtl_tcp
  CC     rtl_test.o
  CCLD   rtl_test
  CC     rtl_fm.o
  CCLD   rtl_fm
  CC     rtl_eeprom.o
  CCLD   rtl_eeprom
  CC     rtl_adsb.o
  CCLD   rtl_adsb
  CC     rtl_power.o
  CCLD   rtl_power
make[2]: Leaving directory `/home/pi/rtl-sdr/src'
make[2]: Entering directory `/home/pi/rtl-sdr'
make[2]: Leaving directory `/home/pi/rtl-sdr'
make[1]: Leaving directory `/home/pi/rtl-sdr'

pi@rpi-test ~/rtl-sdr $ sudo make install
make  install-recursive
make[1]: Entering directory `/home/pi/rtl-sdr'
Making install in include
make[2]: Entering directory `/home/pi/rtl-sdr/include'
make[3]: Entering directory `/home/pi/rtl-sdr/include'
make[3]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 rtl-sdr.h rtl-sdr_export.h '/usr/local/include'
make[3]: Leaving directory `/home/pi/rtl-sdr/include'
make[2]: Leaving directory `/home/pi/rtl-sdr/include'
Making install in src
make[2]: Entering directory `/home/pi/rtl-sdr/src'
make[3]: Entering directory `/home/pi/rtl-sdr/src'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   librtlsdr.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/librtlsdr.so.0.0.5 /usr/local/lib/librtlsdr.so.0.0.5
libtool: install: (cd /usr/local/lib && { ln -s -f librtlsdr.so.0.0.5 librtlsdr.so.0 || { rm -f librtlsdr.so.0 && ln -s librtlsdr.so.0.0.5 librtlsdr.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f librtlsdr.so.0.0.5 librtlsdr.so || { rm -f librtlsdr.so && ln -s librtlsdr.so.0.0.5 librtlsdr.so; }; })
libtool: install: /usr/bin/install -c .libs/librtlsdr.lai /usr/local/lib/librtlsdr.la
libtool: install: /usr/bin/install -c .libs/librtlsdr.a /usr/local/lib/librtlsdr.a
libtool: install: chmod 644 /usr/local/lib/librtlsdr.a
libtool: install: ranlib /usr/local/lib/librtlsdr.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/rtl_sdr /usr/local/bin/rtl_sdr
libtool: install: /usr/bin/install -c .libs/rtl_tcp /usr/local/bin/rtl_tcp
libtool: install: /usr/bin/install -c .libs/rtl_test /usr/local/bin/rtl_test
libtool: install: /usr/bin/install -c .libs/rtl_fm /usr/local/bin/rtl_fm
libtool: install: /usr/bin/install -c .libs/rtl_eeprom /usr/local/bin/rtl_eeprom
libtool: install: /usr/bin/install -c .libs/rtl_adsb /usr/local/bin/rtl_adsb
libtool: install: /usr/bin/install -c .libs/rtl_power /usr/local/bin/rtl_power
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/pi/rtl-sdr/src'
make[2]: Leaving directory `/home/pi/rtl-sdr/src'
make[2]: Entering directory `/home/pi/rtl-sdr'
make[3]: Entering directory `/home/pi/rtl-sdr'
make[3]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 librtlsdr.pc '/usr/local/lib/pkgconfig'
make  install-data-hook
make[4]: Entering directory `/home/pi/rtl-sdr'
make[4]: Nothing to be done for `install-data-hook'.
make[4]: Leaving directory `/home/pi/rtl-sdr'
make[3]: Leaving directory `/home/pi/rtl-sdr'
make[2]: Leaving directory `/home/pi/rtl-sdr'
make[1]: Leaving directory `/home/pi/rtl-sdr'

pi@rpi-test ~/rtl-sdr $ sudo ldconfig

pi@rpi-test ~/rtl-sdr $ sudo make install-udev-rules
/usr/bin/install -c -m 644 rtl-sdr.rules /etc/udev/rules.d

pi@rpi-test ~/rtl-sdr $ rtl_test -t
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.