tauri-apps / plugins-workspace

All of the official Tauri plugins in one place!
https://tauri.app
Apache License 2.0
915 stars 254 forks source link

[sql] Tauri app building error #860

Closed AdribMahmud101 closed 9 months ago

AdribMahmud101 commented 9 months ago

I tried to integrate tauri-plugin-sql with my tauri app and I followed this doc https://github.com/tauri-apps/plugins-workspace/tree/v1/plugins/sql but I found this error => could not compile app (bin "app")

Caused by: process didn't exit successfully: /home/adrib/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name app --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=118 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="custom-protocol"' -C metadata=63181a7403b16954 -C extra-filename=-63181a7403b16954 --out-dir /home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps -L dependency=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps --extern chrono=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps/libchrono-4e156d821ce9d6d7.rlib --extern rand=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps/librand-941c4666879e7241.rlib --extern serde=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps/libserde-cab72a9df9bcb12c.rlib --extern serde_json=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps/libserde_json-f72646cbfa03a81d.rlib --extern tauri=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps/libtauri-083bab05df3c008c.rlib --extern tauri_plugin_sql=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/deps/libtauri_plugin_sql-14abc62783668efb.rlib -L native=/home/adrib/Desktop/divinix-v2/src-tauri/target/release/build/libsqlite3-sys-696df025d3cc1a4c/out --cfg desktop (signal: 9, SIGKILL: kill) Error failed to build app: failed to build app

I haven't used any ORMs , I just followed those official doc straightforward. This is my tauri info => [✔] Environment

[-] Packages

[-] App

and my cargo.toml file => [package] name = "app" version = "0.1.0" description = "A Tauri App" authors = ["you"] license = "" repository = "" default-run = "app" edition = "2021" rust-version = "1.60"

[build-dependencies] tauri-build = { version = "1.5.1", features = [] }

[dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.5.4", features = [ "fs-read-file", "fs-read-dir", "fs-create-dir", "fs-write-file", "path-all"] } chrono = "0.4.31" rand = "0.8.5"

[dependencies.tauri-plugin-sql] git = "https://github.com/tauri-apps/plugins-workspace" branch = "v1" features = ["sqlite"] # or "postgres", or "mysql"

[features] custom-protocol = [ "tauri/custom-protocol" ]

FabianLars commented 9 months ago

I can't reproduce this but if i recall correctly (signal: 9, SIGKILL: kill) typically means that the OS killed the compiler because it doesn't have enough free memory. Could that be the case here?

AdribMahmud101 commented 9 months ago

I can't reproduce this but if i recall correctly (signal: 9, SIGKILL: kill) typically means that the OS killed the compiler because it doesn't have enough free memory. Could that be the case here?

Actually you are right. I have been building on low resource. On 8g ram 🙂 I tried building without Vscode and used cli to build. Now it WORKED ! Each time I make an issue, I learn something new, Thank you !

FabianLars commented 9 months ago

On 8g ram 🙂

Okay that's way more than expected to be honest. I think i only saw this on 4gb max before? Not sure. But well, with vscode + rust-analyzer taking 4gb already that explains that too i guess x)