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-1805] Swift compile instructions incomplete or incorrect #44414

Open
swift-ci opened this issue Jun 17, 2016 · 4 comments
Open

[SR-1805] Swift compile instructions incomplete or incorrect #44414

swift-ci opened this issue Jun 17, 2016 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-1805
Radar None
Original Reporter coder543 (JIRA User)
Type Bug
Status Reopened
Resolution
Environment

Ubuntu, macOS

Additional Detail from JIRA
Votes 1
Component/s Compiler, Source Tooling
Labels Bug
Assignee None
Priority Medium

md5: 79c2e4edb645fc45be11fbfc5f1ed7d0

is duplicated by:

  • TF-354 problem in building swift for tensorflow

Issue Description:

It appears that the Swift compile instructions provided in the README file on GitHub do not work. Another guy and I have both attempted to build Swift from source. I attempted by following the Ubuntu instructions, he attempted it by following the macOS instructions. Both attempts resulted in

coder@SolarExplorer:~/workspace/swift$ ./utils/build-script -r -t
+ mkdir -p /home/coder/workspace/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/coder/workspace/swift/utils/build-script-impl --workspace /home/coder/workspace --build-dir /home/coder/workspace/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 --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-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
Couldn't find cmark source directory.
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

At no point in the instructions does it mention cmark that we could find. Do the instructions need to be updated?

@belkadan
Copy link
Contributor

Did you skip the ./utils/update-checkout --clone step up in "Getting Sources for Swift and Related Projects"?

@swift-ci
Copy link
Collaborator Author

Comment by Tien Nhat Le (JIRA)

@belkadan I run `./utils/update-checkout --clone` but still got the same error.
`Couldn't find cmark source directory.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting`
My issue on MacOS 10.12.1

@swift-ci
Copy link
Collaborator Author

swift-ci commented Mar 9, 2019

Comment by Dave Fernandes (JIRA)

When following the instructions, I get the following error (macOS):

Acoustic:swift-source davef$ ./swift/utils/update-checkout --clone --scheme tensorflow

Traceback (most recent call last):

File "./swift/utils/update-checkout", line 5, in <module>

import update_checkout

File "/Users/Shared/Development/Projects/swift-source/swift/utils/update_checkout/init.py", line 2, in <module>

from update_checkout import main

ImportError: cannot import name 'main'

@swift-ci
Copy link
Collaborator Author

Comment by Dave Fernandes (JIRA)

The error is caused by having Python 3.x installed. Python 3 paths must be removed from the PATH environment variable before building. This should be documented or, ideally, update-checkout should check the Python 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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants