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

Pointtracker on Linux and compiling errors #926

Closed
waterlubber opened this issue Apr 3, 2019 · 9 comments
Closed

Pointtracker on Linux and compiling errors #926

waterlubber opened this issue Apr 3, 2019 · 9 comments
Labels

Comments

@waterlubber
Copy link

waterlubber commented Apr 3, 2019

I've installed Opentrack on Arch Linux through the AUR package: https://aur.archlinux.org/packages/opentrack/

I have it working and it seems to be working fine. However, PointTracker does not appear in the list of input trackers. I have two working webcams on the system (/dev/video0 and /dev/video2) There is no notable output when running it in console.

How to I add the Pointtracker plugin? Should I just run this inside of WINE for use with Elite Dangerous?

Edit: It appears that the tracker-pt file is missing from the /usr/libexec/opentrack/ directory. How do I compile or get this? I can't get Opentrack working in WINE. (the webcam doesn't work)

@sthalik
Copy link
Member

sthalik commented Apr 4, 2019

Edit: It appears that the tracker-pt file is missing from the /usr/libexec/opentrack/ directory. How do I compile or get this? I can't get Opentrack working in WINE. (the webcam doesn't work)

Make sure to set OpenCV_DIR in cmake cache.

@sthalik sthalik added the support label Apr 4, 2019
@waterlubber
Copy link
Author

waterlubber commented Apr 4, 2019

It appears to be set correctly (in the CMakeCache.txt file in the cv/ directory), there is the following line:
OpenCV_DIR:PATH=/usr/lib/cmake/opencv4
and that directory has the files in it:

/usr/lib/cmake/opencv4/OpenCVConfig-version.cmake
/usr/lib/cmake/opencv4/OpenCVConfig.cmake
/usr/lib/cmake/opencv4/OpenCVModules-release.cmake
/usr/lib/cmake/opencv4/OpenCVModules.cmake

I then ran cmake with this command (which is almost certainly wrong):
OpenCV_DIR=/usr/lib/cmake/opencv4 cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DSDK_WINE_PREFIX=/home/waterlubber/.wine -DCMAKE_INSTALL_PREFIX=~/.local/share -OpenCV_DIR=/usr/lib/cmake/opencv4

Cmake gave the following output: https://pastebin.com/xXwuBW5S
and then ninja. Ninja failed, with the following output: https://pastebin.com/EBNUCkV6

Are there any building instructions for this? I'm not very familiar with cmake at all and am generally just running random console commands at this point.

Edit: I edited the CMakeLists file and added the set() with the OpenCV dir, but I still got the same error.

Edit 2: I started again with a clean clone of the repo, and added the following like to CMakeLists.txt:
set(OpenCV_DIR "/usr/lib/cmake/opencv4")
It still failed with the same output (https://pastebin.com/bQ7snCvF)

What's odd is that the arch package compiles successfully (albeit without webcam support) using the following PKGBUILD:

# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Contributor: Maxime Morel <maxime@mmorel.eu>

pkgname=opentrack
pkgver=2.3.10
pkgrel=1
pkgdesc="Head tracking software"
arch=('x86_64')
url="https://github.com/opentrack/opentrack/"
license=('GPL3')
depends=('qt5-base' 'opencv')
makedepends=('cmake' 'xplane-sdk-devel' 'wine' 'ninja')
source=("https://github.com/opentrack/opentrack/archive/opentrack-$pkgver.tar.gz" "opentrack.desktop")
sha256sums=('f4934b66e78d3d5105634c473505f6ed4d6ab4a2d2d03181267295330a61eb9d'
            '96b4a633d40f399b927d159353cfaa679d2148156a3f04b5ea23b8d4b8e4bd3f')

build() {
  cd opentrack-opentrack-$pkgver

  mkdir -p build
  cd build

  # fix path for xplane plugin
  sed -i 's/..\/opentrack-compat\/export.hpp/..\/compat\/export.hpp/' ../x-plane-plugin/plugin.c
  mkdir -p xplane_sdk/CHeaders
  ln -sf /usr/include/xplane_sdk/Wrappers xplane_sdk/CHeaders/
  ln -sf /usr/include/xplane_sdk/Widgets xplane_sdk/CHeaders/
  ln -sf /usr/include/xplane_sdk/XPLM xplane_sdk/CHeaders/
  cmake .. \
      -GNinja \
      -DCMAKE_BUILD_TYPE=Release \
      -DSDK_XPLANE=xplane_sdk \
      -DSDK_WINE_PREFIX=/ \
      -DCMAKE_INSTALL_PREFIX=/usr
  ninja
}

package() {
  cd opentrack-opentrack-$pkgver/build
  DESTDIR="$pkgdir" ninja install

  install -Dm644 $srcdir/opentrack.desktop $pkgdir/usr/share/applications/opentrack.desktop
}

Edit 3: I cloned the repo again, changed CMakeList.txt as above, and made build and ran cmake .. successfully. make however still returns an error:
https://pastebin.com/pqc6JWh4

Edit 4: I can get it to build with -fpermissive, but whatever that kicks out still doesn't work (I get an "error loading opentrack-user-interface.so whenever I try to run whatever make spits out)

Edit 5: I tried the stable/2.3 branch but cmake didn't seem to detect OpenCV even with the option added to CMakeLists

@waterlubber waterlubber changed the title PointTracker on Linux? Pointtracker on Linux and compiling errors Apr 4, 2019
@waterlubber
Copy link
Author

So I've tried a few other things (compiling in different ways with and without OpenCV) but I still can't get it to sucessfully compile with OpenCV. If it makes a difference, I'm using OpenCV 4.0.1-6, should I use an older version like 4.0.0, 3.4.5, or 2.4.13?

sthalik added a commit that referenced this issue Apr 5, 2019
@sthalik
Copy link
Member

sthalik commented Apr 5, 2019

That error is unrelated to opencv. Pull from unstable and try again.

That pkgbuild should bump _pkgver.

@sthalik
Copy link
Member

sthalik commented Apr 5, 2019

-fpermissive shouldn't be required under any circumstances. It should be fixed now.

If you're having problems with loading the app after that, I have some instructions.

@waterlubber
Copy link
Author

waterlubber commented Apr 5, 2019

Alright, I just compiled after cloning with:

mkdir build
cd build
cmake ..
make
make install

I set LD_LIBRARY PATH to build/install/libexec/opentrack (where all the libraries were) and ran it. I still did not see the video options:
image

Terminal output was as follows:

[/home/waterlubber/.local/share/src/opentrack/qxt-mini/qxtglobalshortcut.cpp:64]: qxt-mini: adding event filter
[/home/waterlubber/.local/share/src/opentrack/qxt-mini/qxtglobalshortcut_x11.cpp:349]: qxt-mini: fixed x11 autorepeat

I also tried the opentrack-git AUR package, which downloads from the repo, and it did not work either.

And here's the output of cmake and make: https://pastebin.com/EQJ6Vc3d
It looks like it isn't even trying to build the pointtracker library

If it helps, I have two webcams - a Logitech C310 and a PS3 Eye, both of which are currently working on this system (via UVC and ov534, respectively)

sthalik added a commit that referenced this issue Apr 6, 2019
@sthalik
Copy link
Member

sthalik commented Apr 6, 2019

Thanks for noticing this, especially so soon after the mistake was made 👍. I was able to reproduce this bug and fix it.

@sthalik sthalik closed this as completed Apr 6, 2019
@sthalik sthalik added bug and removed support labels Apr 6, 2019
@sthalik
Copy link
Member

sthalik commented Apr 6, 2019

@waterlubber,

should I use an older version like 4.0.0, 3.4.5, or 2.4.13?

Any version above 4.0 or some newer 3.x should work. I can't guarantee 2.x will work for all modules.

@waterlubber
Copy link
Author

Thank you for all the help!
I can see and configure the PointTracker option, but now I'm experiencing a different issue (#930).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants