As I understood from the cmake output I have all the dependencies satisfied. However, the make command fails to compile Configuration.cpp for some reason.
sviperz@ZenBook:~/Git/logiops/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.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 Git: /usr/bin/git (found version "2.34.1")
LogiOps Version Number: v0.3.0-10-g9cf7e43
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'gio-2.0'
-- Found gio-2.0, version 2.72.4
-- Checking for module 'glib-2.0'
-- Found glib-2.0, version 2.72.4
-- 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
-- Checking for module 'libevdev'
-- Found libevdev, version 1.12.1
-- Checking for module 'dbus-1'
-- Found dbus-1, version 1.12.20
-- Checking for module 'systemd'
-- Found systemd, version 249
-- Checking for module 'libconfig'
-- Found libconfig, version 1.5
-- Checking for module 'libudev'
-- Found libudev, version 249
/home/sviperz/Git/logiops/src/logid/../ipcgull/src/include
-- systemd units will be installed at /lib/systemd/system
-- dbus system policy will be installed at /usr/share/dbus-1/system.d
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sviperz/Git/logiops/build
sviperz@ZenBook:~/Git/logiops/build$ make
[ 1%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/function.cpp.o
[ 2%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/property.cpp.o
[ 4%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/signal.cpp.o
[ 5%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/interface.cpp.o
[ 7%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/node.cpp.o
[ 8%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/exception.cpp.o
[ 10%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/common_gdbus.cpp.o
[ 11%] Building CXX object src/ipcgull/CMakeFiles/ipcgull.dir/src/server_gdbus.cpp.o
[ 13%] Linking CXX static library libipcgull.a
[ 13%] Built target ipcgull
[ 14%] Building CXX object src/logid/CMakeFiles/logid.dir/logid.cpp.o
[ 16%] Building CXX object src/logid/CMakeFiles/logid.dir/util/log.cpp.o
[ 17%] Building CXX object src/logid/CMakeFiles/logid.dir/config/util.cpp.o
[ 19%] Building CXX object src/logid/CMakeFiles/logid.dir/InputDevice.cpp.o
[ 20%] Building CXX object src/logid/CMakeFiles/logid.dir/DeviceManager.cpp.o
[ 22%] Building CXX object src/logid/CMakeFiles/logid.dir/Device.cpp.o
[ 23%] Building CXX object src/logid/CMakeFiles/logid.dir/Receiver.cpp.o
[ 25%] Building CXX object src/logid/CMakeFiles/logid.dir/Configuration.cpp.o
/home/sviperz/Git/logiops/src/logid/Configuration.cpp: In constructor ‘logid::Configuration::Configuration(std::string)’:
/home/sviperz/Git/logiops/src/logid/Configuration.cpp:33:30: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
33 | _config.readFile(_config_file);
| ^~~~~~~~~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /home/sviperz/Git/logiops/src/logid/./config/group.h:21,
from /home/sviperz/Git/logiops/src/logid/./config/map.h:21,
from /home/sviperz/Git/logiops/src/logid/./config/types.h:21,
from /home/sviperz/Git/logiops/src/logid/./config/schema.h:21,
from /home/sviperz/Git/logiops/src/logid/./Configuration.h:22,
from /home/sviperz/Git/logiops/src/logid/Configuration.cpp:19:
/usr/include/libconfig.h++:475:29: note: initializing argument 1 of ‘void libconfig::Config::readFile(const char*)’
475 | void readFile(const char *filename);
| ~~~~~~~~~~~~^~~~~~~~
/home/sviperz/Git/logiops/src/logid/Configuration.cpp: In member function ‘void logid::Configuration::save()’:
/home/sviperz/Git/logiops/src/logid/Configuration.cpp:60:27: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
60 | _config.writeFile(_config_file);
| ^~~~~~~~~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /home/sviperz/Git/logiops/src/logid/./config/group.h:21,
from /home/sviperz/Git/logiops/src/logid/./config/map.h:21,
from /home/sviperz/Git/logiops/src/logid/./config/types.h:21,
from /home/sviperz/Git/logiops/src/logid/./config/schema.h:21,
from /home/sviperz/Git/logiops/src/logid/./Configuration.h:22,
from /home/sviperz/Git/logiops/src/logid/Configuration.cpp:19:
/usr/include/libconfig.h++:476:30: note: initializing argument 1 of ‘void libconfig::Config::writeFile(const char*)’
476 | void writeFile(const char *filename);
| ~~~~~~~~~~~~^~~~~~~~
make[2]: *** [src/logid/CMakeFiles/logid.dir/build.make:174: src/logid/CMakeFiles/logid.dir/Configuration.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: src/logid/CMakeFiles/logid.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
As I understood from the
cmake
output I have all the dependencies satisfied. However, themake
command fails to compile Configuration.cpp for some reason.Environment OS: Pop!_OS 22.04 LTS x86_64 Kernel: 6.2.6-76060206-generic CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz
Please check the console output below: