Jira (FACT-1968) Unable to compile facter 3.14.2 on latest Archlinux

25 views
Skip to first unread message

Tim Meusel (JIRA)

unread,
Jul 28, 2019, 1:13:04 PM7/28/19
to puppe...@googlegroups.com
Tim Meusel created an issue
 
Facter / Bug FACT-1968
Unable to compile facter 3.14.2 on latest Archlinux
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/07/28 10:12 AM
Priority: Normal Normal
Reporter: Tim Meusel

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?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Mihai Buzgau (JIRA)

unread,
Jul 30, 2019, 9:40:04 AM7/30/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Jul 30, 2019, 9:40:04 AM7/30/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Aug 7, 2019, 5:33:03 AM8/7/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Aug 7, 2019, 5:33:04 AM8/7/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR NW - Triage 2019-08-21

Gabriel Nagy (JIRA)

unread,
Aug 7, 2019, 8:01:02 AM8/7/19
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug FACT-1968
 
Re: Unable to compile facter 3.14.2 on latest Archlinux

Hi Tim Meusel,

You can build this by following the steps from the PKGBUILD (from prepare() and build()): https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/facter

Let me know if this works for you.

Gabriel Nagy (JIRA)

unread,
Aug 7, 2019, 8:04:04 AM8/7/19
to puppe...@googlegroups.com

Tim Meusel (JIRA)

unread,
Aug 8, 2019, 8:46:03 AM8/8/19
to puppe...@googlegroups.com
Tim Meusel commented on Bug FACT-1968
 
Re: Unable to compile facter 3.14.2 on latest Archlinux

Hi Gabriel Nagy. Thanks for the comment. I raised this issue because I want to update the PKGBUILD to the latest version.
I am now doing this:

