build failure: DISPATCH_QUEUE_OVERCOMMIT

Not sure where to post this, but I'm having trouble building CoreFoundation in swift-DEVELOPMENT-SNAPSHOT-2016-02-25-due to some kind of libdispatch issue.

The exact error is

FAILED: mkdir -p `dirname ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o`; /swift-dev/build/buildbot_linux/llvm-linux-x86_64/bin/clang -fcolor-diagnostics -fdollars-in-identifiers -fblocks -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC --target=x86_64-linux-gnu -O2 -Ibootstrap/common/usr/include -Ibootstrap/common/usr/local/include -Ibootstrap/x86_64-linux-gnu/usr/include -Ibootstrap/x86_64-linux-gnu/usr/local/include -I../build/buildbot_linux/foundation-linux-x86_64/Foundation -I../build/buildbot_linux/foundation-linux-x86_64 -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -DDEPLOYMENT_TARGET_LINUX -D_GNU_SOURCE -DU_SHOW_DRAFT_API -DCF_BUILDING_CF -DDEPLOYMENT_RUNTIME_SWIFT -fconstant-cfstrings -fexceptions -Wno-shorten-64-to-32 -Wno-deprecated-declarations -Wno-unreachable-code -Wno-conditional-uninitialized -Wno-unused-variable -Wno-int-conversion -Wno-unused-function -I/usr/include/libxml2 -I./ -DDEPLOYMENT_ENABLE_LIBDISPATCH -I/swift-dev/swift-corelibs-libdispatch -I/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests -include CoreFoundation/Base.subproj/CoreFoundation_Prefix.h -c CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c -o ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o
In file included from CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c:16:
In file included from CoreFoundation/PlugIn.subproj/CFBundle_Internal.h:22:
In file included from ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:854:
In file included from /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/private.h:55:
/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/queue_private.h:45:2: error: expected identifier
        DISPATCH_QUEUE_OVERCOMMIT = 0x2ull,
        ^
../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:811:35: note: expanded from macro 'DISPATCH_QUEUE_OVERCOMMIT'
#define DISPATCH_QUEUE_OVERCOMMIT 2
                                  ^
1 error generated.

Using this preset:

./utils/build-script: using preset 'drew', which expands to ./utils/build-script --assertions --no-swift-stdlib-assertions --llbuild --swiftpm --xctest --build-subdir=buildbot_linux --lldb --release --test --validation-test --foundation --libdispatch -- --swift-enable-ast-verifier=0 --install-swift --install-lldb --install-llbuild --install-swiftpm --install-xctest --install-prefix=/usr '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license' --build-swift-static-stdlib=1 --build-swift-stdlib-unittest-extra=1 --skip-test-lldb=1 --test-installable-package=1 --install-destdir=/tmp/install/ --installable-package=/tmp/swift.tar.gz --install-foundation --reconfigure --install-libdispatch=1 --skip-test-libdispatch=1 --skip-test-foundation=1
./utils/build-script: command terminated with a non-zero exit status 1, aborting
The command '/bin/sh -c ./utils/build-script --preset=drew --preset-file=presets.ini --preset-file=utils/build-presets.ini installable_package="/tmp/swift.tar.gz" install_destdir="/tmp/install/"' returned a non-zero code: 1

Hi Drew,

  I suspect you are getting caught in some work-in-progress to enable
CoreFoundation for using libdispatch on Linux. If both --foundation and
--libdispatch are given to the invocation of build-script (or are in the
same preset), then the build attempts to build CoreFoundation with
libdispatch dependent functionality enabled. Right now, this doesn't
compile, so the build fails.

  As a workaround, in swift-corelibs-foundation/build.py around line 66
disable this block:

if "LIBDISPATCH_SOURCE_DIR" in Configuration.current.variables:
        foundation.CFLAGS += " "+" ".join([
                '-DDEPLOYMENT_ENABLE_LIBDISPATCH',
                '-I'+Configuration.current.variables[
"LIBDISPATCH_SOURCE_DIR"],
                '-I'+Configuration.current.variables[
"LIBDISPATCH_BUILD_DIR"]+'/tests' # for include of dispatch/private.h in
CF
        ])

  Sorry this caught you; it has taken longer to get this done than
