You are not logged in.

#1 2022-07-26 02:30:50

13905069
Member
From: China
Registered: 2022-04-21
Posts: 17

[SOLVED]Cannot compile e4rat(get())

I have successfully installed the patched audit, but when I compiled e4rat, I encountered the following errors:

[mycomputer@13905069 trunk]$ yay -S e4rat
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  e4rat-0.2.3-4

  1 e4rat                            (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: PKGBUILD up to date, Skipping (1/0): e4rat
  1 e4rat                            (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: e4rat
==> Making package: e4rat 0.2.3-4 (Mon 25 Jul 2022 01:12:47 PM CST)
==> Retrieving sources...
  -> Found e4rat_0.2.3_src.tar.gz
  -> Found logging.patch
  -> Found sysmacros_h.patch
  -> Found boost-fs3-v2.patch
  -> Found cmake_boost.patch
  -> Found cmake.patch
==> Validating source files with sha256sums...
    e4rat_0.2.3_src.tar.gz ... Passed
    logging.patch ... Passed
    sysmacros_h.patch ... Passed
    boost-fs3-v2.patch ... Passed
    cmake_boost.patch ... Passed
    cmake.patch ... Passed
==> Making package: e4rat 0.2.3-4 (Mon 25 Jul 2022 01:12:49 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found e4rat_0.2.3_src.tar.gz
  -> Found logging.patch
  -> Found sysmacros_h.patch
  -> Found boost-fs3-v2.patch
  -> Found cmake_boost.patch
  -> Found cmake.patch
==> Validating source files with sha256sums...
    e4rat_0.2.3_src.tar.gz ... Passed
    logging.patch ... Passed
    sysmacros_h.patch ... Passed
    boost-fs3-v2.patch ... Passed
    cmake_boost.patch ... Passed
    cmake.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting e4rat_0.2.3_src.tar.gz with bsdtar
==> Starting prepare()...
patching file CMakeLists.txt
patching file src/CMakeLists.txt
patching file src/common.cc
patching file src/config.cc
patching file src/device.cc
patching file src/e4rat-collect.cc
patching file src/logging.hh
patching file src/device.cc
patching file src/e4rat-collect.cc
patching file src/listener.cc
patching file src/cmake/Findaudit.cmake
patching file src/cmake/Findauparse.cmake
patching file CMakeLists.txt
Hunk #1 succeeded at 15 (offset -5 lines).
patching file CMakeLists.txt
patching file src/CMakeLists.txt
Hunk #1 succeeded at 1 with fuzz 2.
patching file doc/CMakeLists.txt
Hunk #1 succeeded at 1 with fuzz 2.
patching file src/config.cc
patching file src/defrag.cc
Hunk #1 succeeded at 56 with fuzz 2.
==> Sources are ready.
==> Making package: e4rat 0.2.3-4 (Mon 25 Jul 2022 01:12:53 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/lib64/cmake/Boost-1.79.0/BoostConfig.cmake (found suitable version "1.79.0", minimum required is "1.41") found components: system filesystem regex 
-- Found ext2fs: /usr/lib/libext2fs.so
-- Found audit: /usr/lib/libaudit.so
-- Found auparse: /usr/lib/libauparse.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Warning (dev) at doc/CMakeLists.txt:11 (ADD_CUSTOM_COMMAND):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at doc/CMakeLists.txt:11 (ADD_CUSTOM_COMMAND):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at doc/CMakeLists.txt:11 (ADD_CUSTOM_COMMAND):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at doc/CMakeLists.txt:23 (ADD_CUSTOM_COMMAND):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at doc/CMakeLists.txt:34 (ADD_CUSTOM_COMMAND):
  Policy CMP0050 is not set: Disallow add_custom_command SOURCE signatures.
  Run "cmake --help-policy CMP0050" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The SOURCE signatures of add_custom_command are no longer supported.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3
[  4%] Generating e4rat-collect.8
[  9%] Building CXX object src/CMakeFiles/e4rat-core.dir/config.cc.o
[ 19%] Generating e4rat.conf.5
[ 19%] Generating e4rat-preload.8
[ 23%] Generating e4rat-realloc.8
[ 28%] Building CXX object src/CMakeFiles/e4rat-core.dir/logging.cc.o
[ 38%] Building CXX object src/CMakeFiles/e4rat-core.dir/device.cc.o
[ 38%] Building CXX object src/CMakeFiles/e4rat-core.dir/fiemap.cc.o
[ 42%] Building CXX object src/CMakeFiles/e4rat-core.dir/common.cc.o
[ 42%] Built target ManPages
In file included from /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:20:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.hh:73:30: error: invalid use of incomplete type ‘class boost::shared_ptr<DevicePrivate>’
   73 | class Device: private boost::shared_ptr<DevicePrivate>
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/throw_exception.hpp:21,
                 from /usr/include/boost/regex/v5/regex_workaround.hpp:29,
                 from /usr/include/boost/regex/v5/regex.hpp:29,
                 from /usr/include/boost/regex.hpp:34,
                 from /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/common.hh:25,
                 from /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.hh:23:
/usr/include/boost/exception/exception.hpp:17:44: note: declaration of ‘class boost::shared_ptr<DevicePrivate>’
   17 | namespace boost { template <class T> class shared_ptr; }
      |                                            ^~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In constructor ‘Device::Device(boost::filesystem::path)’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:97:14: error: type ‘boost::shared_ptr<DevicePrivate>’ is not a direct base of ‘Device’
   97 |     : boost::shared_ptr<DevicePrivate>(new DevicePrivate)
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:107:9: error: ‘get’ was not declared in this scope
  107 |         get()->devno = st.st_rdev;
      |         ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:107:9: note: suggested alternatives:
In file included from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:50,
                 from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:44,
                 from /usr/include/boost/lexical_cast.hpp:32,
                 from /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:33:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:109:9: error: ‘get’ was not declared in this scope
  109 |         get()->devno = st.st_dev;
      |         ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:109:9: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In constructor ‘Device::Device(dev_t)’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:113:14: error: type ‘boost::shared_ptr<DevicePrivate>’ is not a direct base of ‘Device’
  113 |     : boost::shared_ptr<DevicePrivate>(new DevicePrivate)
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:115:5: error: ‘get’ was not declared in this scope
  115 |     get()->devno = dev;
      |     ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:115:5: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘void Device::parseMtabFile(const char*)’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:134:25: error: ‘get’ was not declared in this scope
  134 |         if(st.st_dev == get()->devno)
      |                         ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:134:25: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘void Device::parseMtab()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:150:13: error: ‘get’ was not declared in this scope
  150 |         if( get()->fs_name == "ext2")
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:150:13: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘boost::filesystem::path Device::getMountPoint()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:162:8: error: ‘get’ was not declared in this scope
  162 |     if(get()->mount_point.empty())
      |        ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:162:8: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:165:12: error: ‘get’ was not declared in this scope
  165 |     return get()->mount_point;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:165:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘bool Device::open()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:176:45: error: ‘get’ was not declared in this scope
  176 |                     0, 0, unix_io_manager, &get()->fs))
      |                                             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:176:45: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘std::string Device::getFileSystem()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:183:8: error: ‘get’ was not declared in this scope
  183 |     if(get()->fs_name.empty())
      |        ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:183:8: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:185:12: error: ‘get’ was not declared in this scope
  185 |     return get()->fs_name;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:185:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘int Device::getDevNameFromDevfs()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:205:26: error: ‘get’ was not declared in this scope
  205 |         if(st.st_rdev == get()->devno)
      |                          ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:205:26: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
In file included from /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:35:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘int Device::getDevNameFromMajorMinor()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:221:23: error: ‘get’ was not declared in this scope
  221 |     int major = major(get()->devno);
      |                       ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:221:23: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘std::string Device::getDeviceName()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:284:12: error: ‘get’ was not declared in this scope
  284 |     return get()->deviceName;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:284:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘std::string Device::getDevicePath()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:293:8: error: ‘get’ was not declared in this scope
  293 |     if(get()->devicePath.empty())
      |        ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:293:8: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:295:12: error: ‘get’ was not declared in this scope
  295 |     return get()->devicePath;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:295:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
In file included from /usr/include/ext2fs/ext2fs.h:84,
                 from /home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.hh:25:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘bool Device::hasExtentFeature()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:339:38: error: ‘get’ was not declared in this scope
  339 |     return EXT2_HAS_INCOMPAT_FEATURE(get()->fs->super, EXT3_FEATURE_INCOMPAT_EXTENTS);
      |                                      ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:339:38: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘__u32 Device::getBlockSize()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:434:12: error: ‘get’ was not declared in this scope
  434 |     return get()->fs->blocksize;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:434:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘__u32 Device::getGroupCount()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:439:12: error: ‘get’ was not declared in this scope
  439 |     return get()->fs->group_desc_count;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:439:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘__u64 Device::freeBlocksPerFlex()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:444:33: error: ‘get’ was not declared in this scope
  444 |     return FREE_BLOCKS_PER_FLEX(get()->fs);
      |                                 ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:37:36: note: in definition of macro ‘BLOCKS_PER_GROUP’
   37 | #define BLOCKS_PER_GROUP(fs)      (fs->super->s_blocks_per_group)
      |                                    ^~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:44:36: note: in expansion of macro ‘FREE_BLOCKS_PER_GROUP’
   44 | #define FREE_BLOCKS_PER_FLEX(fs)  (FREE_BLOCKS_PER_GROUP(fs) << fs->super->s_log_groups_per_flex)
      |                                    ^~~~~~~~~~~~~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:444:12: note: in expansion of macro ‘FREE_BLOCKS_PER_FLEX’
  444 |     return FREE_BLOCKS_PER_FLEX(get()->fs);
      |            ^~~~~~~~~~~~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:444:33: note: suggested alternatives:
  444 |     return FREE_BLOCKS_PER_FLEX(get()->fs);
      |                                 ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:37:36: note: in definition of macro ‘BLOCKS_PER_GROUP’
   37 | #define BLOCKS_PER_GROUP(fs)      (fs->super->s_blocks_per_group)
      |                                    ^~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:44:36: note: in expansion of macro ‘FREE_BLOCKS_PER_GROUP’
   44 | #define FREE_BLOCKS_PER_FLEX(fs)  (FREE_BLOCKS_PER_GROUP(fs) << fs->super->s_log_groups_per_flex)
      |                                    ^~~~~~~~~~~~~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:444:12: note: in expansion of macro ‘FREE_BLOCKS_PER_FLEX’
  444 |     return FREE_BLOCKS_PER_FLEX(get()->fs);
      |            ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘__u64 Device::freeBlocksPerGroup()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:449:34: error: ‘get’ was not declared in this scope
  449 |     return FREE_BLOCKS_PER_GROUP(get()->fs);
      |                                  ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:37:36: note: in definition of macro ‘BLOCKS_PER_GROUP’
   37 | #define BLOCKS_PER_GROUP(fs)      (fs->super->s_blocks_per_group)
      |                                    ^~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:449:12: note: in expansion of macro ‘FREE_BLOCKS_PER_GROUP’
  449 |     return FREE_BLOCKS_PER_GROUP(get()->fs);
      |            ^~~~~~~~~~~~~~~~~~~~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:449:34: note: suggested alternatives:
  449 |     return FREE_BLOCKS_PER_GROUP(get()->fs);
      |                                  ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:37:36: note: in definition of macro ‘BLOCKS_PER_GROUP’
   37 | #define BLOCKS_PER_GROUP(fs)      (fs->super->s_blocks_per_group)
      |                                    ^~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:449:12: note: in expansion of macro ‘FREE_BLOCKS_PER_GROUP’
  449 |     return FREE_BLOCKS_PER_GROUP(get()->fs);
      |            ^~~~~~~~~~~~~~~~~~~~~
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘__u32 Device::getBlocksPerGroup()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:454:29: error: ‘get’ was not declared in this scope
  454 |     return BLOCKS_PER_GROUP(get()->fs);
      |                             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:37:36: note: in definition of macro ‘BLOCKS_PER_GROUP’
   37 | #define BLOCKS_PER_GROUP(fs)      (fs->super->s_blocks_per_group)
      |                                    ^~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:454:29: note: suggested alternatives:
  454 |     return BLOCKS_PER_GROUP(get()->fs);
      |                             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:37:36: note: in definition of macro ‘BLOCKS_PER_GROUP’
   37 | #define BLOCKS_PER_GROUP(fs)      (fs->super->s_blocks_per_group)
      |                                    ^~
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘__u32 Device::getLogGroupsPerFlex()’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:459:12: error: ‘get’ was not declared in this scope
  459 |     return get()->fs->super->s_log_groups_per_flex;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:459:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc: In member function ‘bool Device::operator<(const Device&) const’:
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:464:12: error: ‘get’ was not declared in this scope
  464 |     return get()->devno < other.get()->devno;
      |            ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:464:12: note: suggested alternatives:
/usr/include/boost/array.hpp:445:13: note:   ‘std::get’
  445 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/usr/include/boost/array.hpp:428:13: note:   ‘boost::get’
  428 |    const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
      |             ^~~
/home/mycomputer/.cache/yay/e4rat/src/e4rat-0.2.3/src/device.cc:464:33: error: ‘const class Device’ has no member named ‘get’
  464 |     return get()->devno < other.get()->devno;
      |                                 ^~~
make[2]: *** [src/CMakeFiles/e4rat-core.dir/build.make:132: src/CMakeFiles/e4rat-core.dir/device.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:227: src/CMakeFiles/e4rat-core.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: e4rat

Last edited by 13905069 (2022-07-26 15:47:05)

Offline

#2 2022-07-26 10:30:22

philo
Member
Registered: 2015-01-26
Posts: 251

Re: [SOLVED]Cannot compile e4rat(get())

This is an AUR package.

Somewhat OOT, but  you do not need yay.

Last edited by philo (2022-07-26 10:40:04)

Offline

#3 2022-07-26 12:10:05

13905069
Member
From: China
Registered: 2022-04-21
Posts: 17

Re: [SOLVED]Cannot compile e4rat(get())

philo wrote:

This is an AUR package.

Somewhat OOT, but  you do not need yay.

So I need to move this topic to AUR Issues, Discussion & PKGBUILD Requests?

Offline

#4 2022-07-26 12:12:51

philo
Member
Registered: 2015-01-26
Posts: 251

Re: [SOLVED]Cannot compile e4rat(get())

Yes please.

You may also post about your issue on the web page of the package.

Last edited by philo (2022-07-26 12:13:50)

Offline

#5 2022-07-26 12:18:32

13905069
Member
From: China
Registered: 2022-04-21
Posts: 17

Re: [SOLVED]Cannot compile e4rat(get())

philo wrote:

Yes please.

You may also post about your issue on the web page of the package.

But I don't know how to,just delete this topic?

Last edited by 13905069 (2022-07-26 12:19:09)

Offline

#6 2022-07-26 12:20:26

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED]Cannot compile e4rat(get())

13905069 wrote:

But I don't know how to,just delete this topic?

You can use the Report link (below your post) to ask Staff to move a topic.

I will move this one.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#7 2022-07-26 12:22:33

13905069
Member
From: China
Registered: 2022-04-21
Posts: 17

Re: [SOLVED]Cannot compile e4rat(get())

2ManyDogs wrote:
13905069 wrote:

But I don't know how to,just delete this topic?

You can use the Report link (below your post) to ask Staff to move a topic.

I will move this one.

Thanks.

Offline

#8 2022-07-26 14:21:52

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [SOLVED]Cannot compile e4rat(get())

patch for e4rat below however I would recomend using https://aur.archlinux.org/packages/e4rat-lite-git instead as it at least builds without adjustment

diff --git a/src/defrag.cc b/src/defrag.cc
index 4a0815b..198b24c 100644
--- a/src/defrag.cc
+++ b/src/defrag.cc
@@ -24,6 +24,7 @@
 #include "config.hh"
 #include "buddycache.hh"
 
+#include <cmath>
 #include <errno.h>
 #include <sys/stat.h>
 #include <fcntl.h>
diff --git a/src/device.hh b/src/device.hh
index fd881df..7318b65 100644
--- a/src/device.hh
+++ b/src/device.hh
@@ -21,6 +21,8 @@
 #define DEVICE_HH
 
 #include "common.hh"
+
+#include <boost/shared_ptr.hpp>
 #include <string>
 #include <ext2fs/ext2fs.h>
 #include <ext2fs/ext2_fs.h>
diff --git a/src/e4rat-collect.cc b/src/e4rat-collect.cc
index 8309ade..8397a0d 100644
--- a/src/e4rat-collect.cc
+++ b/src/e4rat-collect.cc
@@ -421,7 +421,7 @@ int main(int argc, char* argv[])
     if( Config::get<bool>("ext4_only"))
         listener.watchExt4Only();
 
-    CONNECT(&listener, eventParsed, boost::bind(&EventCatcher::handleAuditEvent, &project, _1));
+    CONNECT(&listener, eventParsed, boost::bind(&EventCatcher::handleAuditEvent, &project, boost::placeholders::_1));
 
 
     if(execute || 1 == getpid())
diff --git a/src/listener.cc b/src/listener.cc
index e7ba5e1..81e6065 100644
--- a/src/listener.cc
+++ b/src/listener.cc
@@ -153,12 +153,7 @@ void AuditListener::watchFileSystemType(long t)
 
 void addSyscall(struct audit_rule_data* rule, const char* sc, int machine)
 {
-    int syscall_nr;
-    syscall_nr = audit_name_to_syscall(sc, machine);
-    if(syscall_nr == -1)
-        throw std::logic_error("Cannot convert syscall to number");
-
-    audit_rule_syscall_data(rule, syscall_nr);
+    audit_rule_syscallbyname_data(rule, sc);
 }
 
 void AuditListener::activateRules(int machine)
diff --git a/src/signals.hh b/src/signals.hh
index f050adf..7704d0e 100644
--- a/src/signals.hh
+++ b/src/signals.hh
@@ -42,11 +42,11 @@
 #include <boost/signals2/signal.hpp>
 
 //get the number of arguments
-#define BIND1ST _1
-#define BIND2ST _1,_2
-#define BIND3ST _1,_2,_3
-#define BIND4ST _1,_2,_3,_4
-#define BIND5ST _1,_2,_3,_4,_5
+#define BIND1ST boost::placeholders::_1
+#define BIND2ST boost::placeholders::_1, boost::placeholders::_2
+#define BIND3ST boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3
+#define BIND4ST boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4
+#define BIND5ST boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5
 
 #define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(__VA_ARGS__,                 \
                                           BIND5ST,                     \

Offline

#9 2022-07-26 15:21:13

13905069
Member
From: China
Registered: 2022-04-21
Posts: 17

Re: [SOLVED]Cannot compile e4rat(get())

loqs wrote:

patch for e4rat below however I would recomend using https://aur.archlinux.org/packages/e4rat-lite-git instead as it at least builds without adjustment

diff --git a/src/defrag.cc b/src/defrag.cc
index 4a0815b..198b24c 100644
--- a/src/defrag.cc
+++ b/src/defrag.cc
@@ -24,6 +24,7 @@
 #include "config.hh"
 #include "buddycache.hh"
 
+#include <cmath>
 #include <errno.h>
 #include <sys/stat.h>
 #include <fcntl.h>
diff --git a/src/device.hh b/src/device.hh
index fd881df..7318b65 100644
--- a/src/device.hh
+++ b/src/device.hh
@@ -21,6 +21,8 @@
 #define DEVICE_HH
 
 #include "common.hh"
+
+#include <boost/shared_ptr.hpp>
 #include <string>
 #include <ext2fs/ext2fs.h>
 #include <ext2fs/ext2_fs.h>
diff --git a/src/e4rat-collect.cc b/src/e4rat-collect.cc
index 8309ade..8397a0d 100644
--- a/src/e4rat-collect.cc
+++ b/src/e4rat-collect.cc
@@ -421,7 +421,7 @@ int main(int argc, char* argv[])
     if( Config::get<bool>("ext4_only"))
         listener.watchExt4Only();
 
-    CONNECT(&listener, eventParsed, boost::bind(&EventCatcher::handleAuditEvent, &project, _1));
+    CONNECT(&listener, eventParsed, boost::bind(&EventCatcher::handleAuditEvent, &project, boost::placeholders::_1));
 
 
     if(execute || 1 == getpid())
diff --git a/src/listener.cc b/src/listener.cc
index e7ba5e1..81e6065 100644
--- a/src/listener.cc
+++ b/src/listener.cc
@@ -153,12 +153,7 @@ void AuditListener::watchFileSystemType(long t)
 
 void addSyscall(struct audit_rule_data* rule, const char* sc, int machine)
 {
-    int syscall_nr;
-    syscall_nr = audit_name_to_syscall(sc, machine);
-    if(syscall_nr == -1)
-        throw std::logic_error("Cannot convert syscall to number");
-
-    audit_rule_syscall_data(rule, syscall_nr);
+    audit_rule_syscallbyname_data(rule, sc);
 }
 
 void AuditListener::activateRules(int machine)
diff --git a/src/signals.hh b/src/signals.hh
index f050adf..7704d0e 100644
--- a/src/signals.hh
+++ b/src/signals.hh
@@ -42,11 +42,11 @@
 #include <boost/signals2/signal.hpp>
 
 //get the number of arguments
-#define BIND1ST _1
-#define BIND2ST _1,_2
-#define BIND3ST _1,_2,_3
-#define BIND4ST _1,_2,_3,_4
-#define BIND5ST _1,_2,_3,_4,_5
+#define BIND1ST boost::placeholders::_1
+#define BIND2ST boost::placeholders::_1, boost::placeholders::_2
+#define BIND3ST boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3
+#define BIND4ST boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4
+#define BIND5ST boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5
 
 #define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(__VA_ARGS__,                 \
                                           BIND5ST,                     \

I've tried e4rat Lite, but it doesn't produce startup.log.And thank you for your work!

Last edited by 13905069 (2022-07-26 15:46:35)

Offline

Board footer

Powered by FluxBB