22 Aug 2024 |
ghpzin | * Does anybody know if there are workarounds for Cargo.lock having dependencies with same name, but different urls ? https://github.com/NixOS/nixpkgs/issues/30742 (other than editing Cargo.lock to use same one and hoping for the best) | 06:33:14 |
| Artur Manuel joined the room. | 12:57:53 |
| Artur Manuel changed their profile picture. | 14:53:09 |
| nyanbinary 🏳️⚧️ left the room. | 17:19:45 |
Theo Paris | In reply to @9hp71n:matrix.org Jack Leightcap: Pretty sure this exact target is covered by something related to cross in rust section in nixpkgs. https://github.com/NixOS/nixpkgs/blob/c79da508a6bea132f3a0debcec870063f99078f1/doc/languages-frameworks/rust.section.md#cross-compilation-cross-compilation Is there a way to compile the rust std as a derivation in that case? It says the std isn't compiled when using the cross target... | 21:23:17 |
Theo Paris | * Is there a way to compile the rust std as a derivation in that case? It says the std isn't compiled when using the cross target... Not sure whether or not the core/alloc crate applies here | 21:23:46 |
23 Aug 2024 |
Theo Paris | So building a rust crate for mingw with llvm ends up trying to cross compile rustc and cargo for mingw instead of just the rust crate... What would be the correct fix for this? Additionally, building x86_64-w64-mingw32-rustc fails due to dlltool | 04:09:22 |
Theo Paris | * So building a rust crate for mingw with llvm ends up trying to cross compile rustc and cargo for mingw instead of just the rust crate... What would be the correct fix for this? Additionally, building x86_64-w64-mingw32-rustc fails due to dlltool with pkgsLLVM | 04:09:28 |
K900 | How are you doing that? Also, why LLVM? | 04:10:19 |
Theo Paris | (import nixpkgs {
system = "x86_64-linux";
crossSystem = {
system = "x86_64-windows";
rust = {
rustcTarget = "x86_64-pc-windows-gnu";
};
};
}).pkgsLLVM.pkgsCross.mingwW64
| 04:10:58 |
Theo Paris | If I set useLLVM and linker to lld in crossSystem instead of outside crossSystem, it fails to build compiler-rt-libc. | 04:11:32 |
Theo Paris | * If I set useLLVM and linker to lld in crossSystem instead of outside crossSystem, it fails to build compiler-rt-libc, probably because it tries to use lld flags with lld-link | 04:12:12 |
K900 | Yeah this is very wrong for a variety of reasons | 04:14:21 |
K900 | What are you trying to achieve here | 04:14:28 |
K900 | Do you want MinGW or MSVC | 04:14:37 |
Theo Paris | I am trying to cross compile a rust crate with mingw and LLVM. | 04:14:55 |
K900 | This makes no sense because MinGW is GNU | 04:15:30 |
K900 | So do you want MinGW or LLVM | 04:15:37 |
Theo Paris | I wanted mingw because its posix | 04:15:46 |
K900 | Then why is LLVM even there | 04:16:00 |
Theo Paris | Because I want to use llvm tools and clang instead of gcc | 04:16:19 |
K900 | Why? | 04:16:45 |
Theo Paris | If there is a way to uses clang/lld-link to cross compile without mingw then I have no idea what that way would be. | 04:16:55 |
K900 | MinGW is generally only tested with the GNU toolchain | 04:17:00 |
K900 | There is a way, yes | 04:17:12 |
K900 | The way is to use the native MSVC ABI targets | 04:17:20 |
K900 | See e.g. https://gitlab.com/K900/rust-cross-windows | 04:17:37 |
Theo Paris | That requires the proprietary msvc libraries, but it's certainly something I can try. I'd like to be able to get llvm and mingw to work with nix in the future if that is possible to achieve. | 04:19:44 |
K900 | It is probably possible, but it's going to be a sizable amount of work, and honestly, MinGW is a gigantic hack anyway | 04:20:15 |
K900 | I personally would much prefer to see better support for MSVC targets | 04:20:28 |