dpkg-buildpackage不包含二进制文件

问题描述

我正在尝试为rtl_airband软件构建新软件包。我有程序的源代码,然后使用所有需要的文件创建了debian /文件夹。 问题是我运行dpkg-buildpackage -b时的问题,可执行二进制文件包括在包中,仅包含版权和手册页,但是当我运行dpkg-buildpackage ....时程序可以正常编译。它只是不包含在.deb中 我该如何调试? 这是命令的输出

root@rasp3_dev:/home/pi/rtl_airband/source# dpkg-buildpackage -b -us -uc
dpkg-buildpackage: info: source package rtl-airband-rb
dpkg-buildpackage: info: source version 3.1.0
dpkg-buildpackage: info: source distribution stable
dpkg-buildpackage: info: source changed by  Jonis Maurin Ceara <xxx>
dpkg-buildpackage: info: host architecture armhf
 dpkg-source --before-build source
 debian/rules clean
dh clean --with=systemd
   dh_testdir
   dh_auto_clean
        make -j1 clean
make[1]: Entering directory '/home/pi/rtl_airband/source'
make -C hello_fft clean
make[2]: Entering directory '/home/pi/rtl_airband/source/hello_fft'
rm -f *.o *.a
make[2]: Leaving directory '/home/pi/rtl_airband/source/hello_fft'
rm -f *.o rtl_airband
make[1]: Leaving directory '/home/pi/rtl_airband/source'
   dh_clean
 debian/rules build
dh build --with=systemd
   dh_testdir
   dh_update_autotools_config
   dh_auto_configure
   dh_auto_build
        make -j1
make[1]: Entering directory '/home/pi/rtl_airband/source'
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o rtl_airband.o rtl_airband.cpp
rtl_airband.cpp: In instantiation of ‘size_t AFC::check(const FFT_RESULTS*,size_t,float,unsigned char) [with FFT_RESULTS = GPU_FFT_COMPLEX; int STEP = 1; size_t = unsigned int]’:
rtl_airband.cpp:264:32:   required from ‘void AFC::finalize(device_t*,int,const FFT_RESULTS*) [with FFT_RESULTS = GPU_FFT_COMPLEX]’
rtl_airband.cpp:619:34:   required from here
rtl_airband.cpp:224:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (bin < -STEP)
        ~~~~^~~~~~~
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o input-common.o input-common.cpp
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o input-helpers.o input-helpers.cpp
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o input-file.o input-file.cpp
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o output.o output.cpp
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o config.o config.cpp
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o util.o util.cpp
util.cpp: In function ‘double atofs(char*)’:
util.cpp:176:4: warning: attributes at the beginning of statement are ignored [-Wattributes]
    [[fallthrough]];
    ^
