Closed mkoeppe closed 3 years ago
Is there a standard way to deal with that?
One way is to have alternative include statements, eg on non-Fedora systems
#include <arb.h>
and on Fedora
#include <arb/arb.h>
it depends on the build system;
no idea about cmake; with autotools one can certainly try searching for different headers, and e.g. set up CPPFLAGS with -I/usr/include/arb
Though that is precisely against what Fedora is trying to do : avoid name conflicts for header files.
I'd say that using <arb.h>
in the 1st place was a mistake
I also agree with that. And this is what Fedora "solved" by moving the headers in /usr/incude/arb
.
To deal with the similar situation with cddlib, in LattE we check the (relative) header prefixes that occur in the wild (https://github.com/latte-int/latte/blob/master/m4/cddlib-check.m4#L28) and use configuration variables in the #include - see https://github.com/latte-int/latte/blob/master/code/latte/latte_cddlib.h#L33
Has upstream arb agreed to this change? Otherwise, I tend to say that Fedora users should add the extra -I
to their CPPFLAGS.
I'd vote to improve the error message for Fedora users but not actually introduce any convoluted logic for this.
This is how Fedora installs the headers, see https://trac.sagemath.org/ticket/