I'm trying to submit a deb to my PPA according to this manual:
https://packaging.ubuntu.com/html/packaging-new-software.html
I'm able to build my app with bzr builddeb -- -nc -us -uc
and to sign it with bzr builddeb -S
. But execution of pbuilder-dist groovy build myproject_0.2.8-1.dsc
in ../build-area
fails.
Full log is available in pastebin: https://pastebin.com/whr6Qsd1
I believe that the problem is in following piece:
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
So, cmake
is checking that /usr/c++
supports -fno-keep-inline-dllexport
. Compiller ends with 1 bcs it doesn't support it, cmake returns 2 and dh_auto_configure painics.
If I execute cmake
on my system I'm getting following stdout:
-- 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
So even compiller on my system doesn't support -fno-keep-inline-dllexport
. And I'm fine with that. It doesn't matter for me. cmake
not fails.
It looks that the failed check of non-mandatory feature by cmake
ruins whole pbuilder-dist
process. Are there any way to change this behaviour or i'm missing something?
P.s. My build-depends are: 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)
I am not certain about the exact issue prompted by you configuration. But two possible solutions are
-std=c++0x
to-std=c++11
.-fno-keep-inline-dllexport
.Please check your configuration files, where to modify this.
Prior to this, you can check if any of these options would work. Go to the parent directory of
CMakeFiles
and try replicating the failed command at the command line, with the suggested modifications:/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
For this to work, you would likely need to call first
cmake --debug-trycompile
(source).Notes about your pastebin (messages worth noting, even though not necessarily problems) and procedure:
ln: failed to create hard link '...' => '...': Invalid cross-device link
messages.Qt5LinguistTools
. Perhaps it is worth installingqttools5-dev
prior to what you did.Configuring incomplete, errors occurred!
. It is worth checking what are possible sources of problems.cmake
on my system..."? Same as point above.Related:
https://stackoverflow.com/questions/19523412/qt-config-c11-but-std-c0x
https://code-examples.net/en/q/129e754