Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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 Doug Newgard (Scimmia) - Saturday, 26 December 2020, 13:51 GMT
Task Type Bug Report
Category Upstream Bugs
Status Assigned
Assigned To Kyle Keen (keenerd)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

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

Comment by Antonio Borneo (borneoa) - Saturday, 26 December 2020, 15:21 GMT
Actually the simple fix can be either adding the upstream patch cdb28383402d or removing the compile flag '-DFTDIPP=ON'.
I have no idea why the compile flag has been added in Arch package 1.5-1.
Comment by Sebastien Binet (bins) - Wednesday, 03 February 2021, 13:52 GMT
actually, `/usr/lib/pkgconfig/libftdipp1.pc` can be left alone.
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
```
Comment by Jordan Waughtal (jordanwaugthal) - Saturday, 20 March 2021, 15:20 GMT
Looks like it is fixed in 1.5-2
Comment by Antonio Borneo (borneoa) - Saturday, 20 March 2021, 17:38 GMT
Yes, I confirm 1.5-2 in testing fixes this issue.
Thanks, the ticket can be closed.

Loading...