https://bugs.openldap.org/show_bug.cgi?id=10306

          Issue ID: 10306
           Summary: epoll, kqueue etc. are not used when cross compiling
           Product: OpenLDAP
           Version: 2.6.9
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: needs_review
          Severity: normal
          Priority: ---
         Component: build
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

OpenLDAP's build system relies on running test programs to see whether epoll or
kqueue are available, after checking the headers are available.  When cross
compiling, test programs can't be run, and even if they could, they wouldn't
produce useful results because they'd be testing the build machine.  Running
test programs like this isn't even a great idea for native builds, because the
package is still quite likely to end up running on a different machine than it
was built for — think about distro packages.

This means that cross-compiled OpenLDAP ends up using select, even though it
could almost certainly use epoll or kqueue.

The best thing to do for this sort of thing is to check at runtime whether the
epoll/kqueue/whatever is available, and fall back if not, but this would
probably be hard to implement in OpenLDAP.  Other, easier, things that could be
done to improve the situation would be:

• Assume that epoll/kqueue are available if the headers are.  It's very
unlikely nowadays that a system with the headers won't actually have the API
available.
• If the AC_RUN_IFELSE checks are staying, make sure that they're all
overridabel with configure flags or at least AC_CACHE_CHECK.

There are also uses of AC_RUN_IFELSE for pthreads, which presumably have the
same problem.

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to