sed -i 's/-source 1.6 -target 1.6/-source 1.8 -target 1.8/' CMakeLists.txt
sed -i 's/rb_data_object_alloc/rb_data_object_wrap/g' lib/src/ruby/*.cc
mkdir release
cd release
JAVA_HOME=/usr/lib/jvm/default cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_CXX_WERROR=OFF ..
make
make test

...
[  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: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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
[ 10%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/resolvers/augeas_resolver.cc.o
[ 11%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/resolvers/disk_resolver.cc.o
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: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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 {
      |                       ~~~~~~~~~~~~~~^
[ 12%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/resolvers/dmi_resolver.cc.o
...
[ 29%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/facts/scalar_value.cc.o
In file included from /build/facter/src/facter-3.14.2/lib/src/facts/scalar_value.cc:3:
/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/scalar_value.cc:17:54:   required from here
/usr/include/leatherman/vendor/rapidjson/document.h:1443:71: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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/scalar_value.cc:3:
/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/scalar_value.cc:3:
/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 {
      |                       ~~~~~~~~~~~~~~^
[ 29%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/logging/logging.cc.o
[ 30%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/ruby/aggregate_resolution.cc.o
[ 31%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/ruby/chunk.cc.o
[ 31%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/ruby/confine.cc.o
In file included from /build/facter/src/facter-3.14.2/lib/src/facts/cache.cc:4:
/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/cache.cc:99:98:   required from here
/usr/include/leatherman/vendor/rapidjson/document.h:1070:22: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-copy]
 1070 |         GenericValue n(name);
      |                      ^
In file included from /build/facter/src/facter-3.14.2/lib/src/facts/cache.cc:4:
/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/cache.cc:4:
/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/cache.cc:97:38:   required from here
/usr/include/leatherman/vendor/rapidjson/document.h:1443:71: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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/cache.cc:4:
/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/cache.cc:4:
/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/cache.cc:99:98:   required from here
/usr/include/leatherman/vendor/rapidjson/document.h:542:85: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-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/cache.cc:4:
/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/cache.cc:4:
/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 {
      |                       ~~~~~~~~~~~~~~^
[ 32%] Building CXX object lib/CMakeFiles/libfactersrc.dir/src/ruby/fact.cc.o
...
[ 68%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/map_value.cc.o
In file included from /build/facter/src/facter-3.14.2/lib/tests/facts/map_value.cc:5:
/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:818:22:   required from ‘typename rapidjson::internal::DisableIf<typename rapidjson::internal::RemoveSfinaeTag<rapidjson::internal::SfinaeTag& (*)(rapidjson::internal::NotExpr<rapidjson::internal::IsSame<typename rapidjson::internal::RemoveConst<T>::Type, typename Encoding::Ch> >)>::Type, typename rapidjson::internal::RemoveSfinaeTag<rapidjson::internal::SfinaeTag& (*)(rapidjson::GenericValue<Encoding, Allocator>&)>::Type>::Type rapidjson::GenericValue<Encoding, Allocator>::operator[](T*) [with T = const char; Encoding = rapidjson::UTF8<char>; Allocator = rapidjson::CrtAllocator; typename rapidjson::internal::DisableIf<typename rapidjson::internal::RemoveSfinaeTag<rapidjson::internal::SfinaeTag& (*)(rapidjson::internal::NotExpr<rapidjson::internal::IsSame<typename rapidjson::internal::RemoveConst<T>::Type, typename Encoding::Ch> >)>::Type, typename rapidjson::internal::RemoveSfinaeTag<rapidjson::internal::SfinaeTag& (*)(rapidjson::GenericValue<Encoding, Allocator>&)>::Type>::Type = rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>&]’
/build/facter/src/facter-3.14.2/lib/tests/facts/map_value.cc:86:17:   required from here
/usr/include/leatherman/vendor/rapidjson/document.h:542:85: warning: implicitly-declared ‘constexpr rapidjson::GenericStringRef<char>::GenericStringRef(const rapidjson::GenericStringRef<char>&)’ is deprecated [-Wdeprecated-copy]
  542 |     explicit GenericValue(StringRefType s) RAPIDJSON_NOEXCEPT : data_(), flags_() { SetStringRaw(s); }
      |                                                                                     ^~~~~~~~~~~~
In file included from /build/facter/src/facter-3.14.2/lib/tests/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/tests/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 {
      |                       ~~~~~~~~~~~~~~^
[ 69%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/disk_resolver.cc.o
[ 70%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/dmi_resolver.cc.o
[ 70%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/filesystem_resolver.cc.o
[ 71%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/identity_resolver.cc.o
[ 72%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/kernel_resolver.cc.o
[ 72%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/ldom_resolver.cc.o
[ 73%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/memory_resolver.cc.o
[ 73%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/networking_resolver.cc.o
[ 74%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/operating_system_resolver.cc.o
[ 75%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/processor_resolver.cc.o
[ 75%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/ruby_resolver.cc.o
[ 76%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/ssh_resolver.cc.o
[ 77%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/system_profiler_resolver.cc.o
[ 77%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/timezone_resolver.cc.o
[ 78%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/uptime_resolver.cc.o
[ 79%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/virtualization_resolver.cc.o
[ 79%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/xen_resolver.cc.o
[ 80%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/zfs_resolver.cc.o
[ 81%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/zone_resolver.cc.o
[ 81%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/resolvers/zpool_resolver.cc.o
[ 82%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/schema.cc.o
[ 83%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/cache.cc.o
[ 83%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/string_value.cc.o
[ 84%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/logging/logging.cc.o
[ 85%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/log_capture.cc.o
[ 85%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/main.cc.o
[ 86%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/mock_server.cc.o
[ 87%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/util/string.cc.o
[ 87%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/fixtures.cc.o
[ 88%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/collection_fixture.cc.o
[ 89%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/cwrapper.cc.o
[ 89%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/ruby/ruby.cc.o
[ 90%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/ruby/ruby_dirfacts.cc.o
[ 90%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/ruby/ruby_helper.cc.o
[ 91%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/java/facter.cc.o
[ 92%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/linux/dmi_resolver.cc.o
[ 92%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/linux/filesystem_resolver.cc.o
[ 93%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/linux/virtualization_resolver.cc.o
[ 94%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/linux/processor_fixture.cc.o
[ 94%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/linux/processor_resolver.cc.o
[ 95%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/util/bsd/scoped_ifaddrs.cc.o
[ 96%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/posix/collection.cc.o
[ 96%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/posix/uptime_resolver.cc.o
[ 97%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/facts/external/posix/execution_resolver.cc.o
[ 98%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/util/posix/scoped_addrinfo.cc.o
[ 98%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/util/posix/scoped_descriptor.cc.o
[ 99%] Building CXX object lib/tests/CMakeFiles/libfacter_test.dir/util/posix/scoped_bio.cc.o
[100%] Linking CXX executable ../../bin/libfacter_test
[100%] Built target libfacter_test
Running tests...
Test project /build/facter/src/facter-3.14.2/release
    Start 1: libfacter tests
1/3 Test #1: libfacter tests ..................   Passed    1.48 sec
    Start 2: libfacter specs
2/3 Test #2: libfacter specs ..................***Failed    0.15 sec
    Start 3: facter smoke
3/3 Test #3: facter smoke .....................   Passed    0.11 sec
 
67% tests passed, 1 tests failed out of 3
 
Total Test time (real) =   1.74 sec
 
The following tests FAILED:
	  2 - libfacter specs (Failed)
Errors while running CTest
make: *** [Makefile:130: test] Error 8

Do you have an idea why the tests are failing?

Tim Meusel (JIRA)

unread,
Aug 8, 2019, 9:02:03 AM8/8/19
to puppe...@googlegroups.com
Tim Meusel commented on Bug FACT-1968

Tests are failing because the rake version is too new on Arch (version 12). The Gemfile expects Version 10. I'm currently working on a fix.

Gabriel Nagy (JIRA)

unread,
Aug 8, 2019, 9:10:03 AM8/8/19
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug FACT-1968

This is interesting because the libfacter specs job is not being run on travis, probably because the docker container doesn't have ruby.
In this case CMake probably sees that you have Ruby installed and also tries to run the specs.

You need to bundle install inside facter/lib before running make test.

Tim Meusel (JIRA)

unread,
Aug 9, 2019, 10:34:03 AM8/9/19
to puppe...@googlegroups.com
Tim Meusel commented on Bug FACT-1968

I'm now able to build facter properly with the following commands:

sed -i 's/-source 1.6 -target 1.6/-source 1.8 -target 1.8/' CMakeLists.txt
sed -i 's/rb_data_object_alloc/rb_data_object_wrap/g' lib/src/ruby/*.cc
mkdir release
cd release
JAVA_HOME=/usr/lib/jvm/default cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_CXX_WERROR=OFF ..
make
make test
make install DESTDIR="${pkgdir}"

I unpinned the gems to the testsuite works properly with ruby 2.6: https://github.com/puppetlabs/facter/pull/1818
Also facter has an optional dependency to udev, but there is no cmake file to search for a udev lib. I added this in: https://github.com/puppetlabs/facter/pull/1820

Gabriel Nagy (JIRA)

unread,
Aug 13, 2019, 2:48:02 AM8/13/19
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
 
Change By: Gabriel Nagy
Release Notes Summary: 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.

Gabriel Nagy (JIRA)

unread,
Aug 13, 2019, 2:48:04 AM8/13/19
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Affects Version/s: FACT 3.14.2

Alexandru Popa (JIRA)

unread,
Aug 14, 2019, 7:45:02 AM8/14/19
to puppe...@googlegroups.com
Alexandru Popa updated an issue
Change By: Alexandru Popa
Fix Version/s: FACT 3.14.3

Jean Bond (JIRA)

unread,
Aug 20, 2019, 2:19:04 PM8/20/19
to puppe...@googlegroups.com
Jean Bond updated an issue
Change By: Jean Bond
Labels: resolved-issue-added

Jon Fairman (Jira)

unread,
Jun 28, 2021, 1:32:01 PM6/28/21
to puppe...@googlegroups.com
Jon Fairman assigned an issue to Gabriel Nagy
Change By: Jon Fairman
Assignee: Gabriel Nagy
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Jon Fairman (Jira)

unread,
Jun 28, 2021, 1:32:01 PM6/28/21
to puppe...@googlegroups.com
Jon Fairman assigned an issue to Jon Fairman
Change By: Jon Fairman
Assignee: Gabriel Nagy Jon Fairman

Jon Fairman (Jira)

unread,
Jun 28, 2021, 1:32:03 PM6/28/21
to puppe...@googlegroups.com
Jon Fairman assigned an issue to Unassigned
Change By: Jon Fairman
Assignee: Jon Fairman
Reply all
Reply to author
Forward
0 new messages