rpavlik / vrjuggler

My VR Juggler changes, including a cmake-based build
http://academic.cleardefinition.com
GNU Lesser General Public License v2.1
4 stars 6 forks source link

IS900 driver build error on Mac OS X 10.9 #16

Open casallas opened 10 years ago

casallas commented 10 years ago

It's having some problems with termio...

[ 80%] Building CXX object modules/gadgeteer/drivers/Intersense/IS900/CMakeFiles/IS900_drv.dir/serial.cpp.o
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:566:6: warning: 
      conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    {"/dev/tty1", "/dev/tty2", "/dev/tty3", "/dev/tty4"};
     ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:566:19: warning: 
      conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    {"/dev/tty1", "/dev/tty2", "/dev/tty3", "/dev/tty4"};
                  ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:566:32: warning: 
      conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    {"/dev/tty1", "/dev/tty2", "/dev/tty3", "/dev/tty4"};
                               ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:566:45: warning: 
      conversion from string literal to 'char *' is deprecated [-Wc++11-compat-deprecated-writable-strings]
    {"/dev/tty1", "/dev/tty2", "/dev/tty3", "/dev/tty4"};
                                            ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:715:19: error: variable
      has incomplete type 'struct termio'
    struct termio terminfo;
                  ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:715:12: note: forward
      declaration of 'termio'
    struct termio terminfo;
           ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:717:27: error: use of
      undeclared identifier 'TCGETA'
    if( ioctl(port->desc, TCGETA, &terminfo ) == -1 )
                          ^
/Users/juan/dev/vrjuggler/vrjuggler_git/modules/gadgeteer/drivers/Intersense/IS900/serial.cpp:757:27: error: use of
      undeclared identifier 'TCSETA'
    if( ioctl(port->desc, TCSETA, &terminfo ) == -1 )
                          ^
4 warnings and 3 errors generated.
make[2]: *** [modules/gadgeteer/drivers/Intersense/IS900/CMakeFiles/IS900_drv.dir/serial.cpp.o] Error 1
make[1]: *** [modules/gadgeteer/drivers/Intersense/IS900/CMakeFiles/IS900_drv.dir/all] Error 2
make: *** [all] Error 2
godbyk commented 10 years ago

Do you have the termios.h file on Mac OS X? If not, then we can use the HAVE_TERMIOS_H boolean that's set a few lines further down the CMakeLists.txt file and build IS900 conditionally based on that.

rpavlik commented 10 years ago

Ah, I bet that would work. I think I've dealt with this elsewhere and that's a Linux header or something

casallas commented 10 years ago

It seems like OS X does have termios.h, I'd have to check why it's not including it

rpavlik commented 10 years ago

Any luck on tracking this down? If not, I'd say just disable it on Mac (possibly using a check header configure time compile test), since the hardware is accessible through VRPN anyway.

casallas commented 10 years ago

I haven't looked further into this (maybe because I don't need/have the IS 900). I'm all for disabling it on Mac, at least for the time being.