We don't depend on the platform supplied libevent when building Thrift – we point to our own build. Further, we build libevent statically, so there are no shared objects to link against.
Unfortunate, the Thrift configure scripts fail to detect libevent. There are two problems. First, when static linking libevent, it complains about missing references to clock_gettime etc. This is easily fixed by settings LIBS to '-lrt' when running 'configure'. Thrift still fails to detect libevent because of the second issue: even with -lrt available, 'configure' is not able to compile the levent test program. This is because the GNU linked ('ld') is sensitive to the order in which libraries are specified.
Specifically, libraries that depend on other libraries should appear first (see , ). The following patch fixes the problem:
Note: this doesn't affect zlib because it doesn't have any dependencies on system libraries.