Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766818 - dev-embedded/libftdi-1.5[cxx]: pkgconfig files broken
Summary: dev-embedded/libftdi-1.5[cxx]: pkgconfig files broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
: 767304 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-24 09:34 UTC by jannis
Modified: 2022-11-10 05:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jannis 2021-01-24 09:34:04 UTC
I've discovered several build errors when packages (openocd for example) try to build against libftdi-1.5. Against libftdi-1.4-r1, all is good.

I've tracked this down to the pkgconfig files that come with libftdi-1.5. The following headers are installed:
/usr/include/libftdi1/ftdi.h
/usr/include/libftdipp1/ftdi.hpp

And two pkg-config files (content only the relevant line):
/usr/lib64/pkgconfig/libftdi1.pc:
includedir=/usr/include/libftdipp1

/usr/lib64/pkgconfig/libftdipp1.pc:
includedir=/usr/include/libftdipp1


One can see that in libftdi1.pc, the includepath seems incorrect, it should be /usr/include/libftdi1. Programs looking for "ftdi.h" in "/usr/include/libftdipp1" fail to compile.

I didn't yet check if the problem is upstream or in Gentoo's ebuild, I wanted to create the bug first
Comment 1 Ionen Wolkens gentoo-dev 2021-01-24 10:12:30 UTC
With USE=-cxx both use the same /usr/include/libftdi1, which seems inline with how 1.4-r1 was setup given the cxx include was in the same directory.

But with 1.5 and USE=cxx the includes are now split, while identical path is set in both as you describe.
Comment 2 jannis 2021-01-25 13:14:09 UTC
True, setting USE="-cxx" solves the problem, thanks for pointing this out!
Also affected (build failing due to ftdi.h not being found):
=sci-libs/libsigrok-0.5.2-r1::gentoo
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-27 18:09:39 UTC
*** Bug 767304 has been marked as a duplicate of this bug. ***
Comment 4 Larry the Git Cow gentoo-dev 2021-01-27 18:25:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f1bc5344dd6e0482771040b604299c668786dfa

commit 6f1bc5344dd6e0482771040b604299c668786dfa
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-01-27 18:25:38 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-01-27 18:25:43 +0000

    dev-embedded/libftdi: fix pkgconfig files with USE=cxx
    
    Closes: https://bugs.gentoo.org/766818
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-embedded/libftdi/libftdi-1.5-r1.ebuild | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 5 Martin Gysel (bearsh) 2021-03-09 20:04:57 UTC
I think this bug isn't fully solved because when building with cxx enabled, the libftdipp1.pc should also set -I/usr/include/libftdi1 as ftdi.hpp includes ftdi.h (which is in /usr/include/libftdi1)

furthermore the same also applies to the cmake file
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-09 20:06:38 UTC
(In reply to Martin Gysel (bearsh) from comment #5)
> I think this bug isn't fully solved because when building with cxx enabled,
> the libftdipp1.pc should also set -I/usr/include/libftdi1 as ftdi.hpp
> includes ftdi.h (which is in /usr/include/libftdi1)
> 
> furthermore the same also applies to the cmake file

Can you file a new bug?
Comment 7 Martin Gysel (bearsh) 2021-03-09 20:18:36 UTC
(In reply to Martin Gysel (bearsh) from comment #5)
> I think this bug isn't fully solved because when building with cxx enabled,
> the libftdipp1.pc should also set -I/usr/include/libftdi1 as ftdi.hpp
> includes ftdi.h (which is in /usr/include/libftdi1)
> 
> furthermore the same also applies to the cmake file

probably I was wrong about the pkg-config files but there's a bug in the cmake files, which is addressed in this commit:
http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=cdb28383402d248dbc6062f4391b038375c52385;hp=5c2c58e03ea999534e8cb64906c8ae8b15536c30
Comment 8 Martin Gysel (bearsh) 2021-03-09 20:22:46 UTC
(In reply to Sam James from comment #6)

> Can you file a new bug?

done bug 775116
Comment 9 Larry the Git Cow gentoo-dev 2022-11-10 05:10:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d13210666e659d12f068b61c96f83c29005ec30

commit 7d13210666e659d12f068b61c96f83c29005ec30
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-10 05:07:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-10 05:09:22 +0000

    dev-embedded/libftdi: drop obsolete sed for .pc files
    
    Closes: https://bugs.gentoo.org/880659
    Bug: https://bugs.gentoo.org/766818
    Signed-off-by: Sam James <sam@gentoo.org>

 .../libftdi/{libftdi-1.5-r3.ebuild => libftdi-1.5-r4.ebuild}  |  7 -------
 dev-embedded/libftdi/libftdi-9999.ebuild                      | 11 ++---------
 2 files changed, 2 insertions(+), 16 deletions(-)