Comments (3)
This is not the right location for that. This repository contains the build rules and is related to the azure builds which are slightly different from the build instructions for development.
That said, you are missing flags or your path setup was not fully correct - youβre linking against the wrong ICU library (Microsoft now ships one). Adjust your paths in CMakeCache.txt (advanced) or rebuild foundation with the missing flags/corrected flags.
from swift-build.
Thanks! Like you said, I was able to fix it with some replacements of the following in CMakeCache.txt.
Before | After |
---|---|
C:/Program Files (x86)/Windows Kits/10/Lib/10.0.18362.0/um/x64/icu |
S:/Library/icu-64/usr/lib/icu |
After that, Ninja gave me some other errors like
ninja: Entering directory `S:\b\foundation'
ninja: error: 'ICU::uc-NOTFOUND', needed by 'Sources/Foundation/Foundation.dll', missing and no known rule to make it
which I was able to fix by opening S:\b\foundation\build.ninja
and replacing
Before | After |
---|---|
ICU::uc-NOTFOUND ICU::i18n-NOTFOUND |
S:\Library\icu-64\usr\lib\icuuc64.lib S:\Library\icu-64\usr\lib\icuin64.lib |
ICU$:$:uc-NOTFOUND ICU$:$:i18n-NOTFOUND |
S$:\Library\icu-64\usr\lib\icuuc64.lib S$:\Library\icu-64\usr\lib\icuin64.lib |
Now I've ended up with
libcurl.lib(version.c.obj) : error LNK2019: unresolved external symbol zlibVersion referenced in function curl_version
libcurl.lib(content_encoding.c.obj) : error LNK2001: unresolved external symbol zlibVersion
libcurl.lib(content_encoding.c.obj) : error LNK2019: unresolved external symbol inflate referenced in function inflate_stream
libcurl.lib(content_encoding.c.obj) : error LNK2019: unresolved external symbol inflateEnd referenced in function exit_zlib
libcurl.lib(content_encoding.c.obj) : error LNK2019: unresolved external symbol inflateInit_ referenced in function deflate_init_writer
libcurl.lib(content_encoding.c.obj) : error LNK2019: unresolved external symbol inflateInit2_ referenced in function gzip_init_writer
Sources\FoundationNetworking\FoundationNetworking.dll : fatal error LNK1120: 5 unresolved externals
which I've been able to fix by adding
S:\Library\zlib-1.2.11\usr\lib\zlib.lib
to the LINK_LIBRARIES
section for FoundationNetworking
:
- LINK_LIBRARIES = CoreFoundation\CFURLSessionInterface.lib Sources\Foundation\Foundation.lib S:\Library\libcurl-development\usr\lib\libcurl.lib -lAdvAPI32.lib -lSecur32.lib -lUser32.lib -lmincore.lib S:\b\libdispatch\src\swift\swiftDispatch.lib S:\b\libdispatch\src\dispatch.lib S:\b\libdispatch\src\BlocksRuntime\BlocksRuntime.lib
+ LINK_LIBRARIES = CoreFoundation\CFURLSessionInterface.lib Sources\Foundation\Foundation.lib S:\Library\libcurl-development\usr\lib\libcurl.lib S:\Library\zlib-1.2.11\usr\lib\zlib.lib -lAdvAPI32.lib -lSecur32.lib -lUser32.lib -lmincore.lib S:\b\libdispatch\src\swift\swiftDispatch.lib S:\b\libdispatch\src\dispatch.lib S:\b\libdispatch\src\BlocksRuntime\BlocksRuntime.lib
Since then I haven't been able to install XCTest:
CMake Error at CMakeLists.txt:12 (find_package):
Could not find a package configuration file provided by "dispatch" with any
of the following names:
dispatchConfig.cmake
dispatch-config.cmake
Add the installation prefix of "dispatch" to CMAKE_PREFIX_PATH or set
"dispatch_DIR" to a directory containing one of the above files. If
"dispatch" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "S:/b/xctest/CMakeFiles/CMakeOutput.log".
See also "S:/b/xctest/CMakeFiles/CMakeError.log".
Overall, I'm glad I can even get "Hello World" compiling! I do wish I was a little bit more proficient with the toolset so that I could contribute, but CMake and Ninja are unfamiliar for me, and it seems like your setup is already pretty involved beyond that in some cases).
I would even fix the docs, but it's not totally clear to me whether the errors I encountered were a mistake on my part or some issues with the process current process.
For future reference, what'd the best place to raise this since it's a potential docs bug? Swift Forums, or the Swift Jira issue tracker?
from swift-build.
Glad that it helped! I think that you've missed another argument or have the path wrong (-D dispatch_DIR=S:\b\libdispatch\cmake\modules
was missed when building XCTest).
Yeah, the CI is definitely more involved, and you are following instructions which are aimed at maximizing productivity for a very complex setup where you can actually work across ~5-6 projects at once. They are meant for working on the toolchain (llvm, clang, swift, lld, lldb), standard library, libdispatch, Foundation, and XCTest at once. It entirely depends on what you are trying to accomplish. I do think that working through this can help you actually make development contributions to the low level parts of Swift though :)
Note that there is a stable release of the toolchain in the releases on this project, and there are nightly builds on Azure. If you are trying to get involved by working on higher level pieces (like swift-win32, building an application, etc), the releases might be a faster approach.
I would request that you give it some thoughts, if there are documentation improvements which can clarify things, we really should try to make those. The easier it is to get started, the more likely others are to get involved. The best way to address the issue is to create a PR on the swift project pointing out the issue. The Swift Forums are great for asking for help as well.
from swift-build.
Related Issues (20)
- Include Yams binaries in the devtools installer HOT 1
- TODO: Add usage instructions of SPM and swiftc HOT 17
- TODO: Update README.md according to the latest build config HOT 2
- Timing HOT 13
- Swift setup cannot create directory error HOT 3
- Manifest parse failure HOT 21
- LinuxMain test issues HOT 2
- error: Error Domain=NSCocoaErrorDomain Code=256 "(null)" HOT 2
- Unable to build using swiftc.exe on Windows 10 out of the box HOT 5
- Linker failure when including outside C header libraries on 5.3-dev HOT 2
- Consider adding a symlink in wix installer for tool_chain_root /usr/lib HOT 3
- swiftWinSDK.dll missing from the toolchain package HOT 2
- Extract CoreFoundation.lib from the build? HOT 3
- swift-build uses the wrong archiver program name on Windows HOT 4
- homogenise the build trees for swfit-corelibs action
- build the stdlib
- build ICU HOT 1
- Manifest parse error under MinGW on Windows HOT 1
- Question about TensorFlow build HOT 8
- Swift release on Windows blocked by Windows Defender HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-build.