expected. Blocked on
Add support for CFRunLoop integration APIs by seabaylea · Pull Request #46 · apple/swift-corelibs-libdispatch · GitHub and likely
some follow up changes on both the foundation and dispatch side.

--dave

···

From: Drew Crawford via swift-dev <swift-dev@swift.org>
To: swift-dev <swift-dev@swift.org>
Date: 02/26/2016 10:06 AM
Subject: [swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
Sent by: swift-dev-bounces@swift.org

Not sure where to post this, but I'm having trouble building CoreFoundation
in swift-DEVELOPMENT-SNAPSHOT-2016-02-25-due to some kind of libdispatch
issue.

The exact error is

     FAILED: mkdir -p
     `dirname ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o`; /swift-dev/build/buildbot_linux/llvm-linux-x86_64/bin/clang
-fcolor-diagnostics -fdollars-in-identifiers -fblocks
     -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC
     --target=x86_64-linux-gnu -O2 -Ibootstrap/common/usr/include
     -Ibootstrap/common/usr/local/include
     -Ibootstrap/x86_64-linux-gnu/usr/include
     -Ibootstrap/x86_64-linux-gnu/usr/local/include
     -I../build/buildbot_linux/foundation-linux-x86_64/Foundation
     -I../build/buildbot_linux/foundation-linux-x86_64
     -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift
-I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation
-I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation
-I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation
-DDEPLOYMENT_TARGET_LINUX -D_GNU_SOURCE -DU_SHOW_DRAFT_API
     -DCF_BUILDING_CF -DDEPLOYMENT_RUNTIME_SWIFT -fconstant-cfstrings
     -fexceptions -Wno-shorten-64-to-32 -Wno-deprecated-declarations
     -Wno-unreachable-code -Wno-conditional-uninitialized
     -Wno-unused-variable -Wno-int-conversion -Wno-unused-function
     -I/usr/include/libxml2 -I./ -DDEPLOYMENT_ENABLE_LIBDISPATCH
     -I/swift-dev/swift-corelibs-libdispatch
     -I/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests
     -include CoreFoundation/Base.subproj/CoreFoundation_Prefix.h -c
     CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c
     -o ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o
     In file included from
     CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c:16:
     In file included from
     CoreFoundation/PlugIn.subproj/CFBundle_Internal.h:22:
     In file included
     from ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:854:
     In file included
     from /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/private.h:55:
     /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/queue_private.h:45:2:
error: expected identifier
             DISPATCH_QUEUE_OVERCOMMIT = 0x2ull,
             ^
     ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:811:35:
note: expanded from macro 'DISPATCH_QUEUE_OVERCOMMIT'
     #define DISPATCH_QUEUE_OVERCOMMIT 2
                                       ^
     1 error generated.

Using this preset:

     ./utils/build-script: using preset 'drew', which expands
     to ./utils/build-script --assertions --no-swift-stdlib-assertions
     --llbuild --swiftpm --xctest --build-subdir=buildbot_linux --lldb
     --release --test --validation-test --foundation --libdispatch --
     --swift-enable-ast-verifier=0 --install-swift --install-lldb
     --install-llbuild --install-swiftpm --install-xctest
     --install-prefix=/usr
     '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license'
--build-swift-static-stdlib=1 --build-swift-stdlib-unittest-extra=1
     --skip-test-lldb=1 --test-installable-package=1
     --install-destdir=/tmp/install/
     --installable-package=/tmp/swift.tar.gz --install-foundation
     --reconfigure --install-libdispatch=1 --skip-test-libdispatch=1
     --skip-test-foundation=1
     ./utils/build-script: command terminated with a non-zero exit status
     1, aborting
     The command '/bin/sh -c ./utils/build-script --preset=drew
     --preset-file=presets.ini --preset-file=utils/build-presets.ini
     installable_package="/tmp/swift.tar.gz"
     install_destdir="/tmp/install/"' returned a non-zero code: 1
     _______________________________________________
     swift-dev mailing list
     swift-dev@swift.org
     https://lists.swift.org/mailman/listinfo/swift-dev

That was it! Thanks for a quick correct answer!

For anyone else in this situation, I have rolled up a patch which can be applied with `git am` as a workaround.

foundation-fix.patch (1.3 KB)

···

On Feb 26, 2016, at 11:00 AM, David P Grove <groved@us.ibm.com> wrote:

Hi Drew,

I suspect you are getting caught in some work-in-progress to enable CoreFoundation for using libdispatch on Linux. If both --foundation and --libdispatch are given to the invocation of build-script (or are in the same preset), then the build attempts to build CoreFoundation with libdispatch dependent functionality enabled. Right now, this doesn't compile, so the build fails.

As a workaround, in swift-corelibs-foundation/build.py around line 66 disable this block:

if "LIBDISPATCH_SOURCE_DIR" in Configuration.current.variables:
foundation.CFLAGS += " "+" ".join([
'-DDEPLOYMENT_ENABLE_LIBDISPATCH',
'-I'+Configuration.current.variables["LIBDISPATCH_SOURCE_DIR"],
'-I'+Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+'/tests' # for include of dispatch/private.h in CF
])

Sorry this caught you; it has taken longer to get this done than expected. Blocked on Add support for CFRunLoop integration APIs by seabaylea · Pull Request #46 · apple/swift-corelibs-libdispatch · GitHub and likely some follow up changes on both the foundation and dispatch side.

--dave

<graycol.gif>Drew Crawford via swift-dev ---02/26/2016 10:06:52 AM---Not sure where to post this, but I'm having trouble building CoreFoundation in swift-DEVELOPMENT-SN

From: Drew Crawford via swift-dev <swift-dev@swift.org>
To: swift-dev <swift-dev@swift.org>
Date: 02/26/2016 10:06 AM
Subject: [swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
Sent by: swift-dev-bounces@swift.org

Not sure where to post this, but I'm having trouble building CoreFoundation in swift-DEVELOPMENT-SNAPSHOT-2016-02-25-due to some kind of libdispatch issue.

The exact error is
FAILED: mkdir -p `dirname ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o`; /swift-dev/build/buildbot_linux/llvm-linux-x86_64/bin/clang -fcolor-diagnostics -fdollars-in-identifiers -fblocks -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC --target=x86_64-linux-gnu -O2 -Ibootstrap/common/usr/include -Ibootstrap/common/usr/local/include -Ibootstrap/x86_64-linux-gnu/usr/include -Ibootstrap/x86_64-linux-gnu/usr/local/include -I../build/buildbot_linux/foundation-linux-x86_64/Foundation -I../build/buildbot_linux/foundation-linux-x86_64 -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -DDEPLOYMENT_TARGET_LINUX -D_GNU_SOURCE -DU_SHOW_DRAFT_API -DCF_BUILDING_CF -DDEPLOYMENT_RUNTIME_SWIFT -fconstant-cfstrings -fexceptions -Wno-shorten-64-to-32 -Wno-deprecated-declarations -Wno-unreachable-code -Wno-conditional-uninitialized -Wno-unused-variable -Wno-int-conversion -Wno-unused-function -I/usr/include/libxml2 -I./ -DDEPLOYMENT_ENABLE_LIBDISPATCH -I/swift-dev/swift-corelibs-libdispatch -I/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests -include CoreFoundation/Base.subproj/CoreFoundation_Prefix.h -c CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c -o ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o
In file included from CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c:16:
In file included from CoreFoundation/PlugIn.subproj/CFBundle_Internal.h:22:
In file included from ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:854:
In file included from /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/private.h:55:
/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/queue_private.h:45:2: error: expected identifier
DISPATCH_QUEUE_OVERCOMMIT = 0x2ull,
^
../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:811:35: note: expanded from macro 'DISPATCH_QUEUE_OVERCOMMIT'
#define DISPATCH_QUEUE_OVERCOMMIT 2
^
1 error generated.

Using this preset:
./utils/build-script: using preset 'drew', which expands to ./utils/build-script --assertions --no-swift-stdlib-assertions --llbuild --swiftpm --xctest --build-subdir=buildbot_linux --lldb --release --test --validation-test --foundation --libdispatch -- --swift-enable-ast-verifier=0 --install-swift --install-lldb --install-llbuild --install-swiftpm --install-xctest --install-prefix=/usr '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license' --build-swift-static-stdlib=1 --build-swift-stdlib-unittest-extra=1 --skip-test-lldb=1 --test-installable-package=1 --install-destdir=/tmp/install/ --installable-package=/tmp/swift.tar.gz --install-foundation --reconfigure --install-libdispatch=1 --skip-test-libdispatch=1 --skip-test-foundation=1
./utils/build-script: command terminated with a non-zero exit status 1, aborting
The command '/bin/sh -c ./utils/build-script --preset=drew --preset-file=presets.ini --preset-file=utils/build-presets.ini installable_package="/tmp/swift.tar.gz" install_destdir="/tmp/install/"' returned a non-zero code: 1_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Do we need to disable this in swift-corelibs-foundation until we have everything for dispatch landed?

···

On Feb 26, 2016, at 9:00 AM, David P Grove via swift-dev <swift-dev@swift.org> wrote:

Hi Drew,

I suspect you are getting caught in some work-in-progress to enable CoreFoundation for using libdispatch on Linux. If both --foundation and --libdispatch are given to the invocation of build-script (or are in the same preset), then the build attempts to build CoreFoundation with libdispatch dependent functionality enabled. Right now, this doesn't compile, so the build fails.

As a workaround, in swift-corelibs-foundation/build.py around line 66 disable this block:

if "LIBDISPATCH_SOURCE_DIR" in Configuration.current.variables:
foundation.CFLAGS += " "+" ".join([
'-DDEPLOYMENT_ENABLE_LIBDISPATCH',
'-I'+Configuration.current.variables["LIBDISPATCH_SOURCE_DIR"],
'-I'+Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+'/tests' # for include of dispatch/private.h in CF
])

Sorry this caught you; it has taken longer to get this done than expected. Blocked on https://github.com/apple/swift-corelibs-libdispatch/pull/46 and likely some follow up changes on both the foundation and dispatch side.

--dave

<graycol.gif>Drew Crawford via swift-dev ---02/26/2016 10:06:52 AM---Not sure where to post this, but I'm having trouble building CoreFoundation in swift-DEVELOPMENT-SN

From: Drew Crawford via swift-dev <swift-dev@swift.org>
To: swift-dev <swift-dev@swift.org>
Date: 02/26/2016 10:06 AM
Subject: [swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
Sent by: swift-dev-bounces@swift.org

Not sure where to post this, but I'm having trouble building CoreFoundation in swift-DEVELOPMENT-SNAPSHOT-2016-02-25-due to some kind of libdispatch issue.

The exact error is
FAILED: mkdir -p `dirname ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o`; /swift-dev/build/buildbot_linux/llvm-linux-x86_64/bin/clang -fcolor-diagnostics -fdollars-in-identifiers -fblocks -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC --target=x86_64-linux-gnu -O2 -Ibootstrap/common/usr/include -Ibootstrap/common/usr/local/include -Ibootstrap/x86_64-linux-gnu/usr/include -Ibootstrap/x86_64-linux-gnu/usr/local/include -I../build/buildbot_linux/foundation-linux-x86_64/Foundation -I../build/buildbot_linux/foundation-linux-x86_64 -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -DDEPLOYMENT_TARGET_LINUX -D_GNU_SOURCE -DU_SHOW_DRAFT_API -DCF_BUILDING_CF -DDEPLOYMENT_RUNTIME_SWIFT -fconstant-cfstrings -fexceptions -Wno-shorten-64-to-32 -Wno-deprecated-declarations -Wno-unreachable-code -Wno-conditional-uninitialized -Wno-unused-variable -Wno-int-conversion -Wno-unused-function -I/usr/include/libxml2 -I./ -DDEPLOYMENT_ENABLE_LIBDISPATCH -I/swift-dev/swift-corelibs-libdispatch -I/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests -include CoreFoundation/Base.subproj/CoreFoundation_Prefix.h -c CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c -o ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o
In file included from CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c:16:
In file included from CoreFoundation/PlugIn.subproj/CFBundle_Internal.h:22:
In file included from ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:854:
In file included from /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/private.h:55:
/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/queue_private.h:45:2: error: expected identifier
DISPATCH_QUEUE_OVERCOMMIT = 0x2ull,
^
../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:811:35: note: expanded from macro 'DISPATCH_QUEUE_OVERCOMMIT'
#define DISPATCH_QUEUE_OVERCOMMIT 2
^
1 error generated.

Using this preset:
./utils/build-script: using preset 'drew', which expands to ./utils/build-script --assertions --no-swift-stdlib-assertions --llbuild --swiftpm --xctest --build-subdir=buildbot_linux --lldb --release --test --validation-test --foundation --libdispatch -- --swift-enable-ast-verifier=0 --install-swift --install-lldb --install-llbuild --install-swiftpm --install-xctest --install-prefix=/usr '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license' --build-swift-static-stdlib=1 --build-swift-stdlib-unittest-extra=1 --skip-test-lldb=1 --test-installable-package=1 --install-destdir=/tmp/install/ --installable-package=/tmp/swift.tar.gz --install-foundation --reconfigure --install-libdispatch=1 --skip-test-libdispatch=1 --skip-test-foundation=1
./utils/build-script: command terminated with a non-zero exit status 1, aborting
The command '/bin/sh -c ./utils/build-script --preset=drew --preset-file=presets.ini --preset-file=utils/build-presets.ini installable_package="/tmp/swift.tar.gz" install_destdir="/tmp/install/"' returned a non-zero code: 1_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

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

It would probably be simplest to disable it until it is really ready.

I hadn't really thought anyone would be trying to build dispatch and
foundation together who wasn't working on fixing it. Just commenting out
that block in build.py would do it.

--dave

···

From: Philippe Hausler <phausler@apple.com>
To: David P Grove/Watson/IBM@IBMUS
Cc: Drew Crawford <drew@sealedabstract.com>, swift-dev
            <swift-dev@swift.org>
Date: 02/27/2016 02:06 PM
Subject: Re: [swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
Sent by: phausler@apple.com

Do we need to disable this in swift-corelibs-foundation until we have
everything for dispatch landed?

      On Feb 26, 2016, at 9:00 AM, David P Grove via swift-dev < swift-dev@swift.org> wrote:

      Hi Drew,

      I suspect you are getting caught in some work-in-progress to enable
      CoreFoundation for using libdispatch on Linux. If both --foundation
      and --libdispatch are given to the invocation of build-script (or are
      in the same preset), then the build attempts to build CoreFoundation
      with libdispatch dependent functionality enabled. Right now, this
      doesn't compile, so the build fails.

      As a workaround, in swift-corelibs-foundation/build.py around line 66
      disable this block:

      if "LIBDISPATCH_SOURCE_DIR" in Configuration.current.variables:
      foundation.CFLAGS += " "+" ".join([
      '-DDEPLOYMENT_ENABLE_LIBDISPATCH',
      '-I'+Configuration.current.variables["LIBDISPATCH_SOURCE_DIR"],
      '-I'+Configuration.current.variables["LIBDISPATCH_BUILD_DIR"]+
      '/tests' # for include of dispatch/private.h in CF
      ])

      Sorry this caught you; it has taken longer to get this done than
      expected. Blocked on
      Add support for CFRunLoop integration APIs by seabaylea · Pull Request #46 · apple/swift-corelibs-libdispatch · GitHub and
      likely some follow up changes on both the foundation and dispatch
      side.

      --dave

      <graycol.gif>Drew Crawford via swift-dev ---02/26/2016 10:06:52
      AM---Not sure where to post this, but I'm having trouble building
      CoreFoundation in swift-DEVELOPMENT-SN

      From: Drew Crawford via swift-dev <swift-dev@swift.org>
      To: swift-dev <swift-dev@swift.org>
      Date: 02/26/2016 10:06 AM
      Subject: [swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
      Sent by: swift-dev-bounces@swift.org

      Not sure where to post this, but I'm having trouble building
      CoreFoundation in swift-DEVELOPMENT-SNAPSHOT-2016-02-25-due to some
      kind of libdispatch issue.

      The exact error is
                  FAILED: mkdir -p
                  `dirname ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o`; /swift-dev/build/buildbot_linux/llvm-linux-x86_64/bin/clang
-fcolor-diagnostics -fdollars-in-identifiers -fblocks
                  -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC
                  --target=x86_64-linux-gnu -O2
                  -Ibootstrap/common/usr/include
                  -Ibootstrap/common/usr/local/include
                  -Ibootstrap/x86_64-linux-gnu/usr/include
                  -Ibootstrap/x86_64-linux-gnu/usr/local/include
                  -I../build/buildbot_linux/foundation-linux-x86_64/Foundation
-I../build/buildbot_linux/foundation-linux-x86_64
                  -I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift
-I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation
-I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation
-I../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation
-DDEPLOYMENT_TARGET_LINUX -D_GNU_SOURCE -DU_SHOW_DRAFT_API
                  -DCF_BUILDING_CF -DDEPLOYMENT_RUNTIME_SWIFT
                  -fconstant-cfstrings -fexceptions -Wno-shorten-64-to-32
                  -Wno-deprecated-declarations -Wno-unreachable-code
                  -Wno-conditional-uninitialized -Wno-unused-variable
                  -Wno-int-conversion -Wno-unused-function
                  -I/usr/include/libxml2 -I./
                  -DDEPLOYMENT_ENABLE_LIBDISPATCH
                  -I/swift-dev/swift-corelibs-libdispatch
                  -I/swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests
-include CoreFoundation/Base.subproj/CoreFoundation_Prefix.h -c
                  CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c
                  -o ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c.o

                  In file included from
                  CoreFoundation/PlugIn.subproj/CFPlugIn_PlugIn.c:16:
                  In file included from
                  CoreFoundation/PlugIn.subproj/CFBundle_Internal.h:22:
                  In file included
                  from ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:854:

                  In file included
                  from /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/private.h:55:

                  /swift-dev/build/buildbot_linux/libdispatch-linux-x86_64/tests/dispatch/queue_private.h:45:2:
error: expected identifier
                  DISPATCH_QUEUE_OVERCOMMIT = 0x2ull,
                  ^
                  ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation/CFInternal.h:811:35:
note: expanded from macro 'DISPATCH_QUEUE_OVERCOMMIT'
                  #define DISPATCH_QUEUE_OVERCOMMIT 2
                  ^
                  1 error generated.

      Using this preset:
                  ./utils/build-script: using preset 'drew', which expands
                  to ./utils/build-script --assertions
                  --no-swift-stdlib-assertions --llbuild --swiftpm --xctest
                  --build-subdir=buildbot_linux --lldb --release --test
                  --validation-test --foundation --libdispatch --
                  --swift-enable-ast-verifier=0 --install-swift
                  --install-lldb --install-llbuild --install-swiftpm
                  --install-xctest --install-prefix=/usr
                  '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license'
--build-swift-static-stdlib=1 --build-swift-stdlib-unittest-extra=1
                  --skip-test-lldb=1 --test-installable-package=1
                  --install-destdir=/tmp/install/
                  --installable-package=/tmp/swift.tar.gz
                  --install-foundation --reconfigure
                  --install-libdispatch=1 --skip-test-libdispatch=1
                  --skip-test-foundation=1
                  ./utils/build-script: command terminated with a non-zero
                  exit status 1, aborting
                  The command '/bin/sh -c ./utils/build-script
                  --preset=drew --preset-file=presets.ini
                  --preset-file=utils/build-presets.ini
                  installable_package="/tmp/swift.tar.gz"
                  install_destdir="/tmp/install/"' returned a non-zero
                  code: 1_______________________________________________
                  swift-dev mailing list
                  swift-dev@swift.org
                  https://lists.swift.org/mailman/listinfo/swift-dev

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