Raffi Enficiaud wrote:
> On 04.07.19 12:59, Rolf Eike Beer wrote:
> > I have a Gentoo and an openSUSE system, that both have various dpkg* tools
> > installed for $reasons.
> > 
> > I know that I need to disable the CPackDEB tests, they create a dynamic
> > executable and check the deb afterwards. Since this is no Debian like
> > system the libc this links to is not covered by any dep.
> 
> Hi,
> 
> I wrote those tests quite some time ago. They are basically checking if
> CPackDEB is handling the options that were passed to it properly.
> 
> > When running the CPackComponentsDEB-components-depend2 test I get this
> > output: [...]
> > 
> > Is this the same reason and I should just filter this test out (in
> > contrast to the other CPackComponentsDEB tests, which work fine), do we
> > need some sort of automatic detection, or what?
> 
> This failure indicates that:
> 
> - the default CPACK_DEBIAN_PACKAGE_SHLIBDEPS is on: it activates the
> automatic detection of the dependencies with shlibdeps. This is a Debian
> tool.
> - for all components but the application one, the shlibdeps is disabled
> - the application component should inherit from the default one
> - since the application points to the shared library, then it should
> have this dependency while it does not according to shlibdeps.
> 
> Here the test assumes that there is a shared library the application
> component links to.
> 
> I do not know much about Gentoo. Maybe the line
> 
> ------ Tests/CPackComponentsDEB/CMakeLists.txt:13
> 
> # Create the mylib library
> add_library(mylib mylib.cpp)
> 
> -------
> 
> is not creating a shared library by default on this distribution or is
> interacting with other options you may have passed?
> What if you explicitly write those lines like this:
> 
> add_library(mylib SHARED mylib.cpp)

Here is the output on my openSUSE system:

eike@daneel:~/repos/build/CMake$  ctest -V -R CPackComponentsDEB-components-
depend2
UpdateCTestConfiguration  from :/home/eike/repos/build/CMake/
DartConfiguration.tcl
Parse Config file:/home/eike/repos/build/CMake/DartConfiguration.tcl
 Add coverage exclude regular expressions.
 Add coverage exclude: XCode
 Add coverage exclude: /Source/(cm|kw)sys/
 Add coverage exclude: /CMakeFiles/CMakeTmp/
 Add coverage exclude: [A-Za-z]./[Qq]t/qt-.+-opensource-src
SetCTestConfiguration:CMakeCommand:/usr/bin/cmake
UpdateCTestConfiguration  from :/home/eike/repos/build/CMake/
DartConfiguration.tcl
Parse Config file:/home/eike/repos/build/CMake/DartConfiguration.tcl
Test project /home/eike/repos/build/CMake
Constructing a list of tests
Guessing configuration NoConfig
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 152
    Start 152: CPackComponentsDEB-components-depend2

