mollyim / mollysocket

MollySocket allows getting Signal notifications via UnifiedPush.
GNU Affero General Public License v3.0
87 stars 7 forks source link

Installing Mollysocket for UnifiedPush Method (2) - Wont Install #40

Open CuriousityKilled opened 2 months ago

CuriousityKilled commented 2 months ago

I've been following this guide on setting up Mollysocket on github using Win11, https://github.com/mollyim/mollysocket

But i'm having few issues with setting up the lsqlite binaries. I've already added it to my environment variables but when inputting

cargo install mollysocket

it comes up with

error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained\\crt2.o" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\rustc9ouC0k\\symbols.o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installoC2aw3\\release\\deps\\mollysocket-74696b5543dcf1ae.mollysocket.88a2a58631daf569-cgu.0.rcgu.o" "-L" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installoC2aw3\\release\\deps" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_gnu-0.52.5\\lib" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_gnu-0.48.5\\lib" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\Micro\\AppData\\Local\\Temp\\rustc9ouC0k\\libstd-1683fd82638343be.rlib" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-e75b7451417035c0.rlib" "-Wl,-Bdynamic" "-liphlpapi" "-lwindows.0.52.0" "-lbcrypt" "-ladvapi32" "-lntdll" "-lsqlite3" "-lwindows.0.48.5" "-lwindows.0.52.0" "-lkernel32" "-ladvapi32" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-lkernel32" "-lws2_32" "-lkernel32" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-nostartfiles" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained" "-o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installoC2aw3\\release\\deps\\mollysocket-74696b5543dcf1ae.exe" "-Wl,--gc-sections" "-no-pie" "-Wl,--strip-all" "-nodefaultlibs" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: ld: cannot find -lsqlite3: No such file or directory

error: could not compile `mollysocket` (bin "mollysocket") due to 1 previous error
error: failed to compile `mollysocket v1.4.0`, intermediate artifacts can be found at `C:\Users\Micro\AppData\Local\Temp\cargo-installoC2aw3`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

You can see in the error note that

error: linking with 'x86_64-w64-mingw32-gcc' failed: exit code: 1 = note: ld: cannot find -lsqlite3: No such file or directory

Ive downloaded LuaSQLite3_v0.9.6 and the latest version of SQLite (Version 3.46.0 ) and created a folder with the .exe file and the folder to my environment variables. I've done a version check to confirm

C:\Users\>sqlite3 --version
3.46.0 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e (64-bit) 

Maybe I'm missing something?

*posted on other forums

p1gp1g commented 2 months ago

Do you have any link to this guide ? Maybe you'll find your answer on https://github.com/rusqlite/rusqlite

CuriousityKilled commented 2 months ago

Do you have any link to this guide ? Maybe you'll find your answer on https://github.com/rusqlite/rusqlite

I have added the following cargo add rusqlite and still it comes up with

error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained\\crt2.o" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\rustcts2Iy9\\symbols.o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installzfR1C0\\release\\deps\\mollysocket-74696b5543dcf1ae.mollysocket.88a2a58631daf569-cgu.0.rcgu.o" "-L" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installzfR1C0\\release\\deps" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_gnu-0.52.5\\lib" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_gnu-0.48.5\\lib" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\Micro\\AppData\\Local\\Temp\\rustcts2Iy9\\libstd-1683fd82638343be.rlib" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-e75b7451417035c0.rlib" "-Wl,-Bdynamic" "-liphlpapi" "-lwindows.0.52.0" "-lbcrypt" "-ladvapi32" "-lntdll" "-lsqlite3" "-lwindows.0.48.5" "-lwindows.0.52.0" "-lkernel32" "-ladvapi32" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-lkernel32" "-lws2_32" "-lkernel32" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-nostartfiles" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained" "-o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installzfR1C0\\release\\deps\\mollysocket-74696b5543dcf1ae.exe" "-Wl,--gc-sections" "-no-pie" "-Wl,--strip-all" "-nodefaultlibs" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: ld: cannot find -lsqlite3: No such file or directory

