Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on arch linux #405

Closed
UnconventionalMindset opened this issue Apr 25, 2020 · 11 comments
Closed

Installation fails on arch linux #405

UnconventionalMindset opened this issue Apr 25, 2020 · 11 comments

Comments

@UnconventionalMindset
Copy link

The installation fails on archlinux with the following error:

Package 'libusb', required by 'virtual:world', not found

My understanding is that the build fails due to the package libusb having a different name or installation path in Arch Linux.

This custom made scripts (AUR package) for Arch linux, are not working either:
https://github.com/asonix/psmoveapi-arch
This scripts also includes some patches that are outdated that I could update.

I am happy to contribute to this repo and try to test and to create a fix for those issues, but I may need a little help.

Any suggestions on where I can to fix those issues?

@thp
Copy link
Owner

thp commented Apr 25, 2020

Weird, it seems like libusb does exist in Arch Linux:

https://www.archlinux.org/packages/core/x86_64/libusb/

(I don't have any experience with Arch Linux)

@nitsch
Copy link
Collaborator

nitsch commented Apr 25, 2020 via email

@UnconventionalMindset
Copy link
Author

Arch Linux is not that particular, basically to install C++ applications works similar to other distro with maybe few extra things.
The AUR package is just a script that tells the system how to install the software. So rather than building from sources yourself you just download a script from a package repository and it will install the software for you following steps that are known to be working.

The steps I run are as following:

git clone --recursive https://github.com/thp/psmoveapi.git
cd psmoveapi/
mkdir build
cd build/
cmake ..

and the build log in the terminal is:

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Checking for module 'dbus-1'
--   Found dbus-1, version 1.12.16
-- Checking for module 'libudev'
--   Found libudev, version 245
-- Checking for module 'bluez>=5'
--   Found bluez, version 5.54

  Tracker
    Tracker library:  No (OpenCV not found)
    PS Eye support:   Yes
    Use PS3EYEDriver: No (disabled)
-- Checking for module 'libusb'
--   Package 'libusb', required by 'virtual:world', not found
CMake Error at /usr/share/cmake-3.17/Modules/FindPkgConfig.cmake:467 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.17/Modules/FindPkgConfig.cmake:647 (_pkg_check_modules_internal)
  src/utils/CMakeLists.txt:20 (pkg_check_modules)
  src/CMakeLists.txt:193 (include)
  CMakeLists.txt:17 (include)


-- Configuring incomplete, errors occurred!
See also "/home/<myuser>/psmoveapi/build/CMakeFiles/CMakeOutput.log".
See also "/home/<myuser>

/psmoveapi/build/CMakeFiles/CMakeError.log".

CMakeError.log
CMakeOutput.log

@UnconventionalMindset
Copy link
Author

Also, these are my libusb-related installed packages:

$ pacman -Q | grep libusb
lib32-libusb 1.0.23-1
libusb 1.0.23-2
libusbmuxd 2.0.1-1

libusb is not split into normal and -dev like in Ubuntu, the standard package should contain both:
https://bbs.archlinux.org/viewtopic.php?pid=338240#p338240

@yuripourre
Copy link

This is just a guess, could you please try adding a new line here?

https://github.com/thp/psmoveapi/blob/master/cmake/FindUSB1.cmake#L32
usr/include or usr/include/libusb-1.0

Based on:
https://www.archlinux.org/packages/core/x86_64/libusb/

@nitsch
Copy link
Collaborator

nitsch commented Apr 25, 2020 via email

@nitsch
Copy link
Collaborator

nitsch commented Apr 25, 2020 via email

@nitsch
Copy link
Collaborator

nitsch commented May 15, 2020 via email

@UnconventionalMindset
Copy link
Author

@nitsch Just tried it today on my laprop (before I was on my desktop) and by running cmake, it found libusb 0.1.12 which I do not see installed. Maybe it is thanks to libusb-compat 0.1.7-1? I am surprised it built successfully.
I am also having other issues about installing but still trying to figure out (I know a bit about C but apparently not enough, especially to handle C++).

 ~/p/build   master   cmake ..
-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Checking for module 'dbus-1'
--   Found dbus-1, version 1.12.16
-- Checking for module 'libudev'
--   Found libudev, version 245
-- Checking for module 'bluez>=5'
--   Found bluez, version 5.54

  Tracker
    Tracker library:  No (OpenCV not found)
    PS Eye support:   Yes
    Use PS3EYEDriver: No (disabled)
-- Checking for module 'libusb'
--   Found libusb, version 0.1.12

  Build configuration
    Debug build:      No
    Library license:  BSD (see README.md for details)

  Additional targets
    C example apps:   Yes
    OpenGL examples:  Yes
    C test programs:  Yes
    NavCon test:      Yes (using SDL2 joystick API)

  Language bindings
    Python:           No (SWIG not found)
    Java:             No (SWIG not found)
    C#:               No (SWIG not found)
    Processing:       No (SWIG not found)

-- Configuring done
-- Generating done
-- Build files have been written to: /home/<MY_USER>/psmoveapi/build
 ~/p/build   master   sudo pacman -Q | grep libusb
[sudo] password for <MY_USER>: 
lib32-libusb 1.0.23-1
libusb 1.0.23-2
libusb-compat 0.1.7-1
libusbmuxd 2.0.1-1

@nitsch
Copy link
Collaborator

nitsch commented May 18, 2020 via email

@nitsch
Copy link
Collaborator

nitsch commented Aug 6, 2020

@JacopoGobbi Is this issue solved?

@nitsch nitsch closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants