Page 1 of 1

How do I build libdivecomputer?

Posted: Wed Nov 23, 2011 3:16 am
by henrik
In the How to report dive computer download problems? topic, you provide libdivecomputer test binaries. These work great, but I'm unable to build these myself with working USB support. What do I do wrong here?

Code: Select all

$ cd libusb
$ ./configure --prefix /Users/henrik/local
$ make clean; make; make install
$ cd ../libdivecomputer
$ ./configure --prefix /Users/henrik/local LIBUSB_CFLAGS="-I${HOME}/local/include" LIBUSB_LIBS="-L${HOME}/local/lib -lusb-1.0"
$ make clean; make; make install
$ otool -L ~/local/bin/vyper
/Users/henrik/local/bin/vyper:
    /Users/henrik/local/lib/libdivecomputer.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /Users/henrik/local/lib/libusb-1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
    /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
$ ~/local/bin/vyper /dev/tty.SLAB_USBtoUART
DEVICE=/dev/tty.SLAB_USBtoUART, DELAY=500
suunto_vyper_device_open
TRACE (serial_posix.c:632, ioctl): Inappropriate ioctl for device (25)
suunto_vyper.c:144: Failed to set the DTR line.
suunto_vyper_test.c:38: Error opening serial port.
suunto_vyper_device_open
TRACE (serial_posix.c:632, ioctl): Inappropriate ioctl for device (25)
suunto_vyper.c:144: Failed to set the DTR line.
suunto_vyper_test.c:71: Error opening serial port.
Just as a comparison, here's the MacDive binary:

Code: Select all

$ otool -L ~/Downloads/vyper
/Users/henrik/Downloads/vyper:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.10)
$ ~/Downloads/vyper /dev/tty.SLAB_USBtoUART
DATETIME 2011-11-22T19:06:56Z (1321988816)
REVISION 069797a08250262b19a84c9308ec7fbca3235fa2
DEVICE=/dev/tty.SLAB_USBtoUART, DELAY=500
suunto_vyper_device_open
Configure: baudrate=2400, databits=8, parity=2, stopbits=1, flowcontrol=0
Timeout: value=1000
DTR: value=1
Sleep: value=100
Flush: queue=3, input=0, output=0 

Re: How do I build libdivecomputer?

Posted: Wed Nov 23, 2011 3:34 am
by nick
You should email us directly, this forum is for MacDive discussion/support, not technical support for a third party library.

(Not intending to be rude, I would just like to keep the forum as clean as possible for people attempting to find solutions to common problems).

Re: How do I build libdivecomputer?

Posted: Wed Nov 23, 2011 3:58 am
by henrik
Sorry, I sent a PM to TnT a couple of days ago, but I guess I've been too impatient. Also, libdivecomputer doesn't seem to have a mailing list, and I thought others might be interested in this as well.

I'll try to be on topic from now on :)

Re: How do I build libdivecomputer?

Posted: Wed Nov 23, 2011 4:14 am
by nick
All good, I'm sure he'll see it - he's quite busy these days!

There is a mailing list, if TnT hasn't gotten back to you later today I will dig up the details when I get home.

Maybe I could set up a subforum for more technical discussions like this? I would just really like to keep Support as clean as possible - I still get a large number of emails for missing drivers etc so the easier it is to find answers for that, the better.

Re: How do I build libdivecomputer?

Posted: Wed Nov 23, 2011 4:21 am
by henrik
I'm in contact with him now, thanks for your feedback.