error: could not compile `mollysocket` (bin "mollysocket") due to 1 previous error
error: failed to compile `mollysocket v1.4.0`, intermediate artifacts can be found at `C:\Users\Micro\AppData\Local\Temp\cargo-installzfR1C0`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Which i then added

C:\Users\Micro\hello_world>cargo new rusqlite --bin
    Creating binary (application) `rusqlite` package
      Adding `rusqlite` as member of workspace at `C:\Users\Micro\hello_world`
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

C:\Users\Micro\hello_world>cargo new libsqlite3-sys --bin
    Creating binary (application) `libsqlite3-sys` package
      Adding `libsqlite3-sys` as member of workspace at `C:\Users\Micro\hello_world`
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

C:\Users\Micro\hello_world>cargo run libsqlite3-sys
   Compiling version_check v0.9.4
   Compiling zerocopy v0.7.34
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.19.0
   Compiling pkg-config v0.3.30
   Compiling vcpkg v0.2.15
   Compiling bitflags v2.5.0
   Compiling smallvec v1.13.2
   Compiling fallible-streaming-iterator v0.1.9
   Compiling fallible-iterator v0.3.0
   Compiling ahash v0.8.11
   Compiling libsqlite3-sys v0.28.0
   Compiling hashbrown v0.14.5
   Compiling hashlink v0.9.1
   Compiling rusqlite v0.31.0
   Compiling hello_world v0.1.0 (C:\Users\Micro\hello_world)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.64s
     Running `target\debug\hello_world.exe libsqlite3-sys`
Hello, world!

Same error

   Compiling mollysocket v1.4.0
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained\\crt2.o" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\rustcWmjdQw\\symbols.o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installxGNTtg\\release\\deps\\mollysocket-74696b5543dcf1ae.mollysocket.88a2a58631daf569-cgu.0.rcgu.o" "-L" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installxGNTtg\\release\\deps" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_gnu-0.52.5\\lib" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_gnu-0.48.5\\lib" "-L" "C:\\Users\\Micro\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\Micro\\AppData\\Local\\Temp\\rustcWmjdQw\\libstd-1683fd82638343be.rlib" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-e75b7451417035c0.rlib" "-Wl,-Bdynamic" "-liphlpapi" "-lwindows.0.52.0" "-lbcrypt" "-ladvapi32" "-lntdll" "-lsqlite3" "-lwindows.0.48.5" "-lwindows.0.52.0" "-lkernel32" "-ladvapi32" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-lkernel32" "-lws2_32" "-lkernel32" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-nostartfiles" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-L" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained" "-o" "C:\\Users\\Micro\\AppData\\Local\\Temp\\cargo-installxGNTtg\\release\\deps\\mollysocket-74696b5543dcf1ae.exe" "-Wl,--gc-sections" "-no-pie" "-Wl,--strip-all" "-nodefaultlibs" "C:\\Users\\Micro\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: ld: cannot find -lsqlite3: No such file or directory

error: could not compile `mollysocket` (bin "mollysocket") due to 1 previous error
error: failed to compile `mollysocket v1.4.0`, intermediate artifacts can be found at `C:\Users\Micro\AppData\Local\Temp\cargo-installxGNTtg`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

I then added

C:\Users\Micro\hello_world>cargo add vcpkg
    Updating crates.io index
      Adding vcpkg v0.2.15 to dependencies

C:\Users\Micro\hello_world>cargo run vcpkg
   Compiling vcpkg v0.2.15
   Compiling libsqlite3-sys v0.28.0
   Compiling rusqlite v0.31.0
   Compiling hello_world v0.1.0 (C:\Users\Micro\hello_world)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.52s
     Running `target\debug\hello_world.exe vcpkg`
Hello, world!

Still same error. I think i may not be downloading the right libraries?