我正在建造GitHub 上的 TSDuck 项目。
为了在二进制文件中生成全面的调试符号,我使用 gcc 的 -g 标志:
export ADDITIONAL_CXX_FLAGS='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -march=x86-64-v3 -flto -g'
make CXXFLAGS_EXTRA="${ADDITIONAL_CXX_FLAGS}" NOTEST=1 NOSTATIC=1 NOGITHUB=1 NODEKTEC=1 NOCURL=1 NOPCSC=1 NOEDITLINE=1 NOSRT=1 NOHIDES=1 NOEDITLINE=1 NORIST=1 NOVATEK=1 installer
结果命令生成类似 tsduck.deb 和 tsduck-dev.deb 的文件(但文件名中还包括版本和架构)。
问题是,与 debuginfo 相比,生成的二进制文件明显更大(~7MiB vs ~80MiB)。有没有办法像某些包管理器提供 -dbgsym.deb 一样剥离二进制文件?顺便说一句,我不太熟悉 Debian 类包的构建
有一个 tsduck.control 文件,我试图在其中添加一个附加包:
Package: tsduck
Source: tsduck
Version: {{VERSION}}
Maintainer: Thierry Lelegard <[email protected]>
Architecture: {{ARCH}}
Section: free/video
Priority: optional
Depends: libc6,
libsrt,
librist,
libedit,
libusb,
libpcsc,
libcurl,
libstdc++6
Conflicts: tsduck-dev (<= 2.28.2441)
Description: MPEG Transport Stream Toolkit
TSDuck, the MPEG Transport Stream Toolkit, provides some simple utilities to
process MPEG Transport Streams (TS), either as recorded files or live streams.
Package: tsduck-dbgsym
Version: {{VERSION}}
Maintainer: Thierry Lelegard <[email protected]>
Architecture: any
Section: debug
Priority: extra
Depends:
tsduck (= {{VERSION}})
Description: Debugging symbols for TSDuck
TSDuck, the MPEG Transport Stream Toolkit, provides some simple utilities to
process MPEG Transport Streams (TS), either as recorded files or live streams.
This package contains the debugging symbols for TSDuck.
附带规则文件:
override_dh_strip:
dh_strip --dbg-package=tsduck-dbgsym
但我很快就开始收到错误:
dpkg-deb: error: parsing file '.../code/tsduck_source/pkg/installers/tmp/DEBIAN/control' near line 17 package 'tsduck-dbgsym':
several package info entries found, only one allowed
环境:
- Ubuntu 23.10
- gcc-13