Gah, thanks Brian and Chris -- yes, I had forgotten. I initialized it once
on a separate development environment and forgot to do so again.
Thanks everyone! I managed to build the project. :)
I'll try getting SourceKit to link against my built libdispatch. Does
anyone have any thoughts on my second question? Would it make sense to move
SourceKit over to C++ async features? SourceKit only uses the following
libdispatch symbols:
1. Having libdispatch built as part of all Swift builds that build
SourceKit. On OS X, most buildbot presets build SourceKit. I'd like to do
the same for Linux.
2. Building libdispatch prior to building Swift, or at least prior to
building Swift tools like SourceKit.
On Mon, May 30, 2016 at 12:19 PM, Chris Bailey <BAILEYC@uk.ibm.com > <javascript:_e(%7B%7D,'cvml','BAILEYC@uk.ibm.com');>> wrote:
The missing reference is to 'pthread_workqueue_signal_np()' which was
added to libpwq via PR #10:
thread manager signaling interface to allow libdispatch to force thre… by frankeh · Pull Request #10 · mheily/libpwq · GitHub
I suspect that you don't have the libpwq submodule checked out in
swift-corelibs-libdispatch. Is there any contents in
swift-corelibs-libdispatch/libpwq?
If not, running:
git submodule init
git submodule update
from the swift-corelibs-libdispatch directory should fix it.
Chris
From: Brian Gesiak <modocache@gmail.com
<javascript:_e(%7B%7D,'cvml','modocache@gmail.com');>>
To: Chris Bailey/UK/IBM@IBMGB
Cc: Rob Allen <rob@akrabat.com
<javascript:_e(%7B%7D,'cvml','rob@akrabat.com');>>, Swift Core Libs <
swift-corelibs-dev@swift.org
<javascript:_e(%7B%7D,'cvml','swift-corelibs-dev@swift.org');>>
Date: 30/05/2016 16:51
Subject: Re: [swift-corelibs-dev] libdispatch on Linux, or C++
std::async?
------------------------------
Thanks for the quick responses!
I had tried the experimental/foundation branch as well, with no luck.
Here's the full output from a clean build I just attempted:
*gist:fcf0c78908b39834448c73ac3f50c110 · GitHub*
<https://gist.github.com/modocache/fcf0c78908b39834448c73ac3f50c110>
Prior to the build I removed my entire build directory (which included
both libdispatch-linux-x86_64 and swift-linux-x86_64) and removed all build
artifacts from my libdispatch directory (I used `git clean -fxd` -- Make
tells me there's no target `distclean`).
Looking at the build failure, it appears to be the same one that was
reported in *[SR-1242] undefined reference to `pthread_workqueue_signal_np' · Issue #747 · apple/swift-corelibs-libdispatch · GitHub*
<https://bugs.swift.org/browse/SR-1242>\. The author of that report
indicates that
*Another fix for libpwq configuration by dgrove-oss · Pull Request #64 · apple/swift-corelibs-libdispatch · GitHub*
<https://github.com/apple/swift-corelibs-libdispatch/pull/64> fixes the
problem. My checkout includes the commits from that pull request, but the
problem remains.
In any case, thanks for all your help! I'll keep trying. Any and all
advice would be much appreciated!
- Brian Gesiak
On Mon, May 30, 2016 at 10:22 AM, Chris Bailey <*BAILEYC@uk.ibm.com* >> <javascript:_e(%7B%7D,'cvml','BAILEYC@uk.ibm.com');>> wrote:
I'd certainly recommend picking up the experimental/foundation branch as
Rob recommends. Its where we've been doing some additional work to get
properly built into the Swift toolchain and to open up some internal APIs
needed by Foundation.
Whilst I've been building Dispatch either independently or as part of a
full toolchain using the buildbot_linux preset (with dispatch and
install-dispatch added), I've just checked your build line and its working
fine for me. It might be worth cleaning out any partial build you might
have of libdispatch in your build directory, and running 'make distclean'
from your libdispatch source directory.
FYI, we've got some further changes to the experimental/foundation branch
of libdispatch with should land in the next couple of days. This fixes some
issues with the Swift overlay, and resolves a crash that we've found in the
underlying libkqueue implementation.
Chris
From: Rob Allen via swift-corelibs-dev <
*swift-corelibs-dev@swift.org*
<javascript:_e(%7B%7D,'cvml','swift-corelibs-dev@swift.org');>>
To: Brian Gesiak <*modocache@gmail.com*
<javascript:_e(%7B%7D,'cvml','modocache@gmail.com');>>
Cc: Swift Core Libs <*swift-corelibs-dev@swift.org*
<javascript:_e(%7B%7D,'cvml','swift-corelibs-dev@swift.org');>>
Date: 30/05/2016 08:08
Subject: Re: [swift-corelibs-dev] libdispatch on Linux, or C++
std::async?
Sent by: *swift-corelibs-dev-bounces@swift.org*
<javascript:_e(%7B%7D,'cvml','swift-corelibs-dev-bounces@swift.org');>
------------------------------
Hi,
For what it's worth, I can't get the master branch to build either, but I
can get the experimental/foundation branch to build.
Regards,
Rob....
On 30 May 2016, at 05:28, Brian Gesiak via swift-corelibs-dev < >> *swift-corelibs-dev@swift.org* >> <javascript:_e(%7B%7D,'cvml','swift-corelibs-dev@swift.org');>> wrote:
Hello all!
I'm working on *[SR-710] Generate XCTestCaseProvider entries on Linux · Issue #5320 · apple/swift-package-manager · GitHub*
<Issues · apple/swift-issues · GitHub, which involves porting SourceKit
to Linux. SourceKit contains a handful of references to libdispatch symbols.
I have two questions:
1. Could someone share a set of instructions to build
swift-corelibs-libdispatch on Linux? I'm using Ubuntu 15.10 and have
installed [the dependencies listed here](
*[swift-corelibs-dev] libdispatch build issue*
<https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20151207/000122.html>\).
I have tried using both `swift/utils/build-script --libdispatch` as well as
the instructions in the swift-corelibs-libdispatch `INSTALL` file. Both
fail with the [same errors](
*gist:8389d5d64e39ca5a4281500f84e9ce11 · GitHub*
<https://gist.github.com/modocache/8389d5d64e39ca5a4281500f84e9ce11>\).
Any tips?
2. I don't know much about C++, but from what I understand the C++ stdlib
provides tools for asynchronous programming. I list SourceKit's uses of
libdispatch in a comment on *[SR-1639] [SourceKit] Add in-process implementations of sourcekitd functions only defined for XPC · Issue #5268 · apple/swift-package-manager · GitHub*
<https://bugs.swift.org/browse/SR-1639>\. For those familiar with both
C++ and libdispatch: do you think it's a good idea to migrate to C++, at
least for now?
Any advice would be appreciated. Thanks!!
- Brian Gesiak
--
Development thoughts at *http://akrabat.com* <http://akrabat.com/>
Daily Jotter for Mac OS X at *http://dailyjotter.com*
<Daily Jotter;
_______________________________________________
swift-corelibs-dev mailing list
*swift-corelibs-dev@swift.org*
<javascript:_e(%7B%7D,'cvml','swift-corelibs-dev@swift.org');>
*https://lists.swift.org/mailman/listinfo/swift-corelibs-dev*
<https://lists.swift.org/mailman/listinfo/swift-corelibs-dev>