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 #10823] Build issues with cmake and clang++ or ccache #3768

Closed
icinga-migration opened this issue Dec 10, 2015 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@icinga-migration
Copy link

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

Created by mfriedrich on 2015-12-10 21:15:08 +00:00

Assignee: (none)
Status: Closed (closed on 2016-02-24 21:08:33 +00:00)
Target Version: (none)
Last Update: 2016-02-24 21:08:33 +00:00 (in Redmine)

Icinga Version: 2.4.1
Backport?: Not yet backported
Include in Changelog: 1

Even though we might not be able to fix it, just leaving here for reference.

$ cmake --version
cmake version 3.3.2

$ clang++ --version
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix

$ rpm -qa | grep boost
boost-date-time-1.58.0-9.fc23.x86_64
boost-program-options-1.58.0-9.fc23.x86_64
boost-regex-1.58.0-9.fc23.x86_64
boost-math-1.58.0-9.fc23.x86_64
boost-graph-1.58.0-9.fc23.x86_64
boost-iostreams-1.58.0-9.fc23.x86_64
boost-wave-1.58.0-9.fc23.x86_64
boost-1.58.0-9.fc23.x86_64
boost-context-1.58.0-9.fc23.x86_64
boost-devel-1.58.0-9.fc23.x86_64
boost-locale-1.58.0-9.fc23.x86_64
boost-container-1.58.0-9.fc23.x86_64
ibus-typing-booster-1.2.15-1.fc23.noarch
boost-log-1.58.0-9.fc23.x86_64
boost-test-1.58.0-9.fc23.x86_64
boost-filesystem-1.58.0-9.fc23.x86_64
boost-python-1.58.0-9.fc23.x86_64
boost-coroutine-1.58.0-9.fc23.x86_64
boost-signals-1.58.0-9.fc23.x86_64
boost-thread-1.58.0-9.fc23.x86_64
boost-atomic-1.58.0-9.fc23.x86_64
boost-serialization-1.58.0-9.fc23.x86_64
boost-chrono-1.58.0-9.fc23.x86_64
boost-random-1.58.0-9.fc23.x86_64
boost-system-1.58.0-9.fc23.x86_64
boost-timer-1.58.0-9.fc23.x86_64

[ 92%] Linking CXX shared library ../../Bin/Debug/libperfdata.so
make[2]: Leaving directory '/home/michi/coding/icinga/icinga2/debug'
[ 92%] Built target perfdata
make[2]: Entering directory '/home/michi/coding/icinga/icinga2/debug'
make[2]: Leaving directory '/home/michi/coding/icinga/icinga2/debug'
make[2]: Entering directory '/home/michi/coding/icinga/icinga2/debug'
[ 93%] Linking CXX executable ../Bin/Debug/icinga2
CMakeFiles/icinga-app.dir/icinga.cpp.o: In function `boost::program_options::typed_value, std::allocator >, std::allocator, std::allocator > > >, char>::name() const':
/usr/include/boost/program_options/detail/value_semantic.hpp:19: undefined reference to `boost::program_options::arg'
CMakeFiles/icinga-app.dir/icinga.cpp.o: In function `boost::program_options::typed_value, std::allocator >, char>::name() const':
/usr/include/boost/program_options/detail/value_semantic.hpp:19: undefined reference to `boost::program_options::arg'
../Bin/Debug/libcli.so: undefined reference to `boost::program_options::validation_error::get_template(boost::program_options::validation_error::kind_t)'
../Bin/Debug/libcli.so: undefined reference to `boost::program_options::option_description::long_name() const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
icinga-app/CMakeFiles/icinga-app.dir/build.make:113: recipe for target 'Bin/Debug/icinga2' failed
make[2]: *** [Bin/Debug/icinga2] Error 1
make[2]: Leaving directory '/home/michi/coding/icinga/icinga2/debug'
CMakeFiles/Makefile2:2334: recipe for target 'icinga-app/CMakeFiles/icinga-app.dir/all' failed
make[1]: *** [icinga-app/CMakeFiles/icinga-app.dir/all] Error 2
make[1]: Leaving directory '/home/michi/coding/icinga/icinga2/debug'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/home/michi/coding/icinga/icinga2/debug'

Similar issues:
http://lists.llvm.org/pipermail/cfe-users/2015-July/000717.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797917
http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2015-July/030580.html

Workaround: Use g** meanwhile.

export CXX=g++

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 10:46:13 +00:00

  • Subject changed from Build issues with boost 1.58, cmake 3.3 and clang++ 3.7 on Fedora 23 to Build issues with cmake and clang++ or ccache

A similar issue happens currently on the build server building the icinga2-linux job.

[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

@icinga-migration
Copy link
Author

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

Seems 737c574 was the last working git commit, I suspect CMake changes after that causing that problem.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-12-11 11:09:43 +00:00

  • Category set to Installation
  • Priority changed from Normal to High

@icinga-migration
Copy link
Author

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

  • Priority changed from High to Normal

Hm, I'm not entirely convinced if this solves the problem on Fedora 23. I'll open a new issue, and leave this one open.

@icinga-migration
Copy link
Author

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

  • Relates set to 10826

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 21:08:33 +00:00

  • Status changed from New to Closed

@icinga-migration icinga-migration added bug Something isn't working Installation labels Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant