我正在尝试根据本手册向我的 PPA 提交 deb:
https
://packaging.ubuntu.com/html/packaging-new-software.html
我可以bzr builddeb -- -nc -us -uc
使用bzr builddeb -S
. 但是pbuilder-dist groovy build myproject_0.2.8-1.dsc
in 的执行../build-area
失败。
完整日志可在 pastebin 中找到:https ://pastebin.com/whr6Qsd1
我相信问题出在以下部分:
Determining if the CXX compiler accepts the flag -fno-keep-inline-dllexport failed with the following output:
Change Dir: /build/myapp-0.2.8/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_3ab02/fast && gmake[1]: Entering directory '/build/myapp-0.2.8/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_3ab02.dir/build.make CMakeFiles/cmTC_3ab02.dir/build
gmake[2]: Entering directory '/build/myapp-0.2.8/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_3ab02.dir/DummyCXXFile.cxx.o
/usr/bin/c++ -std=c++0x -fno-keep-inline-dllexport -o CMakeFiles/cmTC_3ab02.dir/DummyCXXFile.cxx.o -c /usr/share/cmake-3.16/Modules/DummyCXXFile.cxx
c++: error: command-line option '-fno-keep-inline-dllexport' is not supported by this configuration
gmake[2]: *** [CMakeFiles/cmTC_3ab02.dir/build.make:66: CMakeFiles/cmTC_3ab02.dir/DummyCXXFile.cxx.o] Error 1
gmake[2]: Leaving directory '/build/myapp-0.2.8/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
gmake[1]: *** [Makefile:121: cmTC_3ab02/fast] Error 2
gmake[1]: Leaving directory '/build/myapp-0.2.8/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
dh_auto_configure: error: cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu .. returned exit code 1
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
所以,cmake
正在检查是否/usr/c++
支持-fno-keep-inline-dllexport
. 编译器以 1 bcs 结尾,它不支持它,cmake 返回 2 和 dh_auto_configure painics。
如果我cmake
在我的系统上执行,我会得到以下标准输出:
-- Checking to see if CXX compiler accepts flag -ffunction-sections -fdata-sections -Wl,--gc-sections
-- Checking to see if CXX compiler accepts flag -ffunction-sections -fdata-sections -Wl,--gc-sections - yes
-- Checking to see if CXX compiler accepts flag -fno-keep-inline-dllexport
-- Checking to see if CXX compiler accepts flag -fno-keep-inline-dllexport - no
-- Checking to see if CXX compiler accepts flag -Werror=return-type
-- Checking to see if CXX compiler accepts flag -Werror=return-type - yes
所以即使是我系统上的编译器也不支持-fno-keep-inline-dllexport
. 我很好。对我来说没关系。cmake
不失败。
看起来,非强制特征检查失败会cmake
破坏整个pbuilder-dist
过程。有没有办法改变这种行为或者我错过了什么?
Ps 我的构建依赖是:debhelper-compat (= 13), cmake (>=2.8.9), gcc (>=4.6), qt5-qmake (>= 5.4), qtbase5-dev (>= 5.4), libtiff5-dev (>= 4.0.3), libjpeg8-dev (>= 8c), libpng-dev (>=1.6.2)