- **Component**:  --> libftdi1
- **Priority**:  --> high
- **Type**:  --> change request
- **Comment**:

libftdi1 have changed the API from 1.4 (2017-08-07) to 1.5 (2020-07-07)
At a first check, seams enough replacing ftdi_usb_purge_buffers() with 
ftdi_tcioflush().
The prototype of the functions is exactly the same, so simply run
sed -i s/ftdi_usb_purge_buffers/ftdi_usb_purge_buffers/ 
src/jtag/drivers/{openjtag.c,presto.c}

The difficoult part now is to make 'configure' able to detect the current 
version of libftdi1 and force using one of the two API.

We are going to deliver OpenOCD v0.11.0 soon, and the we should stop merging 
new features in ~10 days. I would like to see this fixed in time for v0.11.0 to 
avoid creating an hard dependency with libftdi1 1.4.





---

** [tickets:#286] Deprecated warnings with libftdi 1.5**

**Status:** new
**Milestone:** 0.10.0
**Created:** Tue Oct 27, 2020 04:12 PM UTC by MrLavender
**Last Updated:** Tue Oct 27, 2020 04:12 PM UTC
**Owner:** nobody


The build fails with libftdi 1.5 because of deprecated warnings and -Werror. 
I'm sorry I don't have time to investigate further, I just worked around it 
using `CFLAGS="-g -O2 -Wno-deprecated"` with `configure`.

```
src/jtag/drivers/presto.c:163:6: error: 'ftdi_usb_purge_buffers' is deprecated
      [-Werror,-Wdeprecated-declarations]
        if (ftdi_usb_purge_buffers(&presto->ftdic) < 0) {
            ^
/usr/local/Cellar/libftdi/1.5/include/libftdi1/ftdi.h:566:9: note:
      'ftdi_usb_purge_buffers' has been explicitly marked deprecated here
    int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
        ^
/usr/local/Cellar/libftdi/1.5/include/libftdi1/ftdi.h:247:42: note: expanded
      from macro 'DEPRECATED'
#define DEPRECATED(func) __attribute__ ((deprecated)) func
                                         ^
src/jtag/drivers/presto.c:177:7: error: 'ftdi_usb_purge_buffers' is deprecated
      [-Werror,-Wdeprecated-declarations]
                if (ftdi_usb_purge_buffers(&presto->ftdic) < 0)
                    ^
/usr/local/Cellar/libftdi/1.5/include/libftdi1/ftdi.h:566:9: note:
      'ftdi_usb_purge_buffers' has been explicitly marked deprecated here
    int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
        ^
/usr/local/Cellar/libftdi/1.5/include/libftdi1/ftdi.h:247:42: note: expanded
      from macro 'DEPRECATED'
#define DEPRECATED(func) __attribute__ ((deprecated)) func
                                         ^
2 errors generated.
```



---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to