Skip to content

Commit

Permalink
Fix host vs build var naming. Use DEB_HOST_ARCH in package builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
mutability committed Dec 19, 2022
1 parent e3b3fa8 commit a13cdc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ else
LIMESDR ?= no
endif

HOST_UNAME := $(shell uname)
HOST_ARCH := $(shell uname -m)
BUILD_UNAME := $(shell uname)
BUILD_ARCH := $(shell uname -m)

UNAME ?= $(HOST_UNAME)
ARCH ?= $(HOST_ARCH)
UNAME ?= $(BUILD_UNAME)
ARCH ?= $(BUILD_ARCH)

ifeq ($(UNAME), Linux)
DUMP1090_CPPFLAGS += -D_DEFAULT_SOURCE
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ else
endif

override_dh_auto_build:
dh_auto_build -- RTLSDR=$(RTLSDR) BLADERF=$(BLADERF) HACKRF=$(HACKRF) LIMESDR=$(LIMESDR) DUMP1090_VERSION=$(DEB_VERSION)
dh_auto_build -- ARCH=$(DEB_HOST_ARCH) RTLSDR=$(RTLSDR) BLADERF=$(BLADERF) HACKRF=$(HACKRF) LIMESDR=$(LIMESDR) DUMP1090_VERSION=$(DEB_VERSION)

override_dh_install:
dh_install
Expand Down

2 comments on commit a13cdc9

@by
Copy link

@by by commented on a13cdc9 Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit a13cdc9 breaks build on Raspberry PI4 with 64-bit bullseye:

In file included from cpu_features/src/cpuinfo_arm.c:15:
cpu_features/include/cpuinfo_arm.h:118:2: error: #error "Including cpuinfo_arm.h from a non-arm target."
118 | #error "Including cpuinfo_arm.h from a non-arm target."
| ^~~~~
make[2]: *** [Makefile:206: cpu_features/src/cpuinfo_arm.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/pi/piaware-ubuntu-debian-amd64/dump1090/package-bullseye'
dh_auto_build: error: make -j4 ARCH=arm64 RTLSDR=yes BLADERF=yes HACKRF=yes LIMESDR=yes DUMP1090_VERSION=8.2 returned exit code 2
make[1]: *** [debian/rules:48: override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/pi/piaware-ubuntu-debian-amd64/dump1090/package-bullseye'
make: *** [debian/rules:63: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

@by
Copy link

@by by commented on a13cdc9 Dec 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved with 542bfca

Please sign in to comment.