Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-13476] Strange LLVM failure when building using fork of Swift #55918

Open
typesanitizer opened this issue Aug 30, 2020 · 5 comments
Open
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. unexpected behavior Bug: Unexpected behavior or incorrect output update-checkout Area → utils: the `update-checkout` script utils Area: the build system and other accessory scripts under the "utils" directory

Comments

@typesanitizer
Copy link

Previous ID SR-13476
Radar rdar://problem/68015298
Original Reporter @typesanitizer
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Project Infrastructure
Labels Bug
Assignee @shahmishal
Priority Medium

md5: 795d98179a5458c8c03f870cb2c5a9d7

Issue Description:

When you clone a fork of the Swift repository (hence, origin now points to the fork), run update-checkout and try to build the project, you get some strange failures as part of building the sanitizers. See also: https://forums.swift.org/t/problems-with-building-the-swift-compiler/39833

@typesanitizer
Copy link
Author

@swift-ci create

@swift-ci
Copy link
Collaborator

Comment by lihansey (JIRA)

I also encounter this problem too.

More info, hope it help you.

macOS Catalina 10.15.7

xcode Version 12.2 beta 3 (12B5035g)

build for swift-5.2.4-release not swift-5.3-release

  • repo version hash code:

       def self.swift
          return "0bab712aea8f0eb74f3acc303d96857f697a98d8"
    
       def self.llvm
          return "c2133f2b08047708b17230b598cb789062143650"
    
  • error log:

    ninja: Entering directory `/Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project'
    [0/3] Performing build step for 'compiler-rt'
    [4/4807] Building CXX object lib/sanitizer_common/CMakeFi...ommonNoHooks.osx.dir/sanitizer_platform_limits_posix.cc.o
    FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.osx.dir/sanitizer_platform_limits_posix.cc.o
    /Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Build/darwin-host/llvm-project/./bin/clang++  -DHAVE_RPC_XDR_H=0 -I/Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -std=c+11 -Wno-unused-parameter -O3 -DNDEBUG -arch arm64 -arch x86_64 -arch x86_64h -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk    -stdlib=libc+ -mmacosx-version-min=10.9 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -fPIC -fno-builtin -fno-exceptions -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.osx.dir/sanitizer_platform_limits_posix.cc.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.osx.dir/sanitizer_platform_limits_posix.cc.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.osx.dir/sanitizer_platform_limits_posix.cc.o -c /Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
    /Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:31: error: invalid application of 'sizeof' to an incomplete type 'struct stat64'
      unsigned struct_stat64_sz = sizeof(struct stat64);
                                  ^     ~~~~~~~~~~~~~~~
    /Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:45: note: forward declaration of '__sanitizer::stat64'
      unsigned struct_stat64_sz = sizeof(struct stat64);
                                                ^
    /Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:195:33: error: invalid application of 'sizeof' to an incomplete type 'struct statfs64'
      unsigned struct_statfs64_sz = sizeof(struct statfs64);
                                    ^     ~~~~~~~~~~~~~~~~~
    /Users/xxxxx/dev_kit/sdk/swift_source/swift-everywhere-toolchain/ToolChain/Sources/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:195:47: note: forward declaration of '__sanitizer::statfs64'
      unsigned struct_statfs64_sz = sizeof(struct statfs64);
                                                  ^
    2 errors generated.
    [13/4807] Building CXX object lib/sanitizer_common/CMakeF...CommonLibcNoHooks.iossim.dir/sanitizer_posix_libcdep.cc.o
    ninja: build stopped: subcommand failed.
    FAILED: tools/clang/runtime/compiler-rt-stamps/compiler-rt-build

@typesanitizer
Copy link
Author

Possibly unrelated: The commit hash for LLVM looks incorrect. swift-5.2.4-release corresponds to c4513204aeb003122d2c69bd454ab8781298453b, not c2133f2b08047708b17230b598cb789062143650 (this one corresponds to swift-5.2.3-release and earlier).

(Also: JIRA has its own markup which is distinct from Markdown.)

@typesanitizer
Copy link
Author

Can you try reproducing with utils/update-checkout --tag swift-5.2.4-release (I think that should work...)? Also, it says dev_kit on a path, is the error on an Apple Silicon Mac or an Intel Mac?

@swift-ci
Copy link
Collaborator

Comment by lihansey (JIRA)

> Possibly unrelated: The commit hash for LLVM looks incorrect. swift-5.2.4-release corresponds to c4513204aeb003122d2c69bd454ab8781298453b, not c2133f2b08047708b17230b598cb789062143650 (this one corresponds to swift-5.2.3-release and earlier).

Sorry for my clerical error:

  • llvm for swift-5.2.4-release : c4513204aeb003122d2c69bd454ab8781298453b

not working, thanks your reply.

And it's really working on `xcode 11 with macOS 10.14.x` before update my macOS to 10.15.x .

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added update-checkout Area → utils: the `update-checkout` script utils Area: the build system and other accessory scripts under the "utils" directory unexpected behavior Bug: Unexpected behavior or incorrect output labels Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. unexpected behavior Bug: Unexpected behavior or incorrect output update-checkout Area → utils: the `update-checkout` script utils Area: the build system and other accessory scripts under the "utils" directory
Projects
None yet
Development

No branches or pull requests

3 participants