Install script fails with fatal error (can't find hidapi.h)
Closed this issue · 11 comments
When I run install.sh, I get this error:
[ 50%] Building CXX object CMakeFiles/procon_driver.dir/main.cpp.o In file included from /home/salim/procon_driver/main.cpp:1:0: /home/salim/procon_driver/src/procon.hpp:10:20: fatal error: hidapi.h: No such file or directory compilation terminated.
I followed all previous instructions successfully. I'm using elementary OS Loki (based on Ubuntu 16.04) with kernel 4.13 via the hardware enablement stack.
Here's the full terminal output: https://pastebin.com/v9xP3zjr
can you try these commands and tell me where it fails?
git clone git://github.com/signal11/hidapi.git .
./bootstrap
./configure
make
sudo make install
Some further research suggests your autotools is not available / broken.
Did you run
sudo apt-get install autotools-dev autoconf automake libtool
?
Whoops, didn't mean to close issue ^^
I'm terribly sorry for the late response, I've been having an unexpectedly busy day.
Yes, autotools is installed. As far as I'm aware, all four libs were already installed, but I ran the command anyway. And, running it again now, I'm getting confirmation that they're all installed and the latest version.
As for your other request:
salim@Toffee:~/procon_driver$ git clone git://github.com/signal11/hidapi.git .
fatal: destination path '.' already exists and is not an empty directory.
salim@Toffee:~/procon_driver$ ./bootstrap
bash: ./bootstrap: No such file or directory
salim@Toffee:~/procon_driver$ ./configure
bash: ./configure: No such file or directory
salim@Toffee:~/procon_driver$ make
make: *** No targets specified and no makefile found. Stop.
salim@Toffee:~/procon_driver$ sudo make install
cat install.sh >install
chmod a+x install
Sorry my bad. These commands were supposed to be run in an empty subdirectory called hidapi.
I created the subdir and cloned the specified project into it. So far, so good.
The second command results in an automake failure:
salim@Toffee:~/procon_driver/hidapi$ ./bootstrap
+ autoreconf --install --verbose --force
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '..'.
libtoolize: copying file '../ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:25: installing './ar-lib'
configure.ac:25: installing './compile'
configure.ac:26: installing './config.guess'
configure.ac:26: installing './config.sub'
configure.ac:22: installing './install-sh'
configure.ac:26: error: required file './ltmain.sh' not found
configure.ac:22: installing './missing'
hidtest/Makefile.am: installing './depcomp'
autoreconf: automake failed with exit status: 1
salim@Toffee:~/procon_driver/hidapi$
Hmmmm ok. :/ What if you run
sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev
first?
Apt states all three packages are already the newest version.
On a whim, I just tried running install.sh
again—this time, it executed successfully. I made no changes to the configuration other than what I already stated on here. Apparently just manually adding the hidapi directory and its contents did the trick?
I checked and it seems to have created the build directory and the binary. I'm about to reboot my system and try running it.
Glad to hear it's working now. I don't think the folder creation was the problem as the autotools part failed in your first attempt. If you confirm that the driver works, I'll close this issue. Btw: I uploaded a new 'reverse axis' feature yesterday. Just in case you're running into upside down controls :P
Yes, I've now tested the driver and it works excellently.
I'm honestly surprised by how well; Steam picked it up right away, no need to set it up. I'm assuming it's emulating an XInput gamepad?
It's a bit odd to press (A), only for the game to think I pressed (B), but I'll get used to it… I've used a 360 gamepad for many years, so the muscle memory is not completely gone :D
Yes its in disguise as an Xbox360 controller! That's kinda what guarantees compatibility these day ^^ Hm you are right, I'm gonna do 'swapAB/XY' as a feature tonight! Have fun playing! :-)