Issue compiling on gentoo
hanetzer opened this issue · 8 comments
-- The C compiler identification is GNU 7.1.0
-- The CXX compiler identification is GNU 7.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
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.3.7")
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 5.0.1
-- Checking for module 'libudev'
-- Found libudev, version 220
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hanetzer/Projects/hidpp/build
hanetzer@proprietary-killer ~/Projects/hidpp/build $ make
Scanning dependencies of target hidpp
[ 1%] Building CXX object src/libhidpp/CMakeFiles/hidpp.dir/misc/HIDRaw.cpp.o
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp: In member function ‘int HIDRaw::readReport(std::vector<unsigned char>&, int)’:
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:145:2: error: ‘timeval’ was not declared in this scope
timeval to = { timeout/1000, (timeout%1000) * 1000 };
^~~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:145:2: note: suggested alternative: ‘timegm’
timeval to = { timeout/1000, (timeout%1000) * 1000 };
^~~~~~~
timegm
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:146:2: error: ‘fd_set’ was not declared in this scope
fd_set fds;
^~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:146:2: note: suggested alternative: ‘fdopen’
fd_set fds;
^~~~~~
fdopen
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:148:13: error: ‘fds’ was not declared in this scope
FD_ZERO (&fds);
^~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:148:3: error: ‘FD_ZERO’ was not declared in this scope
FD_ZERO (&fds);
^~~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:148:3: note: suggested alternative: ‘CPU_ZERO’
FD_ZERO (&fds);
^~~~~~~
CPU_ZERO
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:149:3: error: ‘FD_SET’ was not declared in this scope
FD_SET (_fd, &fds);
^~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:149:3: note: suggested alternative: ‘L_SET’
FD_SET (_fd, &fds);
^~~~~~
L_SET
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:153:31: error: ‘to’ was not declared in this scope
(timeout < 0 ? nullptr : &to));
^~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:153:31: note: suggested alternative: ‘tm’
(timeout < 0 ? nullptr : &to));
^~
tm
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:151:9: error: ‘select’ was not declared in this scope
ret = select (std::max (_fd, _pipe[0])+1,
^~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:151:9: note: suggested alternative: ‘splice’
ret = select (std::max (_fd, _pipe[0])+1,
^~~~~~
splice
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:157:22: error: ‘fds’ was not declared in this scope
if (FD_ISSET (_fd, &fds)) {
^~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:157:6: error: ‘FD_ISSET’ was not declared in this scope
if (FD_ISSET (_fd, &fds)) {
^~~~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:157:6: note: suggested alternative: ‘CPU_ISSET’
if (FD_ISSET (_fd, &fds)) {
^~~~~~~~
CPU_ISSET
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:165:27: error: ‘fds’ was not declared in this scope
if (FD_ISSET (_pipe[0], &fds)) {
^~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:165:6: error: ‘FD_ISSET’ was not declared in this scope
if (FD_ISSET (_pipe[0], &fds)) {
^~~~~~~~
/home/hanetzer/Projects/hidpp/src/libhidpp/misc/HIDRaw.cpp:165:6: note: suggested alternative: ‘CPU_ISSET’
if (FD_ISSET (_pipe[0], &fds)) {
^~~~~~~~
CPU_ISSET
make[2]: *** [src/libhidpp/CMakeFiles/hidpp.dir/build.make:63: src/libhidpp/CMakeFiles/hidpp.dir/misc/HIDRaw.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: src/libhidpp/CMakeFiles/hidpp.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Unsure how to proceed. Fresh clone today.
Try adding #include <sys/select.h>
in the extern "C"
section at the beginning of the file.
I will make a patch when you confirm it compiles for you. There may be similar errors in other files. I prefer to make a single patch for all missing include errors.
@cvuchener got it to compile on my glibc chroot, but another thing is XML_NO_ERROR is apparently now XML_SUCCESS on newer tinyxml2, will try your fix.
@cvuchener worked. I'm going to need some help though, as the binaries can't interact with my g602 in a meaningful way (prolly uses a differing protocol/profile stuff).
I pushed the include fix (and a few other commits that I forgot to push).
XML_NO_ERROR is apparently now XML_SUCCESS on newer tinyxml2, will try your fix.
Do you get a deprecation warning? I don't get anything. Fedora 26 has tinyxml2-3.0.0, is it outdated?
The doc tells about XML_NO_ERROR. Both value are present in my header, but no comment tell to use one or the other.
no, I just got a failure in compilation. I would say its outdated, but I tend to live on the edge. It apparently just no longer exists on my version.
[1/3] Building CXX object src/tools/CMakeFiles/profile.dir/profile/ProfileXML.cpp.o
FAILED: src/tools/CMakeFiles/profile.dir/profile/ProfileXML.cpp.o
/usr/bin/c++ -I../src/tools/../libhidpp -Wall -std=gnu++14 -MD -MT src/tools/CMakeFiles/profile.dir/profile/ProfileXML.cpp.o -MF src/tools/CMakeFiles/profile.dir/profile/ProfileXML.cpp.o.d -o src/tools/CMakeFiles/profile.dir/profile/ProfileXML.cpp.o -c ../src/tools/profile/ProfileXML.cpp
../src/tools/profile/ProfileXML.cpp: In function ‘void readButton(const tinyxml2::XMLElement*, HIDPP::Profile::Button&, HIDPP::Macro&, const HIDPP::EnumDesc&)’:
../src/tools/profile/ProfileXML.cpp:193:9: error: ‘XML_NO_ERROR’ was not declared in this scope
case XML_NO_ERROR:
^~~~~~~~~~~~
ninja: build stopped: subcommand failed.
Latest version is 5.0.1, and the online documentation is very old (2.0.2). I will make the change.
Nice, glad to have been of assistance there. Do you think we could live chat in some manner to see about getting this particular mouse supported?
Not right now sorry, maybe in the late afternoon or tonight (UTC+2).