util.cpp:180:4: warning: attributes at the beginning of statement are ignored [-Wattributes]
    [[fallthrough]];
    ^
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o mixer.o mixer.cpp
make -C hello_fft
make[2]: Entering directory '/home/pi/rtl_airband/source/hello_fft'
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -I.. -Wdate-time -D_FORTIFY_SOURCE=2  -c -o mailBox.o mailBox.c
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -I.. -Wdate-time -D_FORTIFY_SOURCE=2  -c -o gpu_fft.o gpu_fft.c
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -I.. -Wdate-time -D_FORTIFY_SOURCE=2  -c -o gpu_fft_twiddles.o gpu_fft_twiddles.c
gpu_fft_twiddles.c: In function ‘float* twiddles_step_16(double,float*,double)’:
gpu_fft_twiddles.c:70:39: warning: unused parameter ‘two_pi’ [-Wunused-parameter]
 static float *twiddles_step_16(double two_pi,float *out,double theta) {
                                       ^~~~~~
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -I.. -Wdate-time -D_FORTIFY_SOURCE=2  -c -o gpu_fft_shaders.o gpu_fft_shaders.c
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -I.. -Wdate-time -D_FORTIFY_SOURCE=2  -c -o gpu_fft_base.o gpu_fft_base.c
gpu_fft_base.c: In function ‘unsigned int gpu_fft_base_exec_direct(GPU_FFT_BASE*,int)’:
gpu_fft_base.c:65:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (q=0; q<num_qpus; q++) { // Launch shader(s)
               ~^~~~~~~~~
gpu_fft_base.c:72:50: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (((base->peri[V3D_SRQCS]>>16) & 0xff) == num_qpus) break; // All done?
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
gpu_fft_base.c:54:17: warning: unused variable ‘t’ [-Wunused-variable]
     unsigned q,t;
                 ^
ar r hello_fft.a mailBox.o gpu_fft.o gpu_fft_twiddles.o gpu_fft_shaders.o gpu_fft_base.o
ar: creating hello_fft.a
make[2]: Leaving directory '/home/pi/rtl_airband/source/hello_fft'
as   -o rtl_airband_neon.o rtl_airband_neon.s
g++ -O3 -g -Wall -Wextra -DSYSconfdIR=\"/etc\" -DDEBUG=0 -DRTL_AIRBAND_VERSION=\"v3.1.0-38-ga099681-dirty\" -DUSE_BCM_VC -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math  -DWITH_RTLSDR -Wdate-time -D_FORTIFY_SOURCE=2  -c -o input-rtlsdr.o input-rtlsdr.cpp
g++ -rdynamic -L/opt/vc/lib  rtl_airband.o input-common.o input-helpers.o input-file.o output.o config.o util.o mixer.o hello_fft/hello_fft.a rtl_airband_neon.o input-rtlsdr.o  -lrt -lm -ldl -lvorbisenc -lmp3lame -lshout -lpthread -lconfig++ -lbcm_host -ldl -lrtlsdr -o rtl_airband
make[1]: Leaving directory '/home/pi/rtl_airband/source'
   dh_auto_test
   create-stamp debian/debhelper-build-stamp
 debian/rules binary
dh binary --with=systemd
   create-stamp debian/debhelper-build-stamp
   dh_testroot
   dh_prep
   dh_auto_install
   dh_install
   dh_installdocs
   dh_installchangelogs
   dh_systemd_enable
   debian/rules override_dh_installinit
make[1]: Entering directory '/home/pi/rtl_airband/source'
dh_systemd_enable -prtl-airband-rb --name=rtl-airband-rb rtl-airband-rb.service
dh_installinit -prtl-airband-rb --no-start --noscripts
make[1]: Leaving directory '/home/pi/rtl_airband/source'
   debian/rules override_dh_systemd_start
make[1]: Entering directory '/home/pi/rtl_airband/source'
echo "Not running dh_systemd_start"
Not running dh_systemd_start
make[1]: Leaving directory '/home/pi/rtl_airband/source'
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_strip
   dh_makeshlibs
   dh_shlibdeps
   dh_installdeb
   dh_gencontrol
dpkg-gencontrol: warning: Depends field of package rtl-airband-rb: unkNown substitution variable ${shlibs:Depends}
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'rtl-airband-rb' in '../rtl-airband-rb_3.1.0_armhf.deb'.
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../rtl-airband-rb_3.1.0_armhf.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build source
dpkg-buildpackage: info: binary-only upload (no source included

这是我的debian / rtl-airband-rb.install文件

rtl_airband usr/bin

还有makefile(是的,全部小写):

# Install prefix
PREFIX = /usr

SYSconfdIR = /etc
DEFCONfig = config/rtl_airband.conf
CFG = rtl_airband.conf
BINDIR = $(PREFIX)/bin
export DEBUG ?= 0
export WITH_RTLSDR ?= 1
export CC = g++
export CFLAGS = -O3 -g -Wall -Wextra -DSYSconfdIR=\"$(SYSconfdIR)\" -DDEBUG=$(DEBUG)
RTL_AIRBAND_VERSION:=\"$(shell git describe --always --tags --dirty 2>/dev/null)\"
ifneq ($(RTL_AIRBAND_VERSION),\"\")
  CFLAGS+=-DRTL_AIRBAND_VERSION=$(RTL_AIRBAND_VERSION)
endif
export CXXFLAGS = $(CFLAGS)
export LDFLAGS = -rdynamic
LDLIBS = -lrt -lm -ldl -lvorbisenc -lmp3lame -lshout -lpthread -lconfig++
INSTALL_USER = root
INSTALL_GROUP = root

SUBDirs = hello_fft
CLEANDirs = $(SUBDirs:%=clean-%)

BIN = rtl_airband
OBJ = rtl_airband.o input-common.o input-helpers.o input-file.o output.o config.o util.o mixer.o
FFT = hello_fft/hello_fft.a

.PHONY: all clean install help $(SUBDirs) $(CLEANDirs)

UNKNowN_PLATFORM = 0
ifeq ($(PLATFORM),rpiv1)
  CFLAGS += -DUSE_BCM_VC
  CFLAGS += -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux
  CFLAGS += -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -march=armv6zk -mfpu=vfp -ffast-math 
  LDLIBS += -lbcm_host -ldl
  LDFLAGS += -L/opt/vc/lib
  DEPS = $(OBJ) $(FFT) rtl_airband_vfp.o
else ifeq ($(PLATFORM),rpiv2)
  CFLAGS += -DUSE_BCM_VC
  CFLAGS += -I/Opt/vc/include  -I/Opt/vc/include/interface/vcos/pthreads -I/Opt/vc/include/interface/vmcs_host/linux
  CFLAGS += -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math 
  LDLIBS += -lbcm_host -ldl
  LDFLAGS += -L/opt/vc/lib
  DEPS = $(OBJ) $(FFT) rtl_airband_neon.o
else ifeq ($(PLATFORM),armv7-generic)
  CFLAGS += -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math 
  LDLIBS += -lfftw3f
  DEPS = $(OBJ)
else ifeq ($(PLATFORM),armv8-generic)
  CFLAGS += -march=armv8-a+crc -mtune=cortex-a53 -ffast-math
  LDLIBS += -lfftw3f
  DEPS = $(OBJ)
else ifeq ($(PLATFORM),x86)
  CFLAGS += -march=native
  LDLIBS += -lfftw3f
  DEPS = $(OBJ)
else ifeq ($(PLATFORM),x86-freebsd)
  CFLAGS += -march=native -I/usr/local/include
  LDLIBS += -lfftw3f -lc++
  DEPS = $(OBJ)
  INSTALL_GROUP = wheel
else
  UNKNowN_PLATFORM = 1
endif
ifeq ($(NFM),1)
  CFLAGS += -DNFM
endif

ifeq ($(pulse),1)
  CFLAGS += -Dpulse
  LDLIBS += -lpulse
  DEPS += pulse.o
endif

ifeq ($(WITH_RTLSDR),1)
  CFLAGS += -DWITH_RTLSDR
  DEPS += input-rtlsdr.o
  LDLIBS += -lrtlsdr
endif

ifeq ($(WITH_MIRISDR),1)
  CFLAGS += -DWITH_MIRISDR
  DEPS += input-mirisdr.o
  LDLIBS += -lmirisdr
endif

ifeq ($(WITH_SOAPYSDR),1)
  CFLAGS += -DWITH_SOAPYSDR
  DEPS += input-soapysdr.o
  LDLIBS += -lSoapySDR
endif

ifeq ($(UNKNowN_PLATFORM),1)
  DEPS =
endif

$(BIN): $(DEPS)
ifndef DEPS
    $(MAKE) help
endif

help:
    @printf "\nPlease set PLATFORM variable to one of available platforms:\n \
    \tPLATFORM=rpiv1 make\t\tRaspBerry Pi V1 (VFP FPU,use BCM VideoCore for FFT)\n \
    \tPLATFORM=rpiv2 make\t\tRaspBerry Pi V2 (NEON FPU,use BCM VideoCore for FFT)\n \
    \tPLATFORM=armv7-generic make\tOther ARMv7 platforms,like Cubieboard (NEON FPU,use main cpu for FFT)\n \
    \tPLATFORM=armv8-generic make\t64-bit ARM platforms,like Odroid C2 (use main cpu for FFT)\n \
    \tPLATFORM=x86 make\t\tbuild binary for x86 (Linux)\n \
    \tPLATFORM=x86-freebsd gmake\tbuild binary for x86 (FreeBSD)\n\n \
    SDR Hardware options:\n \
    \tWITH_MIRISDR=1\t\t\tEnable Mirics DVB-T chipset support (via libmirisdr)\n \
    \tWITH_SOAPYSDR=1\t\t\tEnable SoapySDR support\n \
    Additional options:\n \
    \tNFM=1\t\t\t\tInclude support for Narrow FM demodulation\n \
    \t\t\t\t\tWarning: this incurs noticeable performance penalty both for AM and FM\n \
    \t\t\t\t\tDo not enable NFM,if you only use AM (especially on low-power platforms,like RPi)\n \
    \tpulse=1\t\t\t\tInclude support for streaming to pulseAudio server\n\n"

$(FFT): hello_fft ;

config.o: rtl_airband.h input-common.h

input-common.o: input-common.h

input-helpers.o: rtl_airband.h input-common.h

input-mirisdr.o: rtl_airband.h input-common.h input-helpers.h input-mirisdr.h

input-rtlsdr.o: rtl_airband.h input-common.h input-helpers.h input-rtlsdr.h

input-soapysdr.o: rtl_airband.h input-common.h input-helpers.h input-soapysdr.h

input-file.o: rtl_airband.h input-common.h input-helpers.h input-file.h

mixer.o: rtl_airband.h

rtl_airband.o: rtl_airband.h input-common.h

output.o: rtl_airband.h input-common.h

pulse.o: rtl_airband.h

util.o: rtl_airband.h

$(SUBDirs):
    $(MAKE) -C $@

clean: $(CLEANDirs)
    rm -f *.o rtl_airband

install: $(BIN)
    install -d -o $(INSTALL_USER) -g $(INSTALL_GROUP) $(BINDIR)
    install -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 755 $(BIN) $(BINDIR)
    install -d -o $(INSTALL_USER) -g $(INSTALL_GROUP) $(SYSconfdIR)
    test -f $(SYSconfdIR)/$(CFG) || install -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 600 $(DEFCONfig) $(SYSconfdIR)/$(CFG)
    @printf "\n *** Done. If this is a new install,edit $(SYSconfdIR)/$(CFG) to suit your needs.\n\n"

$(CLEANDirs):
    $(MAKE) -C $(@:clean-%=%) clean


还有debian/rules文件

#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
DH_VERBOSE = 10

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


# main packaging script based on dh7 Syntax
%:
    dh $@ --with=systemd

# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
#override_dh_auto_configure:
#   dh_auto_configure -- \
#   -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

override_dh_installinit:
    dh_systemd_enable -prtl-airband-rb --name=rtl-airband-rb rtl-airband-rb.service
    dh_installinit -prtl-airband-rb --no-start --noscripts
#   dh_systemd_start -prtl-airband-rb --no-restart-on-upgrade

override_dh_systemd_start:
    echo "Not running dh_systemd_start"


override_dh_usrlocal:

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)