My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
InstallingOnLinux  
Instructions on how to install EHCI library and samples on Linux
Featured
Updated Feb 4, 2010 by danielba...@gmail.com

Installation instructions for EHCI 0.x

important: you should replace 0.x for the version you are using, for instance, 0.3

In order to install the library, download the last distribution release of EHCI through the download tab, go to the directory in which you've copied the ehci-0.x.tar.gz and issue the following commands:

tar xvfz ehci-0.x.tar.gz
cd ehci-0.x
./configure
make

if you want to build python bindings do the following instead

Python bindings are only available from EHCI 0.5 on

tar xvfz ehci-0.x.tar.gz
cd ehci-0.x
./configure --enable-pyehci
make

Now, log as super user, go to the ehci-0.x directory and run:

make install

This is the explanation of the commands:

tar xvfz ehci-0.x.tar.gz   # unpack the sources
cd ehci-0.x                # change to the toplevel directory
./configure                # run the `configure' script
make                       # build EHCI
make install               # install EHCI

As the OPENCV library is required for you to install EHCI, you might get this error while running ./configure:

"checking for OPENCV... configure: error: Package requirements (opencv >= 1.1.0) were not met:

No package 'opencv' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix."

This means you don't have opencv 1.1.0 or higher installed in your machine. Refer to the topic InstallingOpencvFromCvs. You might as well receive the following error:

"checking for OPENCV... configure: error: Package requirements (opencv >= 1.1.0) were not met:

Requested 'opencv >= 1.1.0' but version of OpenCV is 1.0.0

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables OPENCV_CFLAGS and OPENCV_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details."

This means you have OpenCV installed, but your version is 1.0.0. This might be the case when you install it from the sourceforge downloadable package, opposed to checking it out from the cvs. In case you've received this error, look for the topic InstallingOpencvFromCvs.

Running samples

In case there weren't errors, you should be able to go to the directory /usr/local/share/ehci/samples and run the samples that come with the library. In order to run the 6 degrees of freedom sample do the following:

cd /usr/local/share/ehci/samples
./6dofhead

This should run the 6dofhead demonstration sample (it will track translation and rotation of your head, you should be looking toward your webcam in order for it to start). In case it won't run, you might get the following error message:

./6dofhead: error while loading shared libraries: libehci.so.0: cannot open shared object file: No such file or directory

This means that your system cannot load the library because it is not in the default places it is looking for (usually /usr/lib), but you might check that your library, libehci.so is located at /usr/local/lib/libehci.so . The easy fix, is to tell your system about it through the following command:

export LD_LIBRARY_PATH=/usr/local/lib

And then, try and run the program again through:

./6dofhead

This will most probably work, but the best way to tell your system about this new library is adding it to the /etc/ld.so.conf file. In order to do this, as a super user, edit the file /etc/ld.so.conf and add this line to it:

  /usr/local/lib/

And then run, as super user, run:

/sbin/ldconfig

This will add the library to the cache and you won't need to alter the environment library LD_LIBRARY_PATH again.

Notice to run python demos, the 6dof.py, you might need to do this export firstly

export PYTHONPATH=/usr/local/lib/python2.5/site-packages/

Contributors procedures

If you want to contribute with EHCI code, you'll firstly need to checkout files from svn, and then, run the following command:

autoreconf --install

It will generate Makefiles so that it can be configured and installed. In order to create a new distribution tarball, the following command should be issued:

make dist
Comment by sfeli...@gmail.com, Mar 21, 2011

Hi Daniel, what's up?

I download the 0.7 version (the cmake one), but I was hoping to find an INSTALL instruction in your CMakeFiles.txt something like that (just an example):

INSTALL(TARGETS ehci RUNTIME DESTINATION bin)

So, after 'make', I could 'make install' and I would have the program installed.

I know that you're not building a executable file, but a library. However after 'making', I could not find any .so file in my build folder.. I could not modify your Cmake file to fix that.

do you know what I should do? thanks

Comment by charand...@gmail.com, Jun 30, 2011

hi! I installed everything as per your post but I have an error that says

Could not initialize capturing... Segmentation fault

I have ubuntu 11.04 installed on my laptop and i have also added cheese webcam tool. Please dont mind if the question is too trivial as im very new to linux

Comment by gagangak...@gmail.com, Feb 28, 2012

Hello

I just came about EHCI. I am working with the Microsoft Kinect and I tried running the library using that but I get this error.

CvCapture?_OpenNI::CvCapture?_OpenNI : Failed to run xml script: File not found! Could not initialize capturing... Segmentation fault

I wondered if the issue was due to the Microsoft Kinect, so I tried changing the EHCI capture code to work with cv:VideoCapture? instead with which we can use the Kinect Device however I am unable to compile the code with that.

I would really appreciate if you could provide me with some guidance as to how I should proceed. Thanks


Sign in to add a comment
Powered by Google Project Hosting