Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Rob Allen via swift-corelibs-dev
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 
>  wrote:
> 
> Hello all!
> 
> I'm working on https://bugs.swift.org/browse/SR-710 
> , 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](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](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 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
Daily Jotter for Mac OS X at http://dailyjotter.com

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Chris Bailey via swift-corelibs-dev
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 
To: Brian Gesiak 
Cc: Swift Core Libs 
Date:   30/05/2016 08:08
Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++ 
std::async?
Sent by:swift-corelibs-dev-boun...@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> wrote:

Hello all!

I'm working on https://bugs.swift.org/browse/SR-710, 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](
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](
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 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
Daily Jotter for Mac OS X at http://dailyjotter.com
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Brian Gesiak via swift-corelibs-dev
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:
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 https://bugs.swift.org/browse/SR-1242. The author of that
report indicates that
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  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>
> To:Brian Gesiak 
> Cc:Swift Core Libs 
> Date:30/05/2016 08:08
> Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++
> std::async?
> Sent by:swift-corelibs-dev-boun...@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* > wrote:
>
> Hello all!
>
> I'm working on *https://bugs.swift.org/browse/SR-710*
> , 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](
> *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](
> *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 *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* 
> Daily Jotter for Mac OS X at *http://dailyjotter.com*
> 
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Brian Croom via swift-corelibs-dev
I've noticed that there is a submodule reference to libpwq (see
https://github.com/apple/swift-corelibs-libdispatch/blob/master/.gitmodules).
Is it possible that the submodule hasn't been initialized in your clone?

måndag 30 maj 2016 skrev Brian Gesiak via swift-corelibs-dev <
swift-corelibs-dev@swift.org>:

> 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:
> 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 https://bugs.swift.org/browse/SR-1242. The author of that
> report indicates that
> 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  > 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
>> >
>> To:Brian Gesiak > >
>> Cc:Swift Core Libs > >
>> Date:30/05/2016 08:08
>> Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++
>> std::async?
>> Sent by:swift-corelibs-dev-boun...@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*
>> > wrote:
>>
>> Hello all!
>>
>> I'm working on *https://bugs.swift.org/browse/SR-710*
>> , 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](
>> *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](
>> *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 *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* 
>> Daily Jotter for Mac OS X at *http://dailyjotter.com*
>> 
>> ___
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev@swift.org
>> 
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>>
>>
>>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Rob Allen via swift-corelibs-dev
The steps that I use are:

$ cd /vagrant
$ git clone --recursive -b experimental/foundation 
https://github.com/apple/swift-corelibs-libdispatch.git
$ cd swift-corelibs-libdispatch
$ sh ./autogen.sh
$ ./configure 
--with-swift-toolchain=/home/vagrant/swiftenv/versions/DEVELOPMENT-SNAPSHOT-2016-05-03-a/usr
 --prefix=/home/vagrant/swiftenv/versions/DEVELOPMENT-SNAPSHOT-2016-05-03-a/usr
$ make
$ make install



Regards,

Rob...

> On 30 May 2016, at 16:50, Brian Gesiak  wrote:
> 
> 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: 
> 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 https://bugs.swift.org/browse/SR-1242 
> . The author of that report indicates 
> that 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  > 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  > 
> To:Brian Gesiak mailto:modoca...@gmail.com>> 
> Cc:Swift Core Libs  > 
> Date:30/05/2016 08:08 
> Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++ 
> std::async? 
> Sent by:swift-corelibs-dev-boun...@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 
> mailto:swift-corelibs-dev@swift.org>> wrote: 
> 
> Hello all! 
> 
> I'm working on https://bugs.swift.org/browse/SR-710 
> , 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](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](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 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 
> Daily Jotter for Mac OS X at http://dailyjo

Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Chris Bailey via swift-corelibs-dev
The missing reference is to 'pthread_workqueue_signal_np()' which was 
added to libpwq via PR #10:
https://github.com/mheily/libpwq/pull/10

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 
To: Chris Bailey/UK/IBM@IBMGB
Cc: Rob Allen , Swift Core Libs 

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: 
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 https://bugs.swift.org/browse/SR-1242. The author of that 
report indicates that 
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  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> 
To:Brian Gesiak  
Cc:Swift Core Libs  
Date:30/05/2016 08:08 
Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++ 
std::async? 
Sent by:swift-corelibs-dev-boun...@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> wrote: 

Hello all! 

I'm working on https://bugs.swift.org/browse/SR-710, 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](
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](
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 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
Daily Jotter for Mac OS X at http://dailyjotter.com 
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev




___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread David P Grove via swift-corelibs-dev

Hi,

my guess is you missed the git submodule init and update step in
setting up your libdispatch checkout.  If the libpwq directory is empty,
this is certainly what happened (and is why it isn't invoking auotconf
recursively on libpwq).  Buried at the bottom of the INSTALL file:

Initialize git submodules:
  We are using git submodules to incorporate a specific revision of the
  upstream pthread_workqueue library into the build.
git submodule init
git submodule update

--dave




From:   Brian Gesiak via swift-corelibs-dev

To: Chris Bailey 
Cc: Swift Core Libs 
Date:   05/30/2016 11:51 AM
Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++
std::async?
Sent by:swift-corelibs-dev-boun...@swift.org



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:
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 https://bugs.swift.org/browse/SR-1242. The author of that
report indicates that
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  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>
  To:        Brian Gesiak 
  Cc:        Swift Core Libs 
  Date:        30/05/2016 08:08
  Subject:        Re: [swift-corelibs-dev] libdispatch on Linux, or C++
  std::async?
  Sent by:        swift-corelibs-dev-boun...@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> wrote:

  Hello all!

  I'm working on https://bugs.swift.org/browse/SR-710, 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](
  
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](
  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 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
  Daily Jotter for Mac OS X at http://dailyjotter.com
  ___
  swift-corelibs-dev mailing list
  swift-corelibs-dev@swift.org
  https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


___
swift-corelibs-dev mailing list
swift-corelibs

Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Brian Gesiak via swift-corelibs-dev
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:

- dispatch_after
- dispatch_release
- dispatch_semaphore_create
- dispatch_semaphore_signal
- dispatch_semaphore_wait
- dispatch_time

As far as I understand, having SourceKit use libdispatch means:

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.

Moving these build dependencies around seems like more work than using C++
async, but I barely know C++, so I'm not sure. Thoughts?

- Brian Gesiak


On Mon, May 30, 2016 at 12:19 PM, Chris Bailey  wrote:

> The missing reference is to 'pthread_workqueue_signal_np()' which was
> added to libpwq via PR #10:
> https://github.com/mheily/libpwq/pull/10
>
> 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 
> To:Chris Bailey/UK/IBM@IBMGB
> Cc:Rob Allen , Swift Core Libs <
> 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:
> *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 *https://bugs.swift.org/browse/SR-1242*
> . The author of that report
> indicates that
> *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 <*bail...@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* >
> To:Brian Gesiak <*modoca...@gmail.com* >
> Cc:Swift Core Libs <*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-boun...@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* > wrote:
>
> Hello all!
>
> I'm working on *https://bugs.swift.org/browse/SR-710*
> , which involves porting SourceKit
> to Linux. SourceKit contains a handful of references to libdispatch symb

[swift-corelibs-dev] unable to build swift core foundation

2016-05-30 Thread Rajeev Jeyaraj via swift-corelibs-dev
Hi All,

I am trying to build the swift-corelibs-foundation

I followed the instructions from here:
https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/GettingStarted.md

At step 3, I am getting the following errors below.

   1. Run Xcode with the latest toolchain. Follow the instructions here
    to start Xcode with the
   correct toolchain.
   2. Open Foundation.xcworkspace.
   3. Build the *SwiftFoundation* target. This builds CoreFoundation and
   Foundation.



Foundation.build/Debug/SwiftFoundation.build/Objects-normal/x86_64/NSXMLDTDNode.swiftdeps
-o
/Users/Snuffles/Library/Developer/Xcode/DerivedData/Foundation-adgjiwkgknrodccxdwfsovunshof/Build/Intermediates/Foundation.build/Debug/SwiftFoundation.build/Objects-normal/x86_64/NSXMLDTDNode.o


*/Users/Snuffles/development/swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64:
error: cannot convert value of type 'UnsafeMutablePointer' (aka
'UnsafeMutablePointer<()>') to expected argument type
'OpaquePointer'let unmanaged =
Unmanaged.fromOpaque(privateData)*
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] unable to build swift core foundation

2016-05-30 Thread Philippe Hausler via swift-corelibs-dev
The toolcahins are in a bit of flux right now so you may need to build your own 
custom one. If you want you can build one via the easy command of 
./swift/utils/build-toolchain or if you need to be a bit more fancy (or want to 
only build partial slices of the toolchain) I posted a version of a script I 
personally use for iterating specific slices of the toolchain: 
https://gist.github.com/phausler/70c8a6c231fedd8a8008f6a6bbaf48d4 


Note: that script is something I use on my machine with hard coded paths so 
your mileage may vary; it is a brutal install phase that just erases the 
previous install of that identifier and copies the built product out. So be 
forwarded you can poke your eye out with this script.

Also after installing a new toolchain it is usually good to restart Xcode and 
clear your module cache just in case there is cruft lying around (when things 
get goofed up sometimes bad state can make it hard to work with things)

> On May 30, 2016, at 11:57 AM, Rajeev Jeyaraj via swift-corelibs-dev 
>  wrote:
> 
> Hi All,
> 
> I am trying to build the swift-corelibs-foundation
> 
> I followed the instructions from here: 
> https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/GettingStarted.md
>  
> 
> 
> At step 3, I am getting the following errors below.
> Run Xcode with the latest toolchain. Follow the instructions here 
>  to start Xcode with the correct 
> toolchain.
> Open Foundation.xcworkspace.
> Build the SwiftFoundation target. This builds CoreFoundation and Foundation.
> 
> 
> Foundation.build/Debug/SwiftFoundation.build/Objects-normal/x86_64/NSXMLDTDNode.swiftdeps
>  -o 
> /Users/Snuffles/Library/Developer/Xcode/DerivedData/Foundation-adgjiwkgknrodccxdwfsovunshof/Build/Intermediates/Foundation.build/Debug/SwiftFoundation.build/Objects-normal/x86_64/NSXMLDTDNode.o
> 
> /Users/Snuffles/development/swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift:242:64:
>  error: cannot convert value of type 'UnsafeMutablePointer' (aka 
> 'UnsafeMutablePointer<()>') to expected argument type 'OpaquePointer'
> let unmanaged = Unmanaged.fromOpaque(privateData)
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] libdispatch on Linux, or C++ std::async?

