On Wednesday, June 19, 2019 at 8:37:29 AM UTC-4, Ben Noordhuis wrote: > > On Wed, Jun 19, 2019 at 2:28 PM Joseph Van Riper > <[email protected] <javascript:>> wrote: > > > > CMake uses this library for some of its work, but it doesn't compile on > Linux kernels previous to 2.6.27 thanks to a missing epoll_create1 function > introduced in 2.6.26. > > > > I can provide an update that would address this by using preprocessor > directives to test the kernel version and appropriately use epoll_create or > epoll_create1, but in testing, I still see five tests failing (within my > use case): >
[snip] I agree the test failures are unrelated to your change. > > As to the change itself, libuv does feature detection at runtime, not > compile time. Rather than sniffing system headers, it makes the system > call directly (using syscall()) and checks for ENOSYS. > > We used to have wrappers for epoll until not too long ago but I > removed those in https://github.com/libuv/libuv/pull/1372 and now > libuv goes through libc. I'd be okay with restoring the wrappers for > epoll_create() and epoll_create1() if that helps out cmake as long as > it's understood that it comes with absolutely no promise of support. > > You're welcome to open a pull request. Check the other pull request to > see how to implement it. > After some more research, I've decided against trying to make this work for this use case. I found CMake test errors with the current version of CMake while trying to do this with a version of libuv that does not fail libuv's tests. This means, to get my use case to work correctly, one would not only need to address the issues I found in libuv, but also the ones in CMake. Ergo, after some thinking about this problem, I've decided upon another approach that shouldn't involve coercing 3rd party modern code to work in ancient environments, yet should still allow me to use these current versions. This kind of problem is mine, and shouldn't require other projects to conform to my needs (and the inevitable maintenance issues thereafter). As for the changes I intended to make, they were necessary to get libuv to build. I had created a docker image with a 2.6.26 linux kernel, then used git to pull libuv. I found I couldn't compile libuv in this environment without either the compiler or the linker (I forget which) complaining about epoll_create1 missing. Had I examined the existing code more carefully, I would have noticed it calling epoll_create() anyway when the previous call failed, so I shouldn't have bothered with that EPOLL_IGNORE_SIZE code. Thank you for your response, and I hope all goes well in your neck of the woods. -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/libuv. To view this discussion on the web visit https://groups.google.com/d/msgid/libuv/19b7de0b-c304-4b52-b583-65830fb92792%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
