v1.7.14 linux build notes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

v1.7.14 linux build notes

ben simons
This post was updated on .

here's some linux build notes for v1.7.14
it did not completely build without error, until the following hacks/fixes were made.
Hopefully this info is useful; perhaps someone can apply these back to the repo.
I'm still relatively new to Equalizer. Apologies if there's any mistakes.

This is on an up-to-date gentoo linux system:

$ uname -a
Linux dadev2 3.12.21-gentoo-r1 #1 SMP Fri Jul 4 09:45:24 EST 2014 x86_64 Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz GenuineIntel GNU/Linux

I should say, I have installed the Space Navigator Library from:


and installed it in: /usr/local/lib64/libspnav.so

lrwxrwxrwx 1 root root         13 Jul  4 18:47 libspnav.so -> libspnav.so..
-rwxrwxr-x 1 ben  staff   59995 Jul  4 15:19 libspnav.so..

For some reason SpaceNav have those trailing '..' on the lib, so a symbolic link fixes this.

Fresh Build:

 # mkdir /touro/equalizer
 # cd /touro/equalizer
 # mkdir v1.7.14
 # cd v1.7.14
 # git clone https://github.com/Eyescale/Buildyard.git
 # cd Buildyard
 # git clone https://github.com/Eyescale/config.git config.eyescale
 # mkdir build
 # cd build
 # cmake-gui ..

  * hit configure GUI button twice, then generate GUI button, then file->quit
  * you are in the dir: /touro/equalizer/v1.7.14/Buildyard/build

 # make VERBOSE=1 Equalizer

 this builds up until it is unable to git clone VRPN's submodules/hidapi

[ 66%] Performing download step (git clone) for 'VRPN'
cd /touro/equalizer/v1.7.14/Buildyard/src && /usr/bin/cmake -P /touro/equalizer/v1.7.14/Buildyard/build/VRPN/tmp/VRPN-gitclone.cmake
Cloning into 'VRPN'...
remote: Reusing existing pack: 16899, done.
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 16902 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (16902/16902), 8.16 MiB | 1.80 MiB/s, done.
Resolving deltas: 100% (12550/12550), done.
Checking connectivity... done.
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Submodule 'submodules/hidapi' (git://github.com/signal11/hidapi.git) registered for path 'submodules/hidapi'
Cloning into 'submodules/hidapi'...
fatal: unable to connect to github.com:
github.com[0:]: errno=Connection timed out

Clone of 'git://github.com/signal11/hidapi.git' into submodule path 'submodules/hidapi' failed
CMake Error at /touro/equalizer/v1.7.14/Buildyard/build/VRPN/tmp/VRPN-gitclone.cmake:71 (message):
  Failed to update submodules in:

make[3]: *** [VRPN/src/VRPN-stamp/VRPN-download] Error 1
make[3]: Leaving directory `/mnt/touro/equalizer/v1.7.14/Buildyard/build'
make[2]: *** [CMakeFiles/VRPN.dir/all] Error 2
make[2]: Leaving directory `/mnt/touro/equalizer/v1.7.14/Buildyard/build'
make[1]: *** [CMakeFiles/Equalizer.dir/rule] Error 2
make[1]: Leaving directory `/mnt/touro/equalizer/v1.7.14/Buildyard/build'
make: *** [Equalizer] Error 2
/touro/equalizer/v1.7.14/Buildyard/build $

/touro/equalizer/v1.7.14 $ grep -r hidapi.git *
Buildyard/src/VRPN/.gitmodules: url = git://github.com/signal11/hidapi.git
Buildyard/src/VRPN/.git/config: url = git://github.com/signal11/hidapi.git

* A fix based on: https://github.com/atom/apm/issues/106
  was to changed these from git:// to https://
  which fixed the connection time out.


Buildyard/src/VRPN/.gitmodules: url = https://github.com/signal11/hidapi.git
Buildyard/src/VRPN/.git/config: url = https://github.com/signal11/hidapi.git

Then continue with the build:

# make VERBOSE=1 Equalizer

The next issue is vrpn_tracker.h wants to find libusb.h, but it's not in the INCLUDE PATH.
I wasn't sure how to append /usr/include/libusb-1.0 to the INCLUDE PATH (couldn't see
it in the cmake-gui), so instead i just made the path a bit more explicit in the src file.

That is:

* Change line 176:

// #include <libusb.h>
#include <libusb-1.0/libusb.h>

and then continue the build.

# make VERBOSE=1 Equalizer

And that Compiled!  DONE.


At one stage i noted my libspnav.so did not include the 3 x11 functions:

[ 39%] Building CXX object tools/CMakeFiles/eqPlyConverter.dir/eqPlyConverter/main.cpp.o
Linking CXX executable ../bin/eqPlyConverter
../lib/libEqualizer.so.1.7.3: undefined reference to `spnav_x11_event'
../lib/libEqualizer.so.1.7.3: undefined reference to `spnav_x11_window'
../lib/libEqualizer.so.1.7.3: undefined reference to `spnav_x11_open'

It turned out the libspnav.so which i think came via the git clone of the repo,
so it had to be rebuilt with X11 enabled.  This made a much bigger lib.

then "nm libspnav.so" showed them (nb below "spnav_x11_*")

 $ nm /usr/local/lib64/libspnav.so |tail
0000000000001f30 T spnav_poll_event
0000000000001b60 T spnav_remove_events
0000000000001ac0 T spnav_sensitivity
0000000000002150 T spnav_wait_event
0000000000001e90 T spnav_x11_event
00000000000019a0 T spnav_x11_open
0000000000001730 T spnav_x11_window
                 U stderr@@GLIBC_2.2.5
                 U write@@GLIBC_2.2.5
0000000000001470 t x11_sensitivity

Also, to see the space navigator working, you need to be sure it's sending X11 events.
Assuming you have installed spacenavd in /etc/init.d and the daemon is running ok
(see the spacenav website for instructions on installing it. Nothing unusual there)
You also need to (as root) enable x11 events via spnavd_ctl

# /usr/bin/spnavd_ctl
the only valid control for the moment is x11 (/usr/bin/spnavd_ctl x11 start/stop).

# /usr/bin/spnavd_ctl x11 start
signalled spacenavd, it should now start sending X events.

You should then be able to run eqPly and move/spin the screwdriver with the space navigator!
in this case, this means:

# export LD_LIBRARY_PATH=/touro/equalizer/v1.7.14/Buildyard/build/install/lib:$LD_LIBRARY_PATH
# /touro/equalizer/v1.7.14/Buildyard/build/install/bin/eqPly

awesome spinning of screwdriver with space nav ensues!  :-)