Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1968

Unable to compile facter 3.14.2 on latest Archlinux

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: FACT 3.14.2
    • Fix Version/s: FACT 3.14.3
    • Component/s: None
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2019-08-21
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Unpin gem dependencies (rake, rspec, mocha) for Ruby spec tests so they work regardless of gem versions.

      This also adds a CMake module to detect the optional UDEV library on Linux, which provides a serial number fact for disks.
      Show
      Unpin gem dependencies (rake, rspec, mocha) for Ruby spec tests so they work regardless of gem versions. This also adds a CMake module to detect the optional UDEV library on Linux, which provides a serial number fact for disks.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Hi,
      I'm trying to compile the latest facter release on Archlinux. Arch doesn't ship java 6 anymore, so I start with:

      sed -i 's/-source 1.6 -target 1.6/-source 1.8 -target 1.8/' CMakeLists.txt
      mkdir release
      cd release
      JAVA_HOME=/usr/lib/jvm/default cmake -DCMAKE_INSTALL_PREFIX=/usr ..
      

      which produces:

      -- The C compiler identification is GNU 9.1.0
      -- The CXX compiler identification is GNU 9.1.0
      -- Check for working C compiler: /usr/bin/cc
      -- Check for working C compiler: /usr/bin/cc -- works
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Check for working CXX compiler: /usr/bin/c++
      -- Check for working CXX compiler: /usr/bin/c++ -- works
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Defaulting to a release build.
      -- Looking for utmpx.h
      -- Looking for utmpx.h - found
      -- Found CURL: /usr/lib/libcurl.so (found version "7.65.3")  
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54")  
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  date_time chrono system 
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  locale system 
      -- Looking for pthread.h
      -- Looking for pthread.h - found
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - found
      -- Found Threads: TRUE  
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  log log_setup thread date_time filesystem system chrono regex atomic 
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  regex 
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  regex filesystem system 
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  regex system filesystem 
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  regex system 
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  regex filesystem system 
      -- Looking for closefrom in c
      -- Looking for closefrom in c - not found
      -- Found Boost: /usr/include (found suitable version "1.69.0", minimum required is "1.54") found components:  locale program_options system filesystem date_time regex thread chrono atomic 
      -- Found Ruby: /usr/bin/ruby (found suitable version "2.6.3", minimum required is "1.9") 
      -- Found YAMLCPP: /usr/lib/libyaml-cpp.so  
      -- Found OPENSSL: /usr/lib/libcrypto.so  
      -- Found BLKID: /usr/lib/libblkid.so.1  
      -- Found CPPHOCON: /usr/lib/libcpp-hocon.a  
      CMake Warning at CMakeLists.txt:104 (find_package):
        By not providing "FindUDEV.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "UDEV", but
        CMake did not find one.
       
        Could not find a package configuration file provided by "UDEV" with any of
        the following names:
       
          UDEVConfig.cmake
          udev-config.cmake
       
        Add the installation prefix of "UDEV" to CMAKE_PREFIX_PATH or set
        "UDEV_DIR" to a directory containing one of the above files.  If "UDEV"
        provides a separate development package or SDK, be sure it has been
        installed.
       
       
      -- whereami was not found. (missing: WHEREAMI_LIBRARY WHEREAMI_INCLUDE_DIR) 
      -- Found JNI: /usr/lib/jvm/default/lib/libjawt.so  
      -- Found Java: /usr/lib/jvm/default/bin/java (found version "12.0.2") 
      -- The following OPTIONAL packages have been found:
       
       * Threads
       * Ruby (required version >= 1.9)
       * OPENSSL, An open-source implementation of the SSL and TLS protocols, <https://www.openssl.org/>
         Enables SSH fingerprinting facts on POSIX systems.
       * BLKID, The library for the Linux blkid utility, <http://en.wikipedia.org/wiki/Util-linux>
         Enables the partitions fact on Linux.
       * JNI, Java Native Interface (JNI) is a programming framework that enables Java code running in a Java Virtual Machine (JVM) to call and be called by native applications.
         Enables JRuby support in Facter.
       * Java, Java compiler for JNI.
         Enables JRuby support in Facter.
       
      -- The following REQUIRED packages have been found:
       
       * CURL, A free and easy-to-use client-side URL transfer library, <http://curl.haxx.se/libcurl/>
         Enables facts that require HTTP.
       * Leatherman
       * Boost (required version >= 1.54)
       * YAMLCPP, A YAML emitter and parser written in C++, <https://code.google.com/p/yaml-cpp/>
         Enables support for outputting facts as YAML.
       * CPPHOCON, A C++ parser for the HOCON configuration language, <https://github.com/puppetlabs/cpp-hocon>
         Allows parsing of the Facter config file.
       
      -- The following OPTIONAL packages have not been found:
       
       * UDEV
       * WHEREAMI, A hypervisor detection library, <https://github.com/puppetlabs/libwhereami>
         Reports hypervisors in use.
       
      -- Found PythonInterp: /usr/bin/python (found version "3.7.3") 
      -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
      -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
      -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
      -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
      -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
      -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
      -- Performing Test COMPILER_HAS_DEPRECATED
      -- Performing Test COMPILER_HAS_DEPRECATED - Failed
      -- Ruby 2.6.3 found.
      -- "make install" will install facter.rb to /usr/lib/ruby/vendor_ruby
      -- "make install" will install facter.jar to /usr/lib/ruby/vendor_ruby to support JRuby
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /build/facter/src/facter-3.14.2/release
      

      This seems to work fine. now make fails:

      canning dependencies of target translations
      Scanning dependencies of target facter-jruby-jar
      Scanning dependencies of target FACTER.pot
      [  1%] Built target translations
      [  1%] Building Java objects for facter-jruby-jar.jar
      [  1%] Built target FACTER.pot
      warning: [options] bootstrap class path not set in conjunction with -source 8
      1 warning
      [  1%] Generating CMakeFiles/facter-jruby-jar.dir/java_class_filelist
      [  2%] Creating Java archive facter.jar
      [  2%] Built target facter-jruby-jar
      Scanning dependencies of target facter-jruby
      [  2%] Generating ../../lib/src/java/com_puppetlabs_Facter.h
      [  3%] Generating ../../lib/src/java/com_puppetlabs_Facter.h
      [  3%] Built target facter-jruby
      Scanning dependencies of target libfactersrc
      [  4%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/cwrapper.cc.o
      [  4%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/collection.cc.o
      [  5%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/external/execution_resolver.cc.o
      [  6%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/array_value.cc.o
      [  7%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/external/json_resolver.cc.o
      [  7%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/external/resolver.cc.o
      [  8%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/external/text_resolver.cc.o
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h: In instantiation of ‘rapidjson::GenericValue<Encoding, Allocator>& rapidjson::GenericValue<Encoding, Allocator>::AddMember(rapidjson::GenericValue<Encoding, Allocator>::StringRefType, rapidjson::GenericValue<Encoding, Allocator>&, Allocator&) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’:
      /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:586:98:   required from here
      /usr/include/leatherman/vendor/rapidjson/document.h:1070:22: error: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Werror=deprecated-copy]
       1070 |         GenericValue n(name);
            |                      ^
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h:326:22: note: because ‘rapidjson::GenericStringRef<char>’ has user-provided ‘rapidjson::GenericStringRef<CharType> rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&) [with CharType = char]’
        326 |     GenericStringRef operator=(const GenericStringRef&);
            |                      ^~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h:542:41: note:   initializing argument 1 of ‘rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
        542 |     explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
            |                           ~~~~~~~~~~~~~~^
      /usr/include/leatherman/vendor/rapidjson/document.h: In instantiation of ‘rapidjson::GenericValue<Encoding, Allocator>& rapidjson::GenericValue<Encoding, Allocator>::SetString(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’:
      /usr/include/leatherman/vendor/rapidjson/document.h:1436:98:   required from ‘rapidjson::GenericValue<Encoding, Allocator>& rapidjson::GenericValue<Encoding, Allocator>::SetString(const Ch*, rapidjson::SizeType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::Ch = char; rapidjson::SizeType = unsigned int]’
      /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:584:38:   required from here
      /usr/include/leatherman/vendor/rapidjson/document.h:1443:71: error: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Werror=deprecated-copy]
       1443 |     GenericValue& SetString(StringRefType s) { this->~GenericValue(); SetStringRaw(s); return *this; }
            |                                                                       ^~~~~~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h:326:22: note: because ‘rapidjson::GenericStringRef<char>’ has user-provided ‘rapidjson::GenericStringRef<CharType> rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&) [with CharType = char]’
        326 |     GenericStringRef operator=(const GenericStringRef&);
            |                      ^~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h:1655:37: note:   initializing argument 1 of ‘void rapidjson::GenericValue<Encoding, Allocator>::SetStringRaw(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
       1655 |     void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT {
            |                       ~~~~~~~~~~~~~~^
      /usr/include/leatherman/vendor/rapidjson/document.h: In instantiation of ‘rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’:
      /usr/include/leatherman/vendor/rapidjson/document.h:1070:22:   required from ‘rapidjson::GenericValue<Encoding, Allocator>& rapidjson::GenericValue<Encoding, Allocator>::AddMember(rapidjson::GenericValue<Encoding, Allocator>::StringRefType, rapidjson::GenericValue<Encoding, Allocator>&, Allocator&) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
      /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:586:98:   required from here
      /usr/include/leatherman/vendor/rapidjson/document.h:542:85: error: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Werror=deprecated-copy]
        542 |     explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
            |                                                                                     ^~~~~~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h:326:22: note: because ‘rapidjson::GenericStringRef<char>’ has user-provided ‘rapidjson::GenericStringRef<CharType> rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&) [with CharType = char]’
        326 |     GenericStringRef operator=(const GenericStringRef&);
            |                      ^~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/collection.cc:24:
      /usr/include/leatherman/vendor/rapidjson/document.h:1655:37: note:   initializing argument 1 of ‘void rapidjson::GenericValue<Encoding, Allocator>::SetStringRaw(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
       1655 |     void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT {
            |                       ~~~~~~~~~~~~~~^
      [  9%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/external/yaml_resolver.cc.o
      [  9%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/map_value.cc.o
      [ 10%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/resolver.cc.o
      cc1plus: all warnings being treated as errors
      make[2]: *** [lib/CMakeFiles/libfactersrc.dir/build.make:93: lib/CMakeFiles/libfactersrc.dir/src/facts/collection.cc.o] Error 1
      make[2]: *** Waiting for unfinished jobs....
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:5:
      /usr/include/leatherman/vendor/rapidjson/document.h: In instantiation of ‘rapidjson::GenericValue<Encoding, Allocator>& rapidjson::GenericValue<Encoding, Allocator>::AddMember(rapidjson::GenericValue<Encoding, Allocator>::StringRefType, rapidjson::GenericValue<Encoding, Allocator>&&, Allocator&) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’:
      /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:74:115:   required from here
      /usr/include/leatherman/vendor/rapidjson/document.h:1053:22: error: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Werror=deprecated-copy]
       1053 |         GenericValue n(name);
            |                      ^
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:5:
      /usr/include/leatherman/vendor/rapidjson/document.h:326:22: note: because ‘rapidjson::GenericStringRef<char>’ has user-provided ‘rapidjson::GenericStringRef<CharType> rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&) [with CharType = char]’
        326 |     GenericStringRef operator=(const GenericStringRef&);
            |                      ^~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:5:
      /usr/include/leatherman/vendor/rapidjson/document.h:542:41: note:   initializing argument 1 of ‘rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
        542 |     explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
            |                           ~~~~~~~~~~~~~~^
      /usr/include/leatherman/vendor/rapidjson/document.h: In instantiation of ‘rapidjson::GenericValue<Encoding, Allocator>::GenericValue(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’:
      /usr/include/leatherman/vendor/rapidjson/document.h:1053:22:   required from ‘rapidjson::GenericValue<Encoding, Allocator>& rapidjson::GenericValue<Encoding, Allocator>::AddMember(rapidjson::GenericValue<Encoding, Allocator>::StringRefType, rapidjson::GenericValue<Encoding, Allocator>&&, Allocator&) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
      /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:74:115:   required from here
      /usr/include/leatherman/vendor/rapidjson/document.h:542:85: error: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Werror=deprecated-copy]
        542 |     explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
            |                                                                                     ^~~~~~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:5:
      /usr/include/leatherman/vendor/rapidjson/document.h:326:22: note: because ‘rapidjson::GenericStringRef<char>’ has user-provided ‘rapidjson::GenericStringRef<CharType> rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&) [with CharType = char]’
        326 |     GenericStringRef operator=(const GenericStringRef&);
            |                      ^~~~~~~~
      In file included from /build/facter/src/facter-3.14.2/lib/src/facts/map_value.cc:5:
      /usr/include/leatherman/vendor/rapidjson/document.h:1655:37: note:   initializing argument 1 of ‘void rapidjson::GenericValue<Encoding, Allocator>::SetStringRaw(rapidjson::GenericValue<Encoding, Allocator>::StringRefType) [with Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; rapidjson::GenericValue<Encoding, Allocator>::StringRefType = rapidjson::GenericStringRef<char>; typename Encoding::Ch = char]’
       1655 |     void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT {
            |                       ~~~~~~~~~~~~~~^
      cc1plus: all warnings being treated as errors
      make[2]: *** [lib/CMakeFiles/libfactersrc.dir/build.make:171: lib/CMakeFiles/libfactersrc.dir/src/facts/map_value.cc.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:217: lib/CMakeFiles/libfactersrc.dir/all] Error 2
      make: *** [Makefile:141: all] Error 2
      

      Can you please let me know if I need to prepare something in order to compile it properly?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gabriel.nagy Gabriel Nagy
              Reporter:
              bastelfreak Tim Meusel
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support