[cairo] AC_TRY_RUN vs crosscompile

Uli Schlachter psychon at znc.in
Fri Apr 14 16:20:32 UTC 2017

On 14.04.2017 07:23, Enrico Weigelt, metux IT consult wrote:
> On 12.04.2017 19:14, Uli Schlachter wrote:
>> Looking at the C code, there is just one "#ifdef
>> IPC_RMID_DEFERRED_RELEASE" and that just does an XSync() if that feature
>> is not there, so this is just a minor performance optimisation. Always
>> doing that XSync() causes no problems.
> As the test is likely to fail on many automated build machineries (and
> indeed could give false results - the same arch doesn't necessarily
> mean it will be working on the target),

I think "Linux" means that it will still work at runtime, but I don't
know the details. Why would this be arch specific?

> wouldn't it be better to have an explicit configure flag for that ?

No one would use such a configure flag. Configure's job is to figure out
details of the target system and this is just such a detail.

>>> It also checks for sysv-ipc headers ... is there any chance that some
>>> system could have xlib and xext, but no sysv-ipc headers at all ?
>> I bet that someone somewhere has such a system. How well cairo works
>> there is another question...
> Could we dare to just remove that checks and wait until really somebody
> comes around w/ a breaking system ?

TL;DR: I don't think so.

Which check exactly? The one which checks if shmat() after deletion
still works? That's sounds too much like "We only care about Linux" for
my taste. Also, this check works around a race condition and debugging
race conditions is nasty. So the bug report would be "I have a system
that only relatively few people use and suddenly cairo causes weird
'Invalid Value' errors and breaks". No one without such a system would
be able to debug this and so this would likely just stay broken.

> OTOH, we should also think of making that an explicit build-time check,
> as certain target systems (especially embedded) might not have it
> enabled in the kernel (while still having the headers).

"It" is shared memory, right?

If it's not enabled in the kernel, the function for "get me some shared
memory area" will fail and cairo will fall back to the "slow" XImage
stuff at runtime.

ā€œIā€™m Olaf and I like warm hugs.ā€

More information about the cairo mailing list