Jake-Shadle / xwin

A utility for downloading and packaging the Microsoft CRT & Windows SDK headers and libraries needed for compiling and linking programs targeting Windows.
Apache License 2.0
390 stars 40 forks source link

unable to symlink from .xwin-cache/splat/crt/lib/x86_64/LIBCMT.lib to libcmt.lib #31

Closed messense closed 2 years ago

messense commented 2 years ago

macOS by default uses case insensitive filesystem, xwin splat fails with the following error:

Error: failed to splat Microsoft.VC.14.29.16.10.CRT.x64.Desktop.base.vsix

Caused by:
    0: unable to symlink from .xwin-cache/splat/crt/lib/x86_64/LIBCMT.lib to libcmt.lib
    1: File exists (os error 17)
Jake-Shadle commented 2 years ago

MacOS is not explicitly supported and has no guarantee to work. However, there is a --disable-symlinks on splat to skip creation of symlinks.

messense commented 2 years ago

Judging from the code in https://github.com/Jake-Shadle/xwin/blob/8b211ab22e5cf540c3d0f08070642f592cbd0c44/src/splat.rs, disable_symlinks doesn't seem to be used actually.

Jake-Shadle commented 2 years ago

Oops, you're correct.

messense commented 2 years ago

I'm happy to report xwin works great on macOS, I've made a Cargo subcommand based on xwin: https://github.com/messense/cargo-xwinbuild

Here is the reddit post: https://www.reddit.com/r/rust/comments/t3gy08/announcing_cargoxwinbuild_cross_compile_cargo/