Open robomancer-or opened 6 years ago
Are you using gcc 5? There is an issue withh gcc 5 that does not happen with later versions. You can try this patch or just skip the compilation of this tool if you don't need it.
diff --git a/src/tools/hidpp20-raw-touchpad-driver.cpp b/src/tools/hidpp20-raw-touchpad-driver.cpp
index bf59e40..fbb0845 100644
--- a/src/tools/hidpp20-raw-touchpad-driver.cpp
+++ b/src/tools/hidpp20-raw-touchpad-driver.cpp
@@ -343,7 +343,7 @@ public:
{
std::map<std::string, node>::iterator it;
try {
- it = _nodes.emplace (path, path).first;
+ it = _nodes.emplace (std::piecewise_construct, std::forward_as_tuple(path), std::forward_as_tuple(path)).first;
}
catch (std::exception &e) {
Log::debug () << "Ignored device " << path << ": " << e.what () << std::endl;
That got it to build, but now make install
tells me "-- Set runtime path of "/usr/local/bin/hidpp-list-devices" to "" ", and when I try to run it I get "hidpp-list-devices: error while loading shared libraries: libhidpp.so: cannot open shared object file: No such file or directory", which I suspect is related, but I don't know how to fix it.
Success! I found https://stackoverflow.com/questions/32469953/why-is-cmake-designed-so-that-it-removes-runtime-path-when-installing and added
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
to CMakeLists.txt right after project(hidpp)
and rebuilt everything and the code can now run! As soon as my device comes in I'll be able to test if it works...
On some distributions, ld.so may not look into /usr/local/lib by default, you can change that in /etc/ld.so.conf or /etc/ld.so.conf.d/ (and then update the cache with ldconfig).
If you are installing in a non-standard prefix, you can set LD_LIBRARY_PATH to include the location of libhidpp.so.
I'm trying to build, but it's giving me a bunch of errors... perhaps cmake isn't adding an important flag to the makefile somewhere?