#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #deb #cmake #bazaar #pbuilder #pbuilder-dist pbuilder-dist fails if cmake can't find non-mandatary c++ feature support?

Bounty: 250

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)


Get this bounty!!!

#StackBounty: #java #android #cmake INSTALL_FAILED_MISSING_SHARED_LIBRARY Causes app to not install

Bounty: 50

Hey guys I WAS getting the error

More than one file was found with OS independent path 'lib/x86_64/libopencv_java3.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

the link takes me to a page with a release notes for android 4.2, so there is nothing pretaining to my problem,

I am using a Documentscanner library buitl with opencv and that uses jnilibs and the problem I have is with that jnilibs

so

I looked through the Android Dev Guide and came across this

Automatic packaging of prebuilt dependencies used by CMake
Prior versions of the Android Gradle Plugin required that you explicitly package any prebuilt libraries used by your CMake external native build by using jniLibs. You may have libraries in the src/main/jniLibs directory of your module, or possibly in some other directory configured in your build.gradle file:

    sourceSets {
        main {
            // The libs directory contains prebuilt libraries that are used by the
            // app's library defined in CMakeLists.txt via an IMPORTED target.
            jniLibs.srcDirs = ['libs']
        }
    }

With Android Gradle Plugin 4.0, the above configuration is no longer necessary and will result in a build failure:

* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> More than one file was found with OS independent path 'lib/x86/libprebuilt.so'

External native build now automatically packages those libraries, so explicitly packaging the library with jniLibs results in a duplicate. To avoid the build error, move the prebuilt library to a location outside jniLibs or remove the jniLibs configuration from your build.gradle file.

So now after following the above IE Moving the library/ removing from my gradle.build etc.
The app builds and starts to install but then I get the error

Installation did not succeed.
The application could not be installed: INSTALL_FAILED_MISSING_SHARED_LIBRARY

Help would be appreciated


Get this bounty!!!

#StackBounty: #c++ #cmake #clang #llvm #clion Unknown CMake command "add_clang_executable"

Bounty: 50

I am trying to build a clang tool, and I am trying to debug it using CLion. However, I can’t get it to compile as a standalone binary. Currently I have this in my CMakeLists.txt:

add_clang_executable(clang_my_tool my_tool_util.h my_tool_util.cpp ClangMyTool.cpp)

target_link_libraries(clang_my_tool PRIVATE clangTooling)

However, it’s giving me the error message:

Unknown CMake command "add_clang_executable".

I know I need to add an directory, but I don’t know which one to add.

My llvm directory looks something like this:

llvm
|-build
  |- ...
|
|-clang
  |-tools
    |-clang_my_tool
      |-ClangMyTool.cpp
      |-my_tool_util.h
      |-my_tool_util.c
      |-CMakeLists.txt
|- ... other directories...

What do I add to my CMakeLists.txt?


Get this bounty!!!

#StackBounty: #cmake Cannot generate a safe runtime search path for target caffe because files in some directories may conflict with li…

Bounty: 50

I am trying to install this code https://github.com/NVlabs/ssn_superpixels but get an error at the cmake .. step

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_LIBRARY (ADVANCED)
    linked by target "caffe" in directory /home/haziq/ASTAR/scripts/ssn_superpixels/lib/video_prop_networks/lib/caffe/src/caffe

So I deleted the build folder, recreated it and cd into it and ran cmake .. -DCUDA_cublas_LIBRARY=/usr/lib/x86_64-linux-gnu/libcublas.so.9.1 but now get the following messages.

CMake Warning at src/caffe/CMakeLists.txt:20 (add_library):
  Cannot generate a safe runtime search path for target caffe because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at src/caffe/test/CMakeLists.txt:29 (add_executable):
  Cannot generate a safe runtime search path for target test.testbin because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target extract_features
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target device_query because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target convert_imageset
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target test_net because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target net_speed_benchmark
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target compute_image_mean
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target train_net because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target finetune_net because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target
  upgrade_net_proto_binary because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target
  upgrade_net_proto_text because files in some directories may conflict with
  libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target
  upgrade_solver_proto_text because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target caffe.bin because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at python/CMakeLists.txt:9 (add_library):
  Cannot generate a safe runtime search path for target pycaffe because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.

I found a post here CMake cannot resolve runtime directory path that provides a solution for find_library and find_package but mine is add_library. Anyway I tried fixing the first CMake warning

CMake Warning at src/caffe/CMakeLists.txt:20 (add_library):
  Cannot generate a safe runtime search path for target caffe because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.

by editing line 20 of src/caffe/CMakeLists.txt by replacing add_library(caffe ${srcs}) with add_library(caffe ${srcs} NO_DEFAULT_PATH) but now get this message.

CMake Error at src/caffe/CMakeLists.txt:20 (add_library):
  Cannot find source file:

    NO_DEFAULT_PATH

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

What can I try next?


Get this bounty!!!