FlightAware Discussions

Ver 5.0 dump1090-fa compile on linux x86 error

With the new version of Piaware 5.0 I was able to successfully compile/build package on my small linux x86 (Debian 10.8 Buster, i686 platform) w/o errors. So the piaware_5.0_i386.deb package is ready. This is not the case for the dump1090-fa. With the same procedure when upgrading dump1090-fa from 3.8.1 → 4.0 (this was smooth also), I am getting following error for the 5.0 version:

/usr/bin/ld: cpu.o: in function x86_info': ./cpu.c:22: undefined reference to GetX86Info’
/usr/bin/ld: ./cpu.c:22: undefined reference to `GetX86Info’
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:190: dump1090] Error 1
make[2]: Leaving directory ‘/usr/src/dump1090’
dh_auto_build: make -j1 RTLSDR=yes BLADERF=yes HACKRF=yes LIMESDR=yes DUMP1090_VERSION=5.0 returned exit code 2
make[1]: *** [debian/rules:48: override_dh_auto_build] Error 2
make[1]: Leaving directory ‘/usr/src/dump1090’
make: *** [debian/rules:57: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Any hint, please? Instructions?
Thanks.

Builds fine for me on x86 Ubuntu 20.04.2 LTS via dpkg-buildpackage -b

Check you have a clean git checkout?
Failing that, please provide the full build output.

Hi,
started from the scratch, but the same result:

root@satnogs:/opt# git clone GitHub - flightaware/dump1090: Dump1090 is a simple Mode S decoder for RTLSDR devices
Cloning into ‘dump1090’…
remote: Enumerating objects: 84, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (61/61), done.
remote: Total 11602 (delta 51), reused 48 (delta 23), pack-reused 11518
Receiving objects: 100% (11602/11602), 34.05 MiB | 4.57 MiB/s, done.
Resolving deltas: 100% (8311/8311), done.
Checking out files: 100% (1380/1380), done.

root@satnogs:/opt# cd dump1090/

root@satnogs:/opt/dump1090# dpkg-buildpackage -b --no-sign

dpkg-buildpackage: info: source package dump1090-fa
dpkg-buildpackage: info: source version 5.0
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by Eric Tran eric.tran@flightaware.com
dpkg-buildpackage: info: host architecture i386
dpkg-source --before-build .
debian/rules clean
dh clean --with=systemd
dh_auto_clean
make -j1 clean
make[1]: Entering directory ‘/opt/dump1090’
rm -f .o oneoff/.o compat/clock_gettime/.o compat/clock_nanosleep/.o cpu_features/src/.o dsp/generated/.o dsp/helpers/.o cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o cpu_features/src/hwcaps.o dump1090 view1090 faup1090 cprtests crctests oneoff/convert_benchmark oneoff/decode_comm_b oneoff/dsp_error_measurement oneoff/uc8_capture_stats starch-benchmark
make[1]: Leaving directory ‘/opt/dump1090’
dh_clean
rm -f debian/debhelper-build-stamp
rm -rf debian/.debhelper/
rm -f – debian/dump1090-fa.substvars debian/files
rm -fr – debian/dump1090-fa/ debian/tmp/
find . ( (
( -path .*/.git -o -path .*/.svn -o -path .*/.bzr -o -path .*/.hg -o -path .*/CVS -o -path .*/.pc -o -path .*/_darcs ) -prune -o -type f -a
( -name '#
#’ -o -name ‘.~’ -o -name '~’ -o -name DEADJOE
-o -name ‘.orig’ -o -name '.rej’ -o -name ‘.bak’
-o -name '.
.orig’ -o -name ..rej -o -name ‘.SUMS’
-o -name TAGS -o ( -path '
/.deps/’ -a -name '.P’ )
) -exec rm -f {} + ) -o
( -type d -a -name autom4te.cache -prune -exec rm -rf {} + ) )
debian/rules build
dh build --with=systemd
dh_update_autotools_config
dh_auto_configure
debian/rules override_dh_auto_build
make[1]: Entering directory ‘/opt/dump1090’
dh_auto_build – RTLSDR=yes BLADERF=yes HACKRF=yes LIMESDR=yes DUMP1090_VERSION=5.0
make -j1 RTLSDR=yes BLADERF=yes HACKRF=yes LIMESDR=yes DUMP1090_VERSION=5.0
make[2]: Entering directory ‘/opt/dump1090’
Building with:
Version string: 5.0
DSP mix: generic
RTLSDR support: yes
BladeRF support: yes
HackRF support: yes
LimeSDR support: yes
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c dump1090.c -o dump1090.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c anet.c -o anet.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c interactive.c -o interactive.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c mode_ac.c -o mode_ac.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c mode_s.c -o mode_s.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c comm_b.c -o comm_b.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c net_io.c -o net_io.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c crc.c -o crc.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c demod_2400.c -o demod_2400.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c stats.c -o stats.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c cpr.c -o cpr.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c icao_filter.c -o icao_filter.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c track.c -o track.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c util.c -o util.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c convert.c -o convert.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c ais_charset.c -o ais_charset.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c cpu.c -o cpu.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c sdr.c -o sdr.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c fifo.c -o fifo.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c sdr_ifile.c -o sdr_ifile.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c dsp/helpers/tables.c -o dsp/helpers/tables.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c sdr_rtlsdr.c -o sdr_rtlsdr.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c sdr_bladerf.c -o sdr_bladerf.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c sdr_hackrf.c -o sdr_hackrf.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c sdr_limesdr.c -o sdr_limesdr.o
cc -Icpu_features/include -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG -DHAVE_STRONG_GETAUXVAL -c cpu_features/src/filesystem.c -o cpu_features/src/filesystem.o
cc -Icpu_features/include -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG -DHAVE_STRONG_GETAUXVAL -c cpu_features/src/stack_line_reader.c -o cpu_features/src/stack_line_reader.o
cc -Icpu_features/include -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG -DHAVE_STRONG_GETAUXVAL -c cpu_features/src/string_view.c -o cpu_features/src/string_view.o
cc -Icpu_features/include -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG -DHAVE_STRONG_GETAUXVAL -c cpu_features/src/hwcaps.c -o cpu_features/src/hwcaps.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c -DSTARCH_MIX_GENERIC dsp/generated/flavor.generic.c -o dsp/generated/flavor.generic.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DSTARCH_MIX_GENERIC -g -O2 -fdebug-prefix-map=/opt/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/ -I/usr/include/ -I/usr/include/ -I/usr/include/libusb-1.0 -c -DSTARCH_MIX_GENERIC dsp/generated/dispatcher.c -o dsp/generated/dispatcher.o
cc -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o ais_charset.o cpu.o sdr.o fifo.o sdr_ifile.o dsp/helpers/tables.o sdr_rtlsdr.o sdr_bladerf.o sdr_hackrf.o sdr_limesdr.o cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o cpu_features/src/hwcaps.o dsp/generated/flavor.generic.o dsp/generated/dispatcher.o -Wl,-z,relro -Wl,-z,now -lpthread -lm -lrt -lrtlsdr -L/usr/lib/i386-linux-gnu/ -lbladeRF -lhackrf -lLimeSuite -lncurses
/usr/bin/ld: cpu.o: in function x86_info': ./cpu.c:22: undefined reference to GetX86Info’
/usr/bin/ld: ./cpu.c:22: undefined reference to `GetX86Info’
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:190: dump1090] Error 1
make[2]: Leaving directory ‘/opt/dump1090’
dh_auto_build: make -j1 RTLSDR=yes BLADERF=yes HACKRF=yes LIMESDR=yes DUMP1090_VERSION=5.0 returned exit code 2
make[1]: *** [debian/rules:48: override_dh_auto_build] Error 2
make[1]: Leaving directory ‘/opt/dump1090’
make: *** [debian/rules:57: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

What’s your uname -m output?

Maybe something is missing, but I don’t know what. The v4.0 build just fine.
#uname -m
i686

@marwillCZ

Try this


# builds with rtlsdr support only
# no bladerf, hackrf, limesdr

dpkg-buildpackage -b --no-sign --build-profiles=custom,rtlsdr  

 

Understood, but it is throwing the same error. It is around CPU capabilities detection.

/usr/bin/ld: cpu.o: in function x86_info': ./cpu.c:22: undefined reference to GetX86Info’
/usr/bin/ld: ./cpu.c:22: undefined reference to `GetX86Info’
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:190: dump1090] Error 1
make[2]: Leaving directory ‘/opt/dump1090’
dh_auto_build: make -j1 RTLSDR=yes BLADERF=no HACKRF=no LIMESDR=no DUMP1090_VERSION=5.0 returned exit code 2
make[1]: *** [debian/rules:48: override_dh_auto_build] Error 2
make[1]: Leaving directory ‘/opt/dump1090’
make: *** [debian/rules:57: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

This error has something to do with following function in file cpu.c in source code

static X86Info *x86_info()
{ 
  static bool valid = false; 
  static X86Info cache; 

  if (!valid) {
    cache = GetX86Info();
    valid = true;
  } 

  return &cache;

}

Ok, this is probably a build bug affecting 32-bit x86. I’ll push a fix to the dev branch shortly, but I don’t have a 32-bit install available to test on unfortunately. (edit: please try the dev branch at Fix builds on 32-bit x86 · flightaware/dump1090@462dee5 · GitHub or later)

2 Likes

I’ve noticed the issue while building dump1090-fa 5.0 with Armbian (Ubuntu Focal):

cc -Icpu_features/include -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG -DHAVE_STRONG_GETAUXVAL -c cpu_features/src/cpuinfo_arm.c -o cpu_features/src/cpuinfo_arm.o
cc -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DMODES_DUMP1090_VERSION=“5.0” -DMODES_DUMP1090_VARIANT=“dump1090-fa” -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DSTARCH_MIX_ARM -g -O2 -fdebug-prefix-map=/root/dump1090=. -fstack-protector-strong -Wformat -Werror=format-security -std=c11 -O3 -g -Wall -Wmissing-declarations -Werror -W -D_DEFAULT_SOURCE -fno-common -I/usr/include/ -c -DSTARCH_MIX_ARM -march=armv7-a+neon-vfpv4 -mfpu=neon-vfpv4 -ffast-math dsp/generated/flavor.armv7a_neon_vfpv4.c -o dsp/generated/flavor.armv7a_neon_vfpv4.o
In file included from dsp/generated/flavor.armv7a_neon_vfpv4.c:18:
dsp/generated/…/impl/magnitude_sc16.c: In function ‘starch_magnitude_sc16_neon_vrsqrte_armv7a_neon_vfpv4’:
dsp/generated/…/impl/magnitude_sc16.c:52:5: error: converting a packed ‘sc16_t’ {aka ‘const struct ’} pointer (alignment 1) to a ‘int16_t’ {aka ‘const short int’} pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member]
52 | const int16_t * restrict in_align = (const int16_t *) STARCH_ALIGNED(in);
| ^~~~~
In file included from dsp/generated/flavor.armv7a_neon_vfpv4.c:19:
dsp/generated/…/impl/magnitude_sc16q11.c: In function ‘starch_magnitude_sc16q11_neon_vrsqrte_armv7a_neon_vfpv4’:
dsp/generated/…/impl/magnitude_sc16q11.c:89:5: error: converting a packed ‘sc16_t’ {aka ‘const struct ’} pointer (alignment 1) to a ‘int16_t’ {aka ‘const short int’} pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member]
89 | const int16_t * restrict in_align = (const int16_t *) STARCH_ALIGNED(in);
| ^~~~~
cc1: all warnings being treated as errors
make[2]: *** [dsp/generated/makefile.arm:25: dsp/generated/flavor.armv7a_neon_vfpv4.o] Error 1
make[2]: Leaving directory ‘/root/dump1090’
dh_auto_build: error: make -j1 RTLSDR=yes BLADERF=no HACKRF=no LIMESDR=no DUMP1090_VERSION=5.0 returned exit code 2
make[1]: *** [debian/rules:48: override_dh_auto_build] Error 2
make[1]: Leaving directory ‘/root/dump1090’
make: *** [debian/rules:57: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

What’s your architecture & gcc version?

This is OrangePI Plus with latest Arbmian 21.02.3 Focal

Linux pi-rzn 5.10.21-sunxi #21.02.3 SMP Mon Mar 8 00:28:04 UTC 2021 armv7l armv7l armv7l GNU/Linux

~/dump1090# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 9.3.0-17ubuntu1~20.04’ --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

Can you try the dev branch at Maybe fix alignment warnings in arm neon code with recent gcc · flightaware/dump1090@c97b83d · GitHub or later and see if that helps? (I don’t have an environment to test it)

1 Like

yes, it did the trick! thanks :slight_smile:

$ cd dump1090

$ git fetch --all
Fetching origin

$ git reset --hard origin/dev
HEAD is now at c97b83d Maybe fix alignment warnings in arm neon code with recent gcc

$ dpkg-buildpackage -b --no-sign --build-profiles=custom,rtlsdr 

1 Like

I can confirm, that this time it did compile (ver 5.1dev) without errors. I didn’t installed the package yet.
Good work, thanks.

The dump1090-fa compilation failed on RPi with OS Arch Linux Arm 32-bit

$ uname -a
Linux alarmpi 5.10.13-3-ARCH #1 SMP Fri Feb 5 21:01:39 UTC 2021 armv7l GNU/Linux  

$ git clone https://github.com/flightaware/dump1090
$ cd dump1090
$ make 
... ... ...
... ... ...
In file included from dsp/generated/flavor.armv7a_neon_vfpv4.c:18:
dsp/generated/../impl/magnitude_sc16.c: In function 'starch_magnitude_sc16_neon_vrsqrte_armv7a_neon_vfpv4':
dsp/generated/../impl/magnitude_sc16.c:52:5: error: converting a packed 'sc16_t' pointer (alignment 1) to a 'int16_t' {aka 'const short int'} pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member]
   52 |     const int16_t * restrict in_align = (const int16_t *) STARCH_ALIGNED(in);
      |     ^~~~~
In file included from dsp/generated/flavor.armv7a_neon_vfpv4.c:19:
dsp/generated/../impl/magnitude_sc16q11.c: In function 'starch_magnitude_sc16q11_neon_vrsqrte_armv7a_neon_vfpv4':
dsp/generated/../impl/magnitude_sc16q11.c:89:5: error: converting a packed 'sc16_t' pointer (alignment 1) to a 'int16_t' {aka 'const short int'} pointer (alignment 2) may result in an unaligned pointer value [-Werror=address-of-packed-member]
   89 |     const int16_t * restrict in_align = (const int16_t *) STARCH_ALIGNED(in);
      |     ^~~~~
cc1: all warnings being treated as errors
make: *** [dsp/generated/makefile.arm:25: dsp/generated/flavor.armv7a_neon_vfpv4.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

You checked out master, not dev, and so you are missing the bugfix that’s described 4 posts above yours. (And you even quoted it 2 posts ago!)

I appreciate that you want to experiment with this but it’d be useful if you can take some time to produce quality bug reports, not just “hey I did this…”

Thanks @obj for responding. I did not try that commit because it was bug fix for architecture x86, and I was trying to build on Armv7 (RPi Model 4 with OS ArchLinux Arm 32-bit). It was my mistake to post the problem in this thread which is for architecture x86 causing misunderstanding. I apologise for it.

Just to be sure, now I tried commit c97b83d, and it gave error of CPU architecture, and compilation terminated. Please see below:

$ cd dump1090  
$ git fetch --all
Fetching origin
$ git reset --hard c97b83d
HEAD is now at c97b83d Maybe fix alignment warnings in arm neon code with recent gcc

$ make
... ... 
... ...
In file included from cpu_features/src/cpuinfo_x86.c:16:
cpu_features/include/cpuinfo_x86.h:228:2: error: #error "Including cpuinfo_x86.h from a non-x86 target."
  228 | #error "Including cpuinfo_x86.h from a non-x86 target."
      |  ^~~~~
cpu_features/src/cpuinfo_x86.c:25:2: error: #error "Cannot compile cpuinfo_x86 on a non x86 platform."
   25 | #error "Cannot compile cpuinfo_x86 on a non x86 platform."
      |  ^~~~~
cpu_features/src/cpuinfo_x86.c:121:10: fatal error: cpuid.h: No such file or directory
  121 | #include <cpuid.h>
      |          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:187: cpu_features/src/cpuinfo_x86.o] Error 1

No, the one you quoted is definiitely for ARM, see the commit comment.

Strange. What’s uname -m on that machine?