152: Test command: /home/eike/repos/build/CMake/bin/ctest "-C" "NoConfig" "--
build-and-test" "/home/eike/repos/CMake/Tests/CPackComponentsDEB" "/home/eike/
repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2" "--
build-generator" "Unix Makefiles" "--build-project" "CPackComponentsDEB" "--
build-options" "-DCMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake" "-
DCPACK_GENERATOR:STRING=DEB" "-DCPACK_BINARY_DEB:BOOL=ON" "-
DCPackDEBConfiguration=components-depend2" "--graphviz=CPackComponentsDEB.dot" 
"--test-command" "/home/eike/repos/build/CMake/bin/cmake" "-
DCPackComponentsDEB_SOURCE_DIR:PATH=/home/eike/repos/CMake/Tests/
CPackComponentsDEB" "-DCPackComponentsDEB_BINARY_DIR:PATH=/home/eike/repos/
build/CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2" "-
DCPackGen=DEB" "-DCPackDEBConfiguration=components-depend2" "-P" "/home/eike/
repos/CMake/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-
depend2.cmake"
152: Test timeout computed to be: 1500
152: Generate graphviz: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/CPackComponentsDEB.dot
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylib...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp2...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylib.dependers...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp.dependers...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp2.dependers...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot...
152: Internal cmake changing into directory: /home/eike/repos/build/CMake/
Tests/CPackComponentsDEB/buildDEB-components-depend2
152: ======== CMake output     ======
152: The C compiler identification is GNU 7.4.1
152: The CXX compiler identification is GNU 7.4.1
152: Check for working C compiler: /usr/bin/cc
152: Check for working C compiler: /usr/bin/cc -- works
152: Detecting C compiler ABI info
152: Detecting C compiler ABI info - done
152: Detecting C compile features
152: Detecting C compile features - done
152: Check for working CXX compiler: /usr/bin/c++
152: Check for working CXX compiler: /usr/bin/c++ -- works
152: Detecting CXX compiler ABI info
152: Detecting CXX compiler ABI info - done
152: Detecting CXX compile features
152: Detecting CXX compile features - done
152: Configuring done
152: Generating done
152: Build files have been written to: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2
152: ======== End CMake output ======
152: Change Dir: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2
152: 
152: Run Clean Command:/usr/bin/gmake clean
152: 
152: Run Build Command(s):/usr/bin/gmake && Scanning dependencies of target 
mylib
152: [ 16%] Building CXX object CMakeFiles/mylib.dir/mylib.cpp.o
152: [ 33%] Linking CXX static library libmylib.a
152: [ 33%] Built target mylib
152: Scanning dependencies of target mylibapp
152: [ 50%] Building CXX object CMakeFiles/mylibapp.dir/mylibapp.cpp.o
152: [ 66%] Linking CXX executable mylibapp
152: [ 66%] Built target mylibapp
152: Scanning dependencies of target mylibapp2
152: [ 83%] Building CXX object CMakeFiles/mylibapp2.dir/mylibapp.cpp.o
152: [100%] Linking CXX executable mylibapp2
152: [100%] Built target mylibapp2
152: 
152: Running test command: "/home/eike/repos/build/CMake/bin/cmake" "-
DCPackComponentsDEB_SOURCE_DIR:PATH=/home/eike/repos/CMake/Tests/
CPackComponentsDEB" "-DCPackComponentsDEB_BINARY_DIR:PATH=/home/eike/repos/
build/CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2" "-
DCPackGen=DEB" "-DCPackDEBConfiguration=components-depend2" "-P" "/home/eike/
repos/CMake/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-
depend2.cmake"
152: Test command failed: /home/eike/repos/build/CMake/bin/cmake
152: -- 
=============================================================================
152: -- CTEST_FULL_OUTPUT (Avoid ctest truncation of output)
152: -- 
152: CMAKE_CPACK_COMMAND = /home/eike/repos/build/CMake/bin/cpack
152: config_args = 
152: config_verbose = -V
152: -- CPack_output=CPack: Enable Verbose
152: CPack Verbose: Read CPack config file: 
152: CPack Verbose: Read CPack configuration file: /home/eike/repos/build/
CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2/CPackConfig.cmake
152: CPack Verbose: Specified generator: DEB
152: CPack Verbose: Use generator: cmCPackDebGenerator
152: CPack Verbose: For project: MyLib
152: CPack: Create package using DEB
152: CPack Verbose: Read description file: /home/eike/repos/CMake/Templates/
CPack.GenericDescription.txt
152: CPack Verbose: [DEB] requested component grouping = IGNORE_GROUPS
152: CPack: Install projects
152: CPack: - Run preinstall target for: CPackComponentsDEB
152: CPack: - Install project: CPackComponentsDEB
152: CPack: -   Install component: applications
152: CPack Verbose: Install configuration: "NoConfig"
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin/mylibapp
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin/symtest
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin//dirtest
152: CPack: -   Install component: libraries
152: CPack Verbose: Install configuration: "NoConfig"
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/libraries/usr/lib64/libmylib.a
152: CPack: -   Install component: headers
152: CPack Verbose: Install configuration: "NoConfig"
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/headers/usr/include/mylib.h
152: CPack: Create package
152: CPack Verbose: Package files to: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux.deb
152: -- CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no 
dependencies.
152: CPack Verbose: Copying final package(s) [3]:
152: CPack: - package: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/mylib-applications_1.0.2_amd64.deb generated.
152: CPack: - package: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/mylib-headers_1.0.2_amd64.deb generated.
152: CPack: - package: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/mylib-libraries_1.0.2_amd64.deb generated.
152: 
152: -- CPack_error=CPackDeb: - Generating dependency list
152: 
152: -- package='mylib-applications', dependencies=''
152: -- package='mylib-headers', dependencies='mylib-libraries (= 1.0.2), 
depend-headers'
152: -- package='mylib-libraries', dependencies='depend-default'
152: CMake Error at /home/eike/repos/CMake/Tests/CPackComponentsDEB/
RunCPackVerifyResult-components-depend2.cmake:93 (message):
152:   dpkg-deb checks failed:
152: 
152:   ;dpkg-deb:
152:   /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/mylib-applications_1.0.2_amd64.deb:
152:   Incorrect dependencies for package mylib-applications: '' does not 
contain
152:   any 'lib'
152: 
152: 
152: 
152: 
1/1 Test #152: CPackComponentsDEB-components-depend2 ...***Failed    3.85 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   3.94 sec

