rayantony / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

Linux ltr_pipe failure? #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm sort of stumped.  No matter what configure switches I provide, I cannot get 
ltr_pipe to execute without the following error.

I am guessing ltr_pipe on Linux is native and pretty basic, and does not 
require wine, etc, as it's currently the only option I cannot compile in as I'm 
not setup with mingw.

Using something like "ltr_pipe --output-stdout"  should automatically find the 
device and toss something more to stdout correct?

About the only odd ball thing I can think of being a problem, "configure 
--prefix=/home/roger/src/linuxtrack/linuxtrack-install".  Also this is 64 bit, 
so 64 bit libraries are installed within linuxtrack-install/lib and 32 bit 
libraries installed within linuxtrack-install/lib32.  (On my system /usr/lib32 
and /usr/lib64 are used.)

$ file linuxtrack-install/lib/liblinuxtrack.so.0.0.0 
../linuxtrack-install/lib/liblinuxtrack.so.0.0.0: ELF 64-bit LSB shared object, 
x86-64, version 1 (SYSV), dynamically linked, not stripped

This is a Track IR 5
# dmesg |tail
Oct 22 20:43:35 localhost4 kernel: usb 1-1.2: new full-speed USB device number 
9 using ehci-pci
Oct 22 20:43:35 localhost4 kernel: usb 1-1.2: New USB device found, 
idVendor=131d, idProduct=0158

$ strace -a 160 ltr_pipe

rt_sigaction(SIGINT, {0x401d30, [INT], SA_RESTORER|SA_RESTART, 0x3d74637c10}, 
{SIG_DFL, [], 0}, 8)                                                            
  = 0
rt_sigaction(SIGPIPE, {0x401d40, [PIPE], SA_RESTORER|SA_RESTART, 0x3d74637c10}, 
{SIG_DFL, [], 0}, 8)                                                            
= 0
write(2, "ltr_pipe: ", 10ltr_pipe: )                                            

          = 10
write(2, "Initializing LinuxTrack library", 31Initializing LinuxTrack library)  

                               = 31
write(2, "\n", 1
)                                                                               
                                                                = 1
brk(0)                                                                          

= 0x607000
brk(0x628000)                                                                   

= 0x628000
open("/root/.config/linuxtrack/linuxtrack1.conf", O_RDONLY)                     

= -1 ENOENT (No such file or directory)
getpid()                                                                        

= 26817
open("/tmp/linuxtrackeK7KUz", O_RDWR|O_CREAT|O_EXCL, 0600)                      

= 3
fcntl(3, F_GETFL)                                                               

= 0x8002 (flags O_RDWR|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDWR|O_APPEND|O_LARGEFILE)                                  

= 0
fstat(3, {st_mode=S_IFREG|0600, st_size=0, ...})                                

= 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)        

= 0x7f832b8f5000
lseek(3, 0, SEEK_CUR)                                                           

= 0
write(3, "Couldn't load liblinuxtrack, hea"..., 65)                             

= 65
write(2, "ltr_pipe: ", 10ltr_pipe: )                                            

          = 10
write(2, "LinuxTrack library failure", 26LinuxTrack library failure)            

                          = 26
write(2, "\n", 1
)                                                                               
                                                                = 1
write(2, "ltr_pipe: ", 10ltr_pipe: )                                            

          = 10
write(2, "Exiting", 7Exiting)                                                   

       = 7
write(2, "\n", 1
)                                                                               
                                                                = 1
write(2, "ltr_pipe: ", 10ltr_pipe: )                                            

          = 10
write(2, "Bye.", 4Bye.)                                                         

    = 4
write(2, "\n", 1
)                                                                               
                                                                = 1
exit_group(1)                                                                   

= ?
+++ exited with 1 +++

roger # cat tmp/linuxtrackeK7KUz 
Couldn't load liblinuxtrack, headtracking will not be available!

Original issue reported on code.google.com by rogerx....@gmail.com on 23 Oct 2013 at 4:46

GoogleCodeExporter commented 9 years ago
Let me know if you want the full strace, as the above is only half of it.  
Pretty short, but guessing you might have a better idea what's going on from 
this point.

Original comment by rogerx....@gmail.com on 23 Oct 2013 at 4:48

GoogleCodeExporter commented 9 years ago
Apparently from searching the Internet forums, I first need to run ltr_gui to 
create a config file required by ltr_pipe.

However I'm missing ltr_gui due to a compiler error, for which was buried 
within the compiler stdout and did not terminate the build on error.

So likely two issues here?  1) The compile (makefile) didn't break and 
continued after the error.  And 2) A missing dependency check 
dev-libs/mini-xml!  (ie. =dev-libs/mini-xml-2.7-r1 works here for resolving the 
dependency.)

QT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED 
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore 
-I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui 
-I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I. 
-I.. -I. -I.. -I/usr/X11R6/include -I. -I. -o extractor.o extractor.cpp
gcc -c -pipe -Wall -Wextra -DLTR_GUI -I 
/home/roger/src/linuxtrack/linuxtrack-install/include -g -Wall -W -D_REENTRANT 
-DQT_WEBKIT_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB 
-DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore 
-I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui 
-I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I. 
-I.. -I. -I.. -I/usr/X11R6/include -I. -I. -o game_data.o game_data.c
game_data.c:4:18: fatal error: mxml.h: No such file or directory
compilation terminated.
make[4]: *** [game_data.o] Error 1
make[4]: Leaving directory 
`/home/roger/src/linuxtrack/linux-track-read-only.mine/src/qt_gui'
~/src/linuxtrack/linux-track-read-only.mine/src

Original comment by rogerx....@gmail.com on 23 Oct 2013 at 5:10

GoogleCodeExporter commented 9 years ago
Mark this as solved & fixed once the configure script is augmented to check for 
this dep.  I've gotten ltr_gui and extracted the firmware.  I just hope the 
ltr_gui process spawned the wine process into a separate bottle, and am 
guessing from the QT GUI prompt it passed a switch to simply unpack and not 
install, although the process did proceed through the steps of the usual 
TrackIR_5.2.2.Final.exe install under Windows.

Also not mentioned within the documentation (ie. man ltr_pipe), users first use 
ltr_gui to extract the firmwares required for their TrackIR device which also 
requires a run time dependency of wine (which I can easily check within build 
scripts but would be nice to see mention within the man file), and then need to 
use ltr_gui to create a configuration file.  From here, a simple ltr_pipe can 
be spawned.

I must say, I'm otherwise mildly impressed. ;-)

(Next step, working with flightgear.)

Original comment by rogerx....@gmail.com on 23 Oct 2013 at 5:24

GoogleCodeExporter commented 9 years ago
Hello,
I will go over the configure.ac and friends to make sure all the dependencies 
are found and used correctly. And documentation is on the list too.

The NP's package does go to its own bottle in /tmp, so it won't ruin any of 
yours.

I managed to make the Flightgear run on my setup (although it does complain 
about not being able to compile a pixel shader) and I'm going to try a new 
protocol (no nasal script needed). I'll keep you posted once I have it working.
Kind regards,

Michal

Original comment by f.jo...@email.cz on 23 Oct 2013 at 5:45