From ca79171aafc17fde0beadf5adee7be92febe8ff5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 24 Jun 2016 14:43:37 +0530 Subject: [PATCH] Better error message when failing to load monotonic on systems with an outdated glibc --- src/calibre/utils/monotonic.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/utils/monotonic.py b/src/calibre/utils/monotonic.py index da6c88249e..1deadbaf61 100644 --- a/src/calibre/utils/monotonic.py +++ b/src/calibre/utils/monotonic.py @@ -4,6 +4,10 @@ from calibre.constants import plugins monotonicp, err = plugins['monotonic'] if err: + # This happens on systems with very old glibc that does not + # have clock_gettime() (glibc < 2.17 http://stackoverflow.com/a/32649327) + if 'undefined symbol: clock_gettime' in err: + raise RuntimeError('Your glibc version is too old, glibc >= 2.17 is required') raise RuntimeError('Failed to load the monotonic module with error: ' + err) monotonic = monotonicp.monotonic del monotonicp, err