[PATCH] remove -I/usr/include in pkg-config

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Sylvain Munaut 246tnt at gmail.com
Fri Apr 21 22:42:27 UTC 2017


> In both cases, the maintainers state that the right solution is to not do -I
> /usr/include. AFAICT, this means there are two options:

Not really no ...

They say to not use the -isystem /usr/include

My opinion there is that qmake is broken doing the translation from
-Ixxx to -isystem xxx blindly when both don't have _exactly_ the same
semantic. QMake should check the system include list when doing the
translation and omit the system ones to compensate for the difference
of behavior of -I vs -isystem.


> (a) Don't export -I /usr/include in the .pc file.
>
> (b) Manually remove -I /usr/include for anyone who compiles with GCC 6 and
> needs to use rtl-sdr.
>
> Solution (a) seems cleaner to me. If you have another way that avoids
> breaking packages that include rtl-sdr and use GCC 6, I'm happy to hear it.

Well (a) is fine ... but you can only remove /usr/include ... not ${includedir}

So you need to test is includedir is indeed /usr/include and then you
can omit it but if not, then you need to leave it.

Cheers,

   Sylvain



More information about the osmocom-sdr mailing list