FS#69115 - [libftdi] 1.5-1 incorrect include path from 'pkgconfig --cflags libftdi1'
Attached to Project:
Community Packages
Opened by Antonio Borneo (borneoa) - Saturday, 26 December 2020, 11:50 GMT
Last edited by Toolybird (Toolybird) - Monday, 03 April 2023, 03:37 GMT
Opened by Antonio Borneo (borneoa) - Saturday, 26 December 2020, 11:50 GMT
Last edited by Toolybird (Toolybird) - Monday, 03 April 2023, 03:37 GMT
|
Details
Description:
This is a bug in libftdi v1.5 (apparently already present before), regression triggered in Arch package 1.5-1 that adds the compile flag '-DFTDIPP=ON', fixed mainline by commit cdb28383402d. By adding flag '-DFTDIPP=ON' in PKGCONFIG both C and C++ version of libftdi are built. The include files for C and C++ are installed in separate folders: - /usr/include/libftdi1/ftdi.h - /usr/include/libftdipp1/ftdi.hpp but 'pkgconfig --cflags libftdi1' reports only the latter path: -I/usr/include/libftdipp1 -I/usr/include/libusb-1.0 thus breaking the builds in C for packages (e.g. OpenOCD) that include <ftdi.h>. The mainline fix installs both include files in the same folder. Additional info: * package version(s) 1.5-1 * config and/or log files etc. * link to upstream bug report, if any http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=cdb28383402d248dbc6062f4391b038375c52385 http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00011.html http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00013.html http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html Steps to reproduce: Build OpenOCD with libftdi-1.5-1 installed and without libftdi-compat git clone http://openocd.zylin.com/openocd cd openocd ./bootstrap ./configure make Build halts with error due to missed include file ftdi.h src/jtag/drivers/libftdi_helper.h:6:10: fatal error: ftdi.h: No such file or directory It build correctly with libftdi-1.4-6 installed |
This task depends upon
Closed by Toolybird (Toolybird)
Monday, 03 April 2023, 03:37 GMT
Reason for closing: Fixed
Additional comments about closing: libftdi 1.5-2
Monday, 03 April 2023, 03:37 GMT
Reason for closing: Fixed
Additional comments about closing: libftdi 1.5-2
I have no idea why the compile flag has been added in Arch package 1.5-1.
only `/usr/lib/pkgconfig/libftdi1.pc` would need to be modified to include `/usr/include/ftdi1` (instead of `/usr/include/ftdipp1`.
ie:
```
sed -i 's@/usr/include/ftdipp1@/usr/include/ftdi1@g' $pkgdir/usr/lib/pkgconfig/libftdi1.pc
```
Thanks, the ticket can be closed.