2016-05-30 Thread Brian Croom via swift-corelibs-dev
I have no hands-on experience with it itself, but my understanding is that
the std::async API in the current standards is pretty severely flawed and
makes it awfully easy to shoot yourself in the foot. On the other hand, the
libdispatch usage here does appear to be pretty basic.

Hopefully someone with more expertise can weigh in still!

måndag 30 maj 2016 skrev Brian Gesiak via swift-corelibs-dev <
swift-corelibs-dev@swift.org>:

> 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:
>
> - dispatch_after
> - dispatch_release
> - dispatch_semaphore_create
> - dispatch_semaphore_signal
> - dispatch_semaphore_wait
> - dispatch_time
>
> As far as I understand, having SourceKit use libdispatch means:
>
> 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.
>
> Moving these build dependencies around seems like more work than using C++
> async, but I barely know C++, so I'm not sure. Thoughts?
>
> - Brian Gesiak
>
>
> On Mon, May 30, 2016 at 12:19 PM, Chris Bailey  > wrote:
>
>> The missing reference is to 'pthread_workqueue_signal_np()' which was
>> added to libpwq via PR #10:
>> https://github.com/mheily/libpwq/pull/10
>>
>> 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 > >
>> To:Chris Bailey/UK/IBM@IBMGB
>> Cc:Rob Allen > >, Swift Core Libs <
>> 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:
>> *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 *https://bugs.swift.org/browse/SR-1242*
>> . The author of that report
>> indicates that
>> *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 <*bail...@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*
>> >
>> To:Brian Gesiak <*modoca...@gmail.com*
>> >
>> Cc:Swift Core Libs <*swift-corelibs-dev@swift.org*
>> >
>> Date:30/05/2016 08:08
>> Subject:Re: [swift-corelibs-dev] libdispatch on Linux, or C++
>> std::async?
>>