swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.38k stars 10.34k forks source link

[SR-13960] Fresh checkout and build is looking for libcmark.a in the wrong place a #56357

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-13960
Radar None
Original Reporter mohit.athwani (JIRA User)
Type Bug
Status Reopened
Resolution
Environment Mac OS 10.15.7 Xcode 12.2
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 1 | |Component/s | Project Infrastructure | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 929e567874a55314a660b651b7fd1ac8

Issue Description:

I just did a fresh checkout and fresh build using :

utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "x86_64" --sccache --release-debuginfo  --xcode

Once the Xcode project is ready, I tried to build the ALL_BUILD scheme and saw that the linker fails with:

clang: error: no such file or directory: '/Users/Labs/Documents/swift-project/build/Xcode-RelWithDebInfoAssert/cmark-macosx-x86_64/src/Debug/libcmark.a'
Command Ld failed with a nonzero exit code

On inspection, the I found that the libcmark.a is actually placed at:

swift-project/build/Xcode-RelWithDebInfoAssert/cmark-macosx-x86_64/src/RelWithDebInfo

I created a symlink called Debug to point to this path and got the build working. I'm wondering if there is some build script that needs updating.

I could do it and start a PR, but I'll need time figuring out where to look and what to change.

typesanitizer commented 3 years ago

I've hit this before too, but I couldn't narrow down it down in CMake. I was sure there was a JIRA for this, but I can't find one at the moment.