Helmut Grohne <[email protected]> writes: > libqb fails to cross build from source, because it uses an uncached > AC_RUN_IFELSE for determining whether CLOCK_MONOTONIC works. That check > is flawed in that availability of CLOCK_MONOTONIC is a runtime property > and may change from system to system.
Hi, Thanks for the report! Unfortunately, I'm somewhat lost with this issue. The configure check was added for Hurd support. Apparently, Hurd defines _POSIX_MONOTONIC_CLOCK to 200809L, returns the same value for a sysconf() query, but clock_getres (CLOCK_MONOTONIC, &ts) still fails with EINVAL. According to my reading of the documentation, this should not happen. > The attached patch makes it check whether CLOCK_MONOTONIC is declared > and only then try whether it works. In case of cross compilation, > CLOCK_MONOTONIC is assumed to work if available, which seems like a > reasonable guess to me. Unfortunately that's not the case with Hurd. > After applying the patch, libqb cross builds successfully. Can you > take it? I think it wouldn't create a working binary when cross-compiled to Hurd. That's certainly an improvement, but I'd prefer something better... -- Regards, Feri

