So im trying to compile to windows using rust on nixos, ive installed the folowing packages in my configuration.nix:
pkgsCross.mingwW64.stdenv.cc
pkgsCross.mingwW64.windows.pthreads
rustup
cargo
rustc
clang
glibc
llvmPackages_17.bintools
idk if i need them all tbh LMAO but i have them, i also tried the unstable version but that didnt seem to change anything.
First i got the following error when trying to compile my project using the command: cargo build --release --target x86_64-pc-windows-gnu
= note: /nix/store/w7339132hmzlmw63d7h7wm1ls23dcz8f-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: cannot find -l:libpthread.a: No such file or directory
collect2: error: ld returned 1 exit status
warning: `rust_db_updater` (bin "rust_db_updater") generated 6 warnings
error: could not compile `rust_db_updater` (bin "rust_db_updater") due to previous error; 6 warnings emitted
I managed to fix it using a nix shell with the following that i found online:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
shellHook = ''
export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS="-L native=${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib"
'';
}
This seems to get me passed the error but now i get the following: (its a bit long)
Compiling rust_db_updater v0.1.0 (/home/snowy/Desktop/_Projects/rust_db_updater)
error: linking with `x86_64-w64-mingw32-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/snowy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/snowy/.cargo/bin:/nix/store/x88ivkf7rmrhd5x3cvyv5vh3zqqdnhsk-bash-interactive-5.2-p15/bin:/nix/store/85jldj870vzcl72yz03labc93bwvqayx-patchelf-0.15.0/bin:/nix/store/90h6k8ylkgn81k10190v5c9ldyjpzgl9-gcc-wrapper-12.3.0/bin:/nix/store/hf2gy3km07d5m0p1lwmja0rg9wlnmyr7-gcc-12.3.0/bin:/nix/store/cx01qk0qyylvkgisbwc7d3pk8sliccgh-glibc-2.38-27-bin/bin:/nix/store/bblyj5b3ii8n6v4ra0nb37cmi3lf8rz9-coreutils-9.3/bin:/nix/store/1alqjnr40dsk7cl15l5sn5y2zdxidc1v-binutils-wrapper-2.40/bin:/nix/store/1fn92b0783crypjcxvdv6ycmvi27by0j-binutils-2.40/bin:/nix/store/bblyj5b3ii8n6v4ra0nb37cmi3lf8rz9-coreutils-9.3/bin:/nix/store/l974pi8a5yqjrjlzmg6apk0jwjv81yqw-findutils-4.9.0/bin:/nix/store/8q25nyfirzsng6p57yp8hsaldqqbc7dg-diffutils-3.10/bin:/nix/store/9c5qm297qnvwcf7j0gm01qrslbiqz8rs-gnused-4.9/bin:/nix/store/rx2wig5yhpbwhnqxdy4z7qivj9ln7fab-gnugrep-3.11/bin:/nix/store/7wfya2k95zib8jl0jk5hnbn856sqcgfk-gawk-5.2.2/bin:/nix/store/xpidksbd07in3nd4sjx79ybwwy81b338-gnutar-1.35/bin:/nix/store/202iqv4bd7lh6f7fpy48p7q4d96lqdp7-gzip-1.13/bin:/nix/store/ik7jardq92dxw3fnz3vmlcgi9c8dwwdq-bzip2-1.0.8-bin/bin:/nix/store/v4iswb5kwj33l46dyh2zqh0nkxxlr3mz-gnumake-4.4.1/bin:/nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin:/nix/store/cbj1ph7zi009m53hxs90idl1f5i9i941-patch-2.7.6/bin:/nix/store/76z4cjs7jj45ixk12yy6k5z2q2djk2jb-xz-5.4.4-bin/bin:/nix/store/qmfxld7qhk8qxlkx1cm4bkplg1gh6jgj-file-5.45/bin:/run/current-system/sw/bin:/nix/store/q8qq40xg2grfh9ry1d9x4g7lq4ra7n81-bash-5.2-p21/bin:/nix/store/fzlkaj1ax7gl655blfcr6zzvml1vx3bj-binutils-2.40/bin:/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin:/nix/store/1713hchhyzawkxfhk9srxklv03bqj55y-gawk-5.2.2/bin:/nix/store/hcad06c6vdfrpwr04icl6k1jhvi2w8rc-libarchive-3.7.2/bin:/nix/store/j9k62635xa3d44jwg7zclvwqb307wcfb-pv-1.8.5/bin:/nix/store/fjfhjnffm8w7cl2b856k965nczpwysah-squashfs-4.6.1/bin:/run/wrappers/bin:/usr/bin:/usr/sbin:/run/wrappers/bin:/home/snowy/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/home/snowy/.nix-profile/bin:/nix/profile/bin:/home/snowy/.local/state/nix/profile/bin:/etc/profiles/per-user/snowy/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/snowy/.local/share/JetBrains/Toolbox/scripts" VSLANG="1033" "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "/home/snowy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o" "/run/user/1000/rustcYVSOLh/symbols.o" "/home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o" "-L" "/home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps" "-L" "/home/snowy/Desktop/_Projects/rust_db_updater/target/release/deps" "-L" "/nix/store/9j4vgrzqf2578i5fffs7angnz42yspwr-pthreads-w32-x86_64-w64-mingw32-2.9.1/lib" "-L" "/home/snowy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/windows_x86_64_gnu-0.48.5/lib" "-L" "/home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/build/libsqlite3-sys-f84a45e47eb27dc3/out" "-L" "/home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/build/ring-b1a0dbd7a41e7abf/out" "-L" "/home/snowy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib" "-Wl,-Bstatic" "/run/user/1000/rustcYVSOLh/libring-b4918f7a4c74f6c3.rlib" "/run/user/1000/rustcYVSOLh/liblibsqlite3_sys-2c0c8839d770e286.rlib" "/home/snowy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcompiler_builtins-29c192bdb43d518b.rlib" "-Wl,-Bdynamic" "-lbcrypt" "-ladvapi32" "-lwindows.0.48.5" "-lkernel32" "-ladvapi32" "-lbcrypt" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-lkernel32" "-lws2_32" "-lkernel32" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-L" "/home/snowy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib" "-o" "/home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.exe" "-Wl,--gc-sections" "-no-pie" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs" "/home/snowy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsend.o"
= note: /nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x336f): undefined reference to `sqlite3_close'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x39d7): undefined reference to `sqlite3_finalize'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x79a5): undefined reference to `sqlite3_prepare_v3'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x7a8e): undefined reference to `sqlite3_bind_parameter_count'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x7aa9): undefined reference to `sqlite3_step'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x7ab3): undefined reference to `sqlite3_reset'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x7aef): undefined reference to `sqlite3_changes64'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0x7b5c): undefined reference to `sqlite3_finalize'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xe9745): undefined reference to `ring_core_0_17_7_aes_nohw_encrypt'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xe9c1e): undefined reference to `ring_core_0_17_7_aes_nohw_encrypt'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xea2dd): undefined reference to `ring_core_0_17_7_aes_nohw_encrypt'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xea856): undefined reference to `ring_core_0_17_7_aes_nohw_ctr32_encrypt_blocks'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xeaf11): undefined reference to `ring_core_0_17_7_aes_nohw_set_encrypt_key'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xeafd8): undefined reference to `ring_core_0_17_7_aes_nohw_encrypt'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf58ca): undefined reference to `sqlite3_errmsg'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf5abf): undefined reference to `sqlite3_errmsg'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf5b8c): undefined reference to `sqlite3_error_offset'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf645d): undefined reference to `sqlite3_threadsafe'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf6466): undefined reference to `sqlite3_libversion_number'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf6474): undefined reference to `sqlite3_mutex_alloc'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf647f): undefined reference to `sqlite3_mutex_free'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf64bd): undefined reference to `sqlite3_open_v2'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf656b): undefined reference to `sqlite3_extended_result_codes'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf657a): undefined reference to `sqlite3_busy_timeout'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf68fe): undefined reference to `sqlite3_initialize'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf6985): undefined reference to `sqlite3_config'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xf698e): undefined reference to `sqlite3_initialize'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.text+0xfe435): undefined reference to `ring_core_0_17_7_CRYPTO_memcmp'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.rdata+0x5a9e0): undefined reference to `ring_core_0_17_7_p256_point_mul'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.rdata+0x5ab48): undefined reference to `ring_core_0_17_7_p384_elem_mul_mont'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.rdata+0x5ab58): undefined reference to `ring_core_0_17_7_p384_point_add'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /home/snowy/Desktop/_Projects/rust_db_updater/target/x86_64-pc-windows-gnu/release/deps/rust_db_updater-6362af29eff0355b.rust_db_updater.f8d848b2383a27c1-cgu.0.rcgu.o:rust_db_updater.f8:(.rdata$.refptr.ring_core_0_17_7_OPENSSL_ia32cap_P[.refptr.ring_core_0_17_7_OPENSSL_ia32cap_P]+0x0): undefined reference to `ring_core_0_17_7_OPENSSL_ia32cap_P'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /run/user/1000/rustcYVSOLh/libring-b4918f7a4c74f6c3.rlib(aesni-x86_64-nasm.o):pregenerated\tmp\a:(.text+0x53a): undefined reference to `ring_core_0_17_7_OPENSSL_ia32cap_P'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /run/user/1000/rustcYVSOLh/libring-b4918f7a4c74f6c3.rlib(aesni-x86_64-nasm.o):pregenerated\tmp\a:(.text+0xdf6): undefined reference to `ring_core_0_17_7_OPENSSL_ia32cap_P'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /run/user/1000/rustcYVSOLh/libring-b4918f7a4c74f6c3.rlib(x86_64-mont-nasm.o):pregenerated\tmp\x:(.text+0x43): undefined reference to `ring_core_0_17_7_OPENSSL_ia32cap_P'
/nix/store/hqwa2dk0kvcq91rzf7nd59hql806rjjq-x86_64-w64-mingw32-binutils-2.40/bin/x86_64-w64-mingw32-ld: /run/user/1000/rustcYVSOLh/libring-b4918f7a4c74f6c3.rlib(x86_64-mont-nasm.o):pregenerated\tmp\x:(.text+0x9cb): more undefined references to `ring_core_0_17_7_OPENSSL_ia32cap_P' follow
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `rust_db_updater` (bin "rust_db_updater") due to previous error
I deleted some lines from the same thing since stackoverflow has a character limit.
I tried to search for this online and i couldn't find ANYTHING, could anyone please help me.
it seems the main ones are: ring_core and sqlite3, i have no clue what ring_core is used for but i use rusqlite, but it should be bundled? i also never had this issue on other distros or windows.
Also when i compile for Linux it works fine.
Here are some of my other system configurations and stuff
Rust Cargo.toml :
[package]
name = "rust_db_updater"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[profile.release]
strip = true
lto = true
codegen-units = 1
panic = "abort"
[dependencies]
rand = "0.8.5"
image = "0.24.7"
serde = "1.0.193"
serde_json= "1.0.108"
ureq = { version = "2.9.1", features = ["json"]}
chrono = "0.4.31"
md-5 = "0.10.6"
hex = "0.4.3"
rusqlite = { version = "0.30.0", features = ["bundled"] }
NixOs version:
OS: NixOS 23.11.1779.cf28ee258fd5 (Tapir) x86_64
Kernel: 6.1.67
if you need anything else please let me know and thank you in advance!