Adding kqueue lib to libdispatch test Makefile


(Ron Olson) #1

Hi all-

I'm trying to build Swift 3 for Fedora 24. Fedora doesn't come with libkqueue so I built and installed that manually into /usr/(include|lib). Building libdispatch as part of the build script fails when trying to build the tests in swift-corelibs-libdispatch/tests because it can't find kqueue and kevent. If I modify the Makefile to include -lkqueue after -lpthread, it builds fine, but running the build script again (swift/util/build-script) complains about the directory not being clean.

What I'd like to do (I think) is modify ... something ... to make sure the Makefile in the tests directory includes kqueue; I've been diving into the build-settings.ini, as well as the various scripts, but CMake and Ninja are new to me and I'm a little flummoxed about what to modify (and hopefully bubble those changes up to a buildbot_linux_fedora or something like that). I've been poking around the various scripts (the most promising was the LIBDISPATCH_BUILD_ARGS in build-script-impl, but adding -lkqueue doesn't seem to have any effect).

So if somebody could give me a pointer (so to speak) about where to look, I'd greatly appreciate it.

Thanks,

Ron


(Dave Grove) #2

Hi Ron,

  The libdispatch build attempts to statically embed the right version
of libkqueue into libdispatch when you build from source. As part of
porting libdispatch to Linux, we contributed bugfixes and extensions to
libkqueue that libdispatch requires.

  If you are building libdispatch from a git clone, if you do "git
submodule init; git submodule update" in swift-corelibs-libdispatch before
you do the build it will get you the right version of libkqueue and libpwq
sources and the build should "just work".

  There are more details in the INSTALL.md file (see the Building on
Linux section).

Hope that helps,

--dave

···

swift-dev-bounces@swift.org wrote on 09/14/2016 01:34:10 PM:

I'm trying to build Swift 3 for Fedora 24. Fedora doesn't come with
libkqueue so I built and installed that manually into
/usr/(include|lib). Building libdispatch as part of the build script
fails when trying to build the tests in swift-corelibs-libdispatch/tests
because it can't find kqueue and kevent. If I modify the Makefile to
include -lkqueue after -lpthread, it builds fine, but running the build
script again (swift/util/build-script) complains about the directory not
being clean.

What I'd like to do (I think) is modify ... something ... to make sure
the Makefile in the tests directory includes kqueue; I've been diving
into the build-settings.ini, as well as the various scripts, but CMake
and Ninja are new to me and I'm a little flummoxed about what to modify
(and hopefully bubble those changes up to a buildbot_linux_fedora or
something like that). I've been poking around the various scripts (the
most promising was the LIBDISPATCH_BUILD_ARGS in build-script-impl, but
adding -lkqueue doesn't seem to have any effect).

So if somebody could give me a pointer (so to speak) about where to
look, I'd greatly appreciate it.