[swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
David P Grove
groved at us.ibm.com
Fri Feb 26 11:00:35 CST 2016
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
From: Drew Crawford via swift-dev <swift-dev at swift.org>
To: swift-dev <swift-dev at swift.org>
Date: 02/26/2016 10:06 AM
Subject: [swift-dev] build failure: DISPATCH_QUEUE_OVERCOMMIT
Sent by: swift-dev-bounces at 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 at swift.org
https://lists.swift.org/mailman/listinfo/swift-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160226/8dd22e34/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160226/8dd22e34/attachment.gif>
More information about the swift-dev
mailing list