openyou/libomron

Couldn't get it to work

Closed this issue · 1 comments

Hi.

I have followed the instructions for building with brettviren fork. I am running into a few issues. I have copied the steps and results in the following. Any help is greatly appreciated. I am running on Ubuntu 10.4 and it seems both usb-1.0 and usb-0.1 are installed.

Here is the log:

prodea@prodea-laptop:~/opt/omron-build$ cmake /git/libomron
-- Using compily_buildd git submodule /home/prodea/git/libomron/compily_buildd/cmake
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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
-- BUILDSYS_BUILD_PLATFORM variable not set. (Just a warning, you can probably ignore this.)
-- BUILDSYS_BUILD_DIR variable not set. (Just a warning, you can probably ignore this.)
-- No build type specified, using default: Release
-- Force 32 bit NOT AVAILABLE - Already on a 32 bit platform
-- Install Directory Prefix: /usr/local
-- Include Install Directory: /usr/local/include
-- Library Install Directory: /usr/local/lib
-- Runtime Install Directory: /usr/local/bin
-- Building Static Libraries for LIBOMRON
-- Found PythonLibs: /usr/lib/libpython2.6.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/prodea/opt/omron-build
prodea@prodea-laptop:
/opt/omron-build$

prodea@prodea-laptop:/opt/omron-build$ make
Scanning dependencies of target omron_STATIC
[ 14%] Building C object src/CMakeFiles/omron_STATIC.dir/omron.c.o
/home/prodea/git/libomron/src/omron.c: In function ‘omron_exchange_cmd’:
/home/prodea/git/libomron/src/omron.c:256: warning: incompatible implicit declaration of built-in function ‘exit’
[ 28%] Building C object src/CMakeFiles/omron_STATIC.dir/omron_usbfs.c.o
/home/prodea/git/libomron/src/omron_usbfs.c: In function ‘omron_open’:
/home/prodea/git/libomron/src/omron_usbfs.c:73: warning: assignment makes pointer from integer without a cast
/home/prodea/git/libomron/src/omron_usbfs.c: In function ‘omron_set_mode’:
/home/prodea/git/libomron/src/omron_usbfs.c:132: warning: incompatible implicit declaration of built-in function ‘exit’
/home/prodea/git/libomron/src/omron_usbfs.c: In function ‘omron_read_data’:
/home/prodea/git/libomron/src/omron_usbfs.c:151: warning: incompatible implicit declaration of built-in function ‘exit’
/home/prodea/git/libomron/src/omron_usbfs.c:174:25: warning: null character(s) ignored
/home/prodea/git/libomron/src/omron_usbfs.c: In function ‘omron_write_data’:
/home/prodea/git/libomron/src/omron_usbfs.c:204: warning: incompatible implicit declaration of built-in function ‘exit’
Linking C static library ../lib/libomron.a
[ 28%] Built target omron_STATIC
Scanning dependencies of target omron_790IT_test
[ 42%] Building C object examples/omron_790IT_test/CMakeFiles/omron_790IT_test.dir/omron_790IT_test.c.o
Linking C executable ../../bin/omron_790IT_test
[ 42%] Built target omron_790IT_test
Scanning dependencies of target omron_720IT_test
[ 57%] Building C object examples/omron_720IT_test/CMakeFiles/omron_720IT_test.dir/omron_720IT_test.c.o
Linking C executable ../../bin/omron_720IT_test
[ 57%] Built target omron_720IT_test
[ 71%] Swig source
Scanning dependencies of target _omron
[ 85%] Building CXX object swig/CMakeFiles/_omron.dir/omronPYTHON_wrap.cxx.o
[100%] Building CXX object swig/CMakeFiles/_omron.dir/Omron.cxx.o
Linking CXX shared module ../lib/_omron.so
[100%] Built target _omron
prodea@prodea-laptop:
/opt/omron-build$

prodea@prodea-laptop:/opt/omron-build$ make DESTDIR=/opt/omron install
[ 28%] Built target omron_STATIC
[ 42%] Built target omron_790IT_test
[ 57%] Built target omron_720IT_test
[100%] Built target _omron
Install the project...
-- Install configuration: "Release"
-- Installing: /home/prodea/opt/omron/usr/local/lib/libomron.a
-- Installing: /home/prodea/opt/omron/usr/local/bin/omron_790IT_test
-- Removed runtime path from "/home/prodea/opt/omron/usr/local/bin/omron_790IT_test"
-- Installing: /home/prodea/opt/omron/usr/local/bin/omron_720IT_test
-- Removed runtime path from "/home/prodea/opt/omron/usr/local/bin/omron_720IT_test"
-- Installing: /home/prodea/opt/omron/usr/local/python/omron/omron.py
CMake Error at swig/cmake_install.cmake:36 (FILE):
file INSTALL cannot find "/home/prodea/opt/omron-build/swig/_omron.so".
Call Stack (most recent call first):
cmake_install.cmake:39 (INCLUDE)

make: *** [install] Error 1


At this point, despite the above failure, I tried to run the test program to see what I can get: (switched to root user to avoid read/write permission issues)

root@prodea-laptop:/home/prodea/opt/omron/usr/local/bin# lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 0590:0028 Omron Corp. HJ-720IT Pedometer
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 001 Device 005: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 001 Device 004: ID 413c:0058 Dell Computer Corp. Port Replicator
Bus 001 Device 002: ID 413c:a005 Dell Computer Corp. Internal 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@prodea-laptop:/home/prodea/opt/omron/usr/local/bin# export OMRON_DEV=/dev/bus/usb/003/004
root@prodea-laptop:/home/prodea/opt/omron/usr/local/bin# ./omron_790IT_test
Found 1 omron 790ITs
omron_open USBDEVFS_CLAIMINTERFACE: No such file or directory
omron_set_mode USBDEVFS_CONTROL: No route to host

qdot commented

I'm gonna go ahead and call the usbfs version of this deprecated. The libusb1 core should be stable now.