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-3042] compile swift error: unknown setting: llvm-enable-assertions #45632

Open
swift-ci opened this issue Oct 25, 2016 · 8 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-3042
Radar None
Original Reporter netroby (JIRA User)
Type Bug
Environment

ubuntu 16.10 x64

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee netroby (JIRA)
Priority Medium

Watchers: @shahmishal

md5: dad76c31e519077834ded3afc3c58cd9

Issue Description:

huzhifeng@s ~/software/swift-swift-3.0.1-PREVIEW-3 $ ./utils/build-script -r -t      
+ mkdir -p /home/huzhifeng/software/build/Ninja-RelWithDebInfoAssert
+ env HOST_VARIABLE_linux_x86_64__SWIFT_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_RUN_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_SDKS=LINUX HOST_VARIABLE_linux_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-linux-x86_64 HOST_VARIABLE_linux_x86_64__SWIFT_TEST_TARGETS=check-swift-linux-x86_64 /home/huzhifeng/software/swift/utils/build-script-impl --workspace /home/huzhifeng/software --build-dir /home/huzhifeng/software/build/Ninja-RelWithDebInfoAssert --install-prefix /usr --host-target linux-x86_64 --stdlib-deployment-targets linux-x86_64 --host-cc /usr/bin/clang --host-cxx /usr/bin/clang++ --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /usr/bin/cmake --cmark-build-type RelWithDebInfo --llvm-build-type RelWithDebInfo --swift-build-type RelWithDebInfo --swift-stdlib-build-type RelWithDebInfo --lldb-build-type RelWithDebInfo --foundation-build-type RelWithDebInfo --libdispatch-build-type RelWithDebInfo --xctest-build-type RelWithDebInfo --llvm-enable-assertions true --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --cmake-generator Ninja --build-jobs 4 '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/usr/bin/clang++' --build-args=-j4 --build-stdlib-deployment-targets all --ninja-bin=/usr/bin/ninja --skip-build-foundation --skip-build-xctest --skip-build-lldb --skip-build-llbuild --skip-build-libdispatch --skip-build-swiftpm --skip-build-playgroundlogger --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --android-deploy-device-path /data/local/tmp --llvm-lit-args=-sv
error: unknown setting: llvm-enable-assertions
Usage: build-script-impl [--help|-h] [ --SETTING=VALUE | --SETTING VALUE | --SETTING ]*
@belkadan
Copy link
Contributor

erg (JIRA User), @shahmishal, did anything change in preview 3?

@swift-ci
Copy link
Collaborator Author

Comment by Doug Coleman (JIRA)

Preview 3 has the flag. It got removed in master by 14b2dd5.

@shahmishal
Copy link
Member

Can you please provide the swift sha you are building from?

Thanks,
Mishal Shah

@swift-ci
Copy link
Collaborator Author

Comment by zhifeng hu (JIRA)

I download the file from https://github.com/apple/swift/archive/swift-3.0.1-PREVIEW-3.zip
And try to build . but i am got failed.

@swift-ci
Copy link
Collaborator Author

Comment by zhifeng hu (JIRA)

Missing build guide for build from download source . like swift-3.0.1-PREVIEW-3

@swift-ci
Copy link
Collaborator Author

Comment by zhifeng hu (JIRA)

I will try to build swift-3.0.1-GM-CANDIDATE.

@swift-ci
Copy link
Collaborator Author

Comment by zhifeng hu (JIRA)

huzhifeng@s ~/software/swift-code/swift-swift-3.0.1-GM-CANDIDATE $ utils/build-script -r -t

  • mkdir -p /home/huzhifeng/software/swift-code/build/Ninja-RelWithDebInfoAssert

  • env HOST_VARIABLE_linux_x86_64__SWIFT_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_RUN_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_SDKS=LINUX HOST_VARIABLE_linux_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-linux-x86_64 HOST_VARIABLE_linux_x86_64__SWIFT_TEST_TARGETS=check-swift-linux-x86_64 /home/huzhifeng/software/swift-code/swift/utils/build-script-impl --workspace /home/huzhifeng/software/swift-code --build-dir /home/huzhifeng/software/swift-code/build/Ninja-RelWithDebInfoAssert --install-prefix /usr --host-target linux-x86_64 --stdlib-deployment-targets linux-x86_64 --host-cc /usr/bin/clang --host-cxx /usr/bin/clang++ --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /usr/bin/cmake --cmark-build-type RelWithDebInfo --llvm-build-type RelWithDebInfo --swift-build-type RelWithDebInfo --swift-stdlib-build-type RelWithDebInfo --lldb-build-type RelWithDebInfo --foundation-build-type RelWithDebInfo --libdispatch-build-type RelWithDebInfo --xctest-build-type RelWithDebInfo --llvm-enable-assertions true --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --cmake-generator Ninja --build-jobs 4 '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/usr/bin/clang++' --build-args=-j4 --build-stdlib-deployment-targets all --ninja-bin=/usr/bin/ninja --skip-build-foundation --skip-build-xctest --skip-build-lldb --skip-build-llbuild --skip-build-libdispatch --skip-build-swiftpm --skip-build-playgroundlogger --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --android-deploy-device-path /data/local/tmp --llvm-lit-args=-sv
    error: unknown setting: llvm-enable-assertions
    Usage: build-script-impl [--help|-h] [ --SETTING=VALUE | --SETTING VALUE | --SETTING ]*

    Available settings. Each setting corresponds to a variable,
    obtained by upcasing its name, in this script. A variable
    with no default listed here will be unset in the script if
    not explicitly specified. A setting passed in the 3rd form
    will set its corresponding variable to "1".

Still can not build with 3.0.1 GM

I am working on Ubuntu 16.10 x64

@swift-ci
Copy link
Collaborator Author

Comment by Doug Coleman (JIRA)

Hi Zhifeng,

I would recommend building from github rather than from the .zip, but I just tried it and I'm not getting your error at all.

Here's what worked for me:

bash```
wget https://github.com/apple/swift/archive/swift-3.0.1-PREVIEW-3.zip
unzip swift-3.0.1-PREVIEW-3.zip
mv swift-swift-3.0.1-PREVIEW-3 swift
cd swift
./utils/update-checkout --clone-with-ssh --skip-repository swift
./utils/build-script -r -t
```

To build from github:

bash```
git clone git@github.com:apple/swift.git
cd swift
./utils/update-checkout --clone-with-ssh
./utils/build-script -r -t
```

If you grep for ``llvm-enable-assertions`` you will see that it exists:

```
erg@rad:~/swift$ grep -r llvm-enable-assertions
utils/build-script: "--llvm-enable-assertions", str(args.llvm_assertions).lower(),
utils/build-script-impl: llvm-enable-assertions "1" "enable assertions in LLVM and Clang"
```

If your ``grep`` does not find that output, something is wrong. Are you sure that there are no other Swift directories that it's trying to build instead of the downloaded version?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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.
Projects
None yet
Development

No branches or pull requests

3 participants