compnerd/swift-win32

Issue when ninja building UICatalog

Hxsyed opened this issue · 8 comments

Hello there @compnerd, I have successfully run the cmake command, but when I try to run the ninja build command I am getting errors. Any idea why?

4

2

3

Please provide textual output, screenshots are not a convenient option for diagnosing build issues.

Happy early 4th :)
CMakeError.log
CMakeOutput.log

Thanks, the same to you as well :)

Could you provide the full output of the configure + build run as text please? Preferably with ninja -C out -v UICatalog

Hi @compnerd attached is the txt file.

errortxt.txt

Okay, the full logs are pretty helpful here. The build is using Swift 5.4.1:

-- The Swift compiler identification is Apple 5.4.1

I'm not currently testing anything except main for the CMake builds in CI and didn't realize that I had broken that. The linker errors are a failure to locate the symbols from Logging. However, you would find that Logging is being built:

[2/5] cmd.exe /C "cd . && C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swiftc.exe -output-file-map Sources\CMakeFiles\Logging.dir\Release\output-file-map.json -incremental -j 16 -emit-library -static -o lib\Logging.lib -module-name Logging -module-link-name Logging -emit-module -emit-module-path swift\Logging.swiftmodule -emit-dependencies  -O -libc MD  ..\Packages\swift-log\Sources\Logging\Locks.swift ..\Packages\swift-log\Sources\Logging\LogHandler.swift ..\Packages\swift-log\Sources\Logging\Logging.swift    && cd ."

Logging is being built statically (which was intentional), which is unsupported although I've added some experimental support on main for that to get that into the supported modes. You could use the latest snapshots from main, alternatively, changing the STATIC to SHARED at https://github.com/compnerd/swift-win32/blob/main/Sources/CMakeLists.txt#L34 should also work. I suppose that it makes sense to adjust that using a condition based on the compiler version.

Hello @compnerd I have tried to replace the lines of code in my CMakeList.txt file but i am still running into errors.

image

CmakeList file - CMakeLists.txt

Could you try with the latest version of the repository? I think it should be resolved.

Thank you so much it works