The following tests FAILED:
        152 - CPackComponentsDEB-components-depend2 (Failed)
Errors while running CTest



And here is the output after adding "SHARED":



eike@daneel:~/repos/build/CMake$  ctest -V -R CPackComponentsDEB-components-
depend2
UpdateCTestConfiguration  from :/home/eike/repos/build/CMake/
DartConfiguration.tcl
Parse Config file:/home/eike/repos/build/CMake/DartConfiguration.tcl
 Add coverage exclude regular expressions.
 Add coverage exclude: XCode
 Add coverage exclude: /Source/(cm|kw)sys/
 Add coverage exclude: /CMakeFiles/CMakeTmp/
 Add coverage exclude: [A-Za-z]./[Qq]t/qt-.+-opensource-src
SetCTestConfiguration:CMakeCommand:/usr/bin/cmake
UpdateCTestConfiguration  from :/home/eike/repos/build/CMake/
DartConfiguration.tcl
Parse Config file:/home/eike/repos/build/CMake/DartConfiguration.tcl
Test project /home/eike/repos/build/CMake
Constructing a list of tests
Guessing configuration NoConfig
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 152
    Start 152: CPackComponentsDEB-components-depend2

152: Test command: /home/eike/repos/build/CMake/bin/ctest "-C" "NoConfig" "--
build-and-test" "/home/eike/repos/CMake/Tests/CPackComponentsDEB" "/home/eike/
repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2" "--
build-generator" "Unix Makefiles" "--build-project" "CPackComponentsDEB" "--
build-options" "-DCMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake" "-
DCPACK_GENERATOR:STRING=DEB" "-DCPACK_BINARY_DEB:BOOL=ON" "-
DCPackDEBConfiguration=components-depend2" "--graphviz=CPackComponentsDEB.dot" 
"--test-command" "/home/eike/repos/build/CMake/bin/cmake" "-
DCPackComponentsDEB_SOURCE_DIR:PATH=/home/eike/repos/CMake/Tests/
CPackComponentsDEB" "-DCPackComponentsDEB_BINARY_DIR:PATH=/home/eike/repos/
build/CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2" "-
DCPackGen=DEB" "-DCPackDEBConfiguration=components-depend2" "-P" "/home/eike/
repos/CMake/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-
depend2.cmake"
152: Test timeout computed to be: 1500
152: Generate graphviz: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/CPackComponentsDEB.dot
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylib...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp2...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylib.dependers...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp.dependers...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot.mylibapp2.dependers...
152: Writing /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/CPackComponentsDEB.dot...
152: Internal cmake changing into directory: /home/eike/repos/build/CMake/
Tests/CPackComponentsDEB/buildDEB-components-depend2
152: ======== CMake output     ======
152: Configuring done
152: Generating done
152: Build files have been written to: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2
152: ======== End CMake output ======
152: Change Dir: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2
152: 
152: Run Clean Command:/usr/bin/gmake clean
152: 
152: Run Build Command(s):/usr/bin/gmake && Scanning dependencies of target 
mylib
152: [ 16%] Building CXX object CMakeFiles/mylib.dir/mylib.cpp.o
152: [ 33%] Linking CXX shared library libmylib.so
152: [ 33%] Built target mylib
152: [ 50%] Building CXX object CMakeFiles/mylibapp.dir/mylibapp.cpp.o
152: [ 66%] Linking CXX executable mylibapp
152: [ 66%] Built target mylibapp
152: [ 83%] Building CXX object CMakeFiles/mylibapp2.dir/mylibapp.cpp.o
152: [100%] Linking CXX executable mylibapp2
152: [100%] Built target mylibapp2
152: 
152: Running test command: "/home/eike/repos/build/CMake/bin/cmake" "-
DCPackComponentsDEB_SOURCE_DIR:PATH=/home/eike/repos/CMake/Tests/
CPackComponentsDEB" "-DCPackComponentsDEB_BINARY_DIR:PATH=/home/eike/repos/
build/CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2" "-
DCPackGen=DEB" "-DCPackDEBConfiguration=components-depend2" "-P" "/home/eike/
repos/CMake/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-
depend2.cmake"
152: Test command failed: /home/eike/repos/build/CMake/bin/cmake
152: -- 
=============================================================================
152: -- CTEST_FULL_OUTPUT (Avoid ctest truncation of output)
152: -- 
152: CMAKE_CPACK_COMMAND = /home/eike/repos/build/CMake/bin/cpack
152: config_args = 
152: config_verbose = -V
152: -- CPack_output=CPack: Enable Verbose
152: CPack Verbose: Read CPack config file: 
152: CPack Verbose: Read CPack configuration file: /home/eike/repos/build/
CMake/Tests/CPackComponentsDEB/buildDEB-components-depend2/CPackConfig.cmake
152: CPack Verbose: Specified generator: DEB
152: CPack Verbose: Use generator: cmCPackDebGenerator
152: CPack Verbose: For project: MyLib
152: CPack: Create package using DEB
152: CPack Verbose: Read description file: /home/eike/repos/CMake/Templates/
CPack.GenericDescription.txt
152: CPack Verbose: [DEB] requested component grouping = IGNORE_GROUPS
152: CPack Verbose: Remove toplevel directory: /home/eike/repos/build/CMake/
Tests/CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB
152: CPack: Install projects
152: CPack: - Run preinstall target for: CPackComponentsDEB
152: CPack: - Install project: CPackComponentsDEB
152: CPack: -   Install component: applications
152: CPack Verbose: Install configuration: "NoConfig"
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin/mylibapp
152: CPack Verbose: Set runtime path of "/home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin/mylibapp" to ""
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin/symtest
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/applications/usr/bin//dirtest
152: CPack: -   Install component: libraries
152: CPack Verbose: Install configuration: "NoConfig"
152: CPack: -   Install component: headers
152: CPack Verbose: Install configuration: "NoConfig"
152: CPack Verbose: Installing: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux/headers/usr/include/mylib.h
152: CPack: Create package
152: CPack Verbose: Package files to: /home/eike/repos/build/CMake/Tests/
CPackComponentsDEB/buildDEB-components-depend2/_CPack_Packages/Linux/DEB/
MyLib-1.0.2-Linux.deb
152: -- CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no 
dependencies.
152: CPack Verbose: Copying final package(s) [3]:
152: CPack: - package: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/mylib-applications_1.0.2_amd64.deb generated.
152: CPack: - package: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/mylib-headers_1.0.2_amd64.deb generated.
152: CPack: - package: /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/
buildDEB-components-depend2/mylib-libraries_1.0.2_amd64.deb generated.
152: 
152: -- CPack_error=CPackDeb: - Generating dependency list
152: 
152: -- package='mylib-applications', dependencies=''
152: -- package='mylib-headers', dependencies='mylib-libraries (= 1.0.2), 
depend-headers'
152: -- package='mylib-libraries', dependencies='depend-default'
152: CMake Error at /home/eike/repos/CMake/Tests/CPackComponentsDEB/
RunCPackVerifyResult-components-depend2.cmake:93 (message):
152:   dpkg-deb checks failed:
152: 
152:   ;dpkg-deb:
152:   /home/eike/repos/build/CMake/Tests/CPackComponentsDEB/buildDEB-
components-depend2/mylib-applications_1.0.2_amd64.deb:
152:   Incorrect dependencies for package mylib-applications: '' does not 
contain
152:   any 'lib'
152: 
152: 
152: 
152: 
1/1 Test #152: CPackComponentsDEB-components-depend2 ...***Failed    2.47 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.54 sec

The following tests FAILED:
        152 - CPackComponentsDEB-components-depend2 (Failed)
Errors while running CTest

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to