Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Failed to compile because of errors in libgestures #36

@jackz314

Description

@jackz314

I tried to compile the drivers but soon figured out I was missing libgestures and libevdevc, so I went and try to install them, installing libevdevc went well while installing libgestures failed because of several( programmatical) errors:

In file included from include/gestures/include/box_filter_interpreter.h:9:0,
                 from src/box_filter_interpreter.cc:5:
include/gestures/include/finger_metrics.h: In member function ‘float gestures::Vector2::Mag() const’:
include/gestures/include/finger_metrics.h:38:12: error: ‘sqrtf’ was not declared in this scope
     return sqrtf(MagSq());
            ^~~~~
include/gestures/include/finger_metrics.h:38:12: note: suggested alternative: ‘strtof’
     return sqrtf(MagSq());
            ^~~~~
            strtof
Makefile:175: recipe for target 'obj/box_filter_interpreter.o' failed
make: *** [obj/box_filter_interpreter.o] Error 1

Then I saw a pull request that wasn't approved, it adds a line
+#include <math.h>
which solved that sqrtf() problem, but then the ultimate error came:

src/immediate_interpreter.cc: In member function ‘void gestures::ImmediateInterpreter::UpdateThumbState(const HardwareState&)’:
src/immediate_interpreter.cc:1279:34: error: ‘*’ in boolean context, suggest ‘&&’ instead [-Werror=int-in-bool-context]
     bool slower_moved = (dist_sq * min_dt &&
                          ~~~~~~~~^~~~~~~~
src/immediate_interpreter.cc: In member function ‘void gestures::ImmediateInterpreter::FillResultGesture(const HardwareState&, const FingerMap&)’:
src/immediate_interpreter.cc:2667:22: error: ‘*’ in boolean context, suggest ‘&&’ instead [-Werror=int-in-bool-context]
         if (dist_sq2 * dt &&  // have prev dist and current time
             ~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
Makefile:175: recipe for target 'obj/immediate_interpreter.o' failed
make: *** [obj/immediate_interpreter.o] Error 1

I'm really baffled by how difficult this whole compile/install process is, I had to manually install all kinds of packages to get the compiling working, but in the end, there's still one (or more) error that made the whole process impossible.
Am I missing something or is there a problem with the repository? If there's this problem in the file, how did all these other people get their drivers installed? Please help me out, thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions