我正试图根据本手册向我的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在../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止痛药。
如果我在我的系统上执行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过程。有没有办法改变这种行为或者我错过了什么?
附注:我的构建依赖于: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)
发布于 2020-11-10 22:24:56
我不确定由您的配置所引发的确切问题。但有两个可能的解决方案是
-std=c++0x改为-std=c++11。-fno-keep-inline-dllexport。请检查您的配置文件,在哪里修改此文件。
在此之前,您可以检查这些选项是否有效。转到CMakeFiles的父目录,尝试在命令行复制失败的命令,并进行建议的修改:
/usr/bin/c++ -std=c++11 -fno-keep-inline-dllexport -o CMakeFiles/cmTC_3ab02.dir/DummyCXXFile.cxx.o -c /usr/share/cmake-3.16/Modules/DummyCXXFile.cxx/usr/bin/c++ -std=c++0x -o CMakeFiles/cmTC_3ab02.dir/DummyCXXFile.cxx.o -c /usr/share/cmake-3.16/Modules/DummyCXXFile.cxx要使其工作,您可能需要调用first cmake --debug-trycompile (来源)。
关于您的pastebin的说明(值得注意的消息,尽管不一定是问题)和步骤:
ln: failed to create hard link '...' => '...': Invalid cross-device link消息。Qt5LinguistTools存在一个问题。也许在你所做的事情之前,安装qttools5-dev是值得的。Configuring incomplete, errors occurred!。值得检查哪些可能是问题的根源。cmake .”?和上面的点一样。https://stackoverflow.com/questions/19523412/qt-config-c11-but-std-c0x
https://askubuntu.com/questions/1288365
复制相似问题