Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #10826] Build error with older CMake versions on VERSION_LESS compare #3771

Closed
icinga-migration opened this issue Dec 11, 2015 · 6 comments
Labels
blocker Blocks a release or needs immediate attention bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10826

Created by mfriedrich on 2015-12-11 11:16:58 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-12-11 13:50:03 +00:00)
Target Version: 2.4.2
Last Update: 2015-12-11 13:50:03 +00:00 (in Redmine)

Icinga Version: 2.4.1
Backport?: Already backported
Include in Changelog: 1

Introduced with #10744.

[icinga2-linux] $ /bin/bash -xe /tmp/hudson5779302504543758687.sh
+ '[' false = true ']'
+ export PATH=/usr/lib/ccache:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ PATH=/usr/lib/ccache:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ '[' '!' -d build ']'
+ mkdir build
+ cd build
+ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/icinga2 -DICINGA2_UNITY_BUILD=OFF
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/ccache
-- Check for working C compiler: /usr/bin/ccache -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/ccache
-- Check for working CXX compiler: /usr/bin/ccache -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   thread
--   system
--   program_options
--   regex
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.1e") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Could NOT find yajl (missing:  YAJL_LIBRARY YAJL_INCLUDE_DIR) 
-- Could NOT find Editline (missing:  EDITLINE_LIBRARIES EDITLINE_INCLUDE_DIR) 
-- Could NOT find Termcap (missing:  TERMCAP_INCLUDE_DIR) 
-- Performing Test HAVE_VISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_VISIBILITY_INLINES_HIDDEN - Failed
-- Looking for __COUNTER__
-- Looking for __COUNTER__ - found
-- Looking for vfork
-- Looking for vfork - found
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Looking for pipe2
-- Looking for pipe2 - found
-- Looking for nice
-- Looking for nice - found
-- Looking for dladdr in dl
-- Looking for dladdr in dl - found
-- Looking for backtrace_symbols in execinfo
-- Looking for backtrace_symbols in execinfo - not found
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- Performing Test CXX_FLAG_CXX11
-- Performing Test CXX_FLAG_CXX11 - Success
CMake Error at CMakeLists.txt:215 (if):
  if given arguments:

    "/usr/bin/ccache: invalid option -- 'd'

  Usage:

      ccache [options]
      ccache compiler [compiler options]
      compiler [compiler options]          (via symbolic link)

  Options:

      -c, --cleanup         delete old files and recalculate size counters
                            (normally not needed as this is done automatically)
      -C, --clear           clear the cache completely
      -F, --max-files=N     set maximum number of files in cache to N (use 0 for
                            no limit)
      -M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
                            limit" " available suffixes: G, M and K" " default
                            suffix: G)
      -s, --show-stats      show statistics summary
      -z, --zero-stats      zero statistics counters

      -h, --help            print this help text
      -V, --version         print version and copyright information

  See also ." "VERSION_LESS" "4.7.0" 

  Unknown arguments specified

-- Configuring incomplete, errors occurred!
Build step 'Execute shell' marked build as failure
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing JUnit
[xUnit] [INFO] - [JUnit] - No test report file(s) were found with the pattern 'build/Test.xml' relative to '/var/lib/jenkins/workspace/icinga2-linux' for the testing framework 'JUnit'.  Did you enter a pattern relative to the correct directory?  Did you generate the result report(s) for 'JUnit'?
[xUnit] [ERROR] - No test reports found for the metric 'JUnit' with the resolved pattern 'build/Test.xml'. Configuration error?.
[xUnit] [INFO] - Failing BUILD.
[xUnit] [INFO] - There are errors when processing test results.
[xUnit] [INFO] - Skipping tests recording.
[xUnit] [INFO] - Stop build.
IRC notifier plugin: Sending notification to: #icinga-team
Finished: FAILURE

$ grep -r VERSION_LESS .
test
./CMakeLists.txt:    if (${_ICINGA2_COMPILER_VERSION} VERSION_LESS "4.7.0")
./third-party/cmake/BoostTestTargets.cmake: if("${CMAKE_VERSION}" VERSION_LESS "2.8.0")
./third-party/cmake/FindFLEX.cmake:    IF("${FLEX_VERSION}" VERSION_LESS "${FLEX_FIND_VERSION}")

Changesets

2015-12-11 13:45:04 +00:00 by mfriedrich 138d416

Fix build error with older CMake versions on VERSION_LESS compare

fixes #10826

2015-12-11 13:49:48 +00:00 by mfriedrich 0464071

Fix build error with older CMake versions on VERSION_LESS compare

fixes #10826

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 11:17:35 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.4.2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 11:17:44 +00:00

  • Relates set to 10744

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 11:18:12 +00:00

  • Relates set to 10823

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 12:30:01 +00:00

Ok, when using ccache the version dump does not work as expected. Instead ccache says it does not know anything about "-d" (which obviously comes from "-dumpversion").

    if("${_ICINGA2_COMPILER_VERSION}" VERSION_LESS "4.7.0")
      message(STATUS "Your GCC version \"${_ICINGA2_COMPILER_VERSION}\" is too old for building Icinga 2 in C++11 mode.")
      set(CXX_FLAG_CXX11 OFF)
    endif()

-- Your GCC version "/usr/bin/ccache: invalid option -- 'd'
Usage:
    ccache [options]
    ccache compiler [compiler options]
    compiler [compiler options]          (via symbolic link)

Options:
    -c, --cleanup         delete old files and recalculate size counters
                          (normally not needed as this is done automatically)
    -C, --clear           clear the cache completely
    -F, --max-files=N     set maximum number of files in cache to N (use 0 for
                          no limit)
    -M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
                          limit; available suffixes: G, M and K; default
                          suffix: G)
    -s, --show-stats      show statistics summary
    -z, --zero-stats      zero statistics counters

    -h, --help            print this help text
    -V, --version         print version and copyright information

See also ." is too old for building Icinga 2 in C++11 mode.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 13:50:03 +00:00

  • Backport? changed from Not yet backported to Already backported

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 13:50:03 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 138d416.

@icinga-migration icinga-migration added blocker Blocks a release or needs immediate attention bug Something isn't working Installation labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.2 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Blocks a release or needs immediate attention bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant