Uploaded image for project: 'Swift'
  1. Swift
  2. SR-4556

CoreFoundation build error on Linux

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Foundation
    • Labels:
    • Environment:

      Linux lfs-sdb6 4.9.16 #1 SMP Sun Mar 19 14:36:49 MSK 2017 x86_64 GNU/Linux

      Description

      I am trying to install Swift from sources on LFS (Linux from scratch) using the following build script:

      utils/build-script -extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT=false -DLLVM_TARGETS_TO_BUILD=X86" --no-assertions --no-swift-stdlib-assertions --llbuild --swiftpm --xctest --build-subdir=buildbot_linux --lldb --release --foundation --libdispatch --lit-args=-v – --swift-enable-ast-verifier=0 --build-ninja --install-swift --install-lldb --install-llbuild --install-swiftpm --install-xctest --install-prefix=/usr '-swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license' --build-swift-static-stdlib --build-swift-static-sdk-overlay --install-destdir=/mnt/swift/lfs --installable-package=/mnt/swift/lfs/swift-lfs.tar.gz --skip-test-lldb --install-foundation --install-libdispatch --reconfigure

      And I have got the following error:

      [107/321] CompileC: CoreFoundation/Collections.subproj/CFBasicHash.c
      FAILED: ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/Collections.subproj/CFBasicHash.c.o
      mkdir -p `dirname ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/Collections.subproj/CFBasicHash.c.o`; /mnt/swift/swift-source/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 -march=native -pipe -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 -DCF_CHARACTERSET_DATA_DIR="CoreFoundation/CharacterSets"-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/usr/include/curl -I./ -DDEPLOYMENT_ENABLE_LIBDISPATCH -I/mnt/swift/swift-source/swift-corelibs-libdispatch -I/mnt/swift/swift-source/build/buildbot_linux/libdispatch-linux-x86_64/tests -include CoreFoundation/Base.subproj/CoreFoundation_Prefix.h -c CoreFoundation/Collections.subproj/CFBasicHash.c -o ../build/buildbot_linux/foundation-linux-x86_64/Foundation/CoreFoundation/Collections.subproj/CFBasicHash.c.o
      In file included from CoreFoundation/Collections.subproj/CFBasicHash.c:11:
      In file included from CoreFoundation/Collections.subproj/CFBasicHash.h:12:
      In file included from ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr//lib/swift/CoreFoundation/CFInternal.h:138:
      ../build/buildbot_linux/foundation-linux-x86_64/Foundation/usr//lib/swift/CoreFoundation/ForFoundationOnly.h:113:160: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness-on-arrays]
      void (*_Null_unspecified getKeysAndValues)(CFAllocatorRef _Nullable alloc, CFTypeRef context, void *domain, void *_Null_unspecified * _Null_unspecified buf[], CFIndex *numKeyValuePairs);
      ..... ( many warnings)
      CoreFoundation/Collections.subproj/CFBasicHash.c:14:10: fatal error: 'Block.h' file not found

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Vladislav Vladislav Dembskiy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: