diff --git a/docs/TROUBLESHOOTING_LINUX.md b/docs/TROUBLESHOOTING_LINUX.md new file mode 100644 index 00000000..562e08ec --- /dev/null +++ b/docs/TROUBLESHOOTING_LINUX.md @@ -0,0 +1,362 @@ +# 🐧 Linux Troubleshooting Guide + +This guide covers common issues when building or running Meetily on Linux. + +--- + +## 📦 Build Issues + +### "cargo: command not found" + +**Cause:** Rust is not installed. + +**Fix:** +```bash +# Ubuntu/Debian +sudo apt install rustc cargo + +# Arch Linux +sudo pacman -S rust + +# Fedora +sudo dnf install rust cargo + +# Or via rustup (recommended for all distros) +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +source ~/.cargo/env +``` + +--- + +### "Unable to find libclang" / "couldn't find any valid shared libraries matching libclang.so" + +**Cause:** The `clang` development libraries are missing. The Rust `bindgen` crate requires libclang to generate FFI bindings. + +**Fix:** +```bash +# Ubuntu/Debian +sudo apt install clang libclang-dev + +# Arch Linux +sudo pacman -S clang + +# Fedora +sudo dnf install clang clang-devel +``` + +If the error persists, set the path manually: +```bash +# Find libclang +find /usr -name "libclang.so*" 2>/dev/null + +# Set the path (adjust based on find result) +export LIBCLANG_PATH=/usr/lib/llvm-14/lib # Ubuntu example +export LIBCLANG_PATH=/usr/lib # Arch example +``` + +--- + +### "pnpm: command not found" + +**Cause:** pnpm package manager is not installed. + +**Fix:** +```bash +# Via npm (all distros) +sudo npm install -g pnpm + +# Arch Linux (native package) +sudo pacman -S pnpm + +# Via corepack (Node.js 16.13+) +corepack enable +corepack prepare pnpm@latest --activate +``` + +--- + +### "tauri: command not found" / "beforeBuildCommand failed" + +**Cause:** Tauri CLI is not installed or npm dependencies are missing. + +**Fix:** +```bash +cd frontend +pnpm install # Installs @tauri-apps/cli locally + +# Or install globally +pnpm install -g @tauri-apps/cli +``` + +--- + +### "CUDA toolkit not found" (but NVIDIA GPU detected) + +**Cause:** The CUDA development toolkit is not installed. Having only the NVIDIA driver is not enough. + +**Fix:** +```bash +# Ubuntu/Debian +sudo apt install nvidia-cuda-toolkit + +# Arch Linux +sudo pacman -S cuda + +# Fedora (requires RPM Fusion) +sudo dnf install cuda + +# Verify installation +nvcc --version +``` + +If `nvcc` works but the build still fails, set the CUDA path: +```bash +export CUDA_PATH=/usr/local/cuda # Ubuntu/Debian +export CUDA_PATH=/opt/cuda # Arch Linux +``` + +--- + +### "Failed to set DNS configuration" (during VPN setup, not Meetily) + +**Cause:** If you're using WireGuard VPN, `systemd-resolved` may not be active. + +**Fix:** +```bash +# Option 1: Enable systemd-resolved +sudo systemctl enable --now systemd-resolved + +# Option 2: Install openresolv (if not conflicting) +sudo pacman -S openresolv # Arch +sudo apt install openresolv # Debian/Ubuntu +``` + +--- + +## 🖥️ Runtime Issues + +### White/blank screen after launch + +**Cause:** WebKit2GTK has issues with GPU compositing on certain hardware configurations, particularly with NVIDIA GPUs. + +**Symptoms:** +- App window opens but shows only white/blank content +- Error in terminal: `Failed to create GBM buffer of size XXXxYYY: Invalid argument` + +**Quick Fix (temporary):** +```bash +WEBKIT_DISABLE_COMPOSITING_MODE=1 ./meetily.AppImage +``` + +**Permanent Fix (desktop entry):** + +Edit your `.desktop` file to include the environment variable: +```ini +[Desktop Entry] +Name=Meetily +Exec=env WEBKIT_DISABLE_COMPOSITING_MODE=1 /path/to/meetily.AppImage +... +``` + +**Alternative fixes to try:** +```bash +# Disable DMA-BUF renderer +WEBKIT_DISABLE_DMABUF_RENDERER=1 ./meetily.AppImage + +# Force software rendering (slower but most compatible) +LIBGL_ALWAYS_SOFTWARE=1 ./meetily.AppImage +``` + +--- + +### App crashes immediately after launch + +**Cause:** Missing runtime dependencies. + +**Fix:** Install WebKit and GTK runtime libraries: +```bash +# Ubuntu/Debian +sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0 + +# Arch Linux +sudo pacman -S webkit2gtk-4.1 gtk3 + +# Fedora +sudo dnf install webkit2gtk4.1 gtk3 +``` + +--- + +### No audio devices detected + +**Cause:** PulseAudio/PipeWire permissions or missing ALSA libraries. + +**Fix:** +```bash +# Check audio server is running +pactl info # PulseAudio +pw-cli info # PipeWire + +# Install ALSA development libraries +sudo apt install libasound2-dev # Debian/Ubuntu +sudo pacman -S alsa-lib # Arch +sudo dnf install alsa-lib-devel # Fedora +``` + +--- + +### "Permission denied" when accessing microphone + +**Cause:** AppImage sandbox or Flatpak permissions. + +**Fix:** +```bash +# For AppImage, extract and run directly +./meetily.AppImage --appimage-extract +./squashfs-root/AppRun + +# Or run with --no-sandbox (less secure) +./meetily.AppImage --no-sandbox +``` + +--- + +## 🎮 GPU-Specific Issues + +### NVIDIA: "CUDA not detected" despite having GPU + +**Checklist:** +1. NVIDIA driver installed: `nvidia-smi` should work +2. CUDA toolkit installed: `nvcc --version` should work +3. Environment variables set: + ```bash + export CUDA_PATH=/usr/local/cuda + export PATH=$CUDA_PATH/bin:$PATH + export LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH + ``` + +--- + +### AMD: "ROCm not detected" + +**Checklist:** +1. ROCm installed: `rocm-smi` should work +2. HIP compiler available: `hipcc --version` should work +3. Environment set: + ```bash + export ROCM_PATH=/opt/rocm + export PATH=$ROCM_PATH/bin:$PATH + ``` + +--- + +### Vulkan: "Vulkan detected but missing dependencies" + +**Cause:** Environment variables not set. + +**Fix:** +```bash +# Add to ~/.bashrc or ~/.zshrc +export VULKAN_SDK=/usr +export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu # Debian/Ubuntu +export BLAS_INCLUDE_DIRS=/usr/include # Arch + +source ~/.bashrc +``` + +--- + +## 🔧 Distribution-Specific Issues + +### Arch Linux + +**Issue:** Package names differ from Ubuntu/Debian documentation. + +**Package mapping:** +| Ubuntu/Debian | Arch Linux | +|---------------|------------| +| `nvidia-cuda-toolkit` | `cuda` | +| `libwebkit2gtk-4.1-dev` | `webkit2gtk-4.1` | +| `libgtk-3-dev` | `gtk3` | +| `build-essential` | `base-devel` | +| `libclang-dev` | `clang` | + +--- + +### Fedora/RHEL + +**Issue:** Some packages require RPM Fusion repository. + +**Fix:** +```bash +# Enable RPM Fusion +sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + +# Then install NVIDIA drivers +sudo dnf install nvidia-driver cuda +``` + +--- + +### NixOS + +**Issue:** Standard installation doesn't work due to NixOS's unique package management. + +**Fix:** Use a Nix flake or shell: +```nix +{ pkgs ? import {} }: +pkgs.mkShell { + buildInputs = with pkgs; [ + rustc cargo cmake clang + webkitgtk_4_1 gtk3 + pkg-config openssl + ]; +} +``` + +--- + +## 📋 Diagnostic Commands + +Run these to gather information for bug reports: + +```bash +# System info +uname -a +cat /etc/os-release + +# GPU info +lspci | grep -i vga +nvidia-smi 2>/dev/null || echo "No NVIDIA driver" +rocm-smi 2>/dev/null || echo "No ROCm" +vulkaninfo --summary 2>/dev/null || echo "No Vulkan" + +# Rust/Node versions +rustc --version +cargo --version +node --version +pnpm --version + +# WebKit version +pkg-config --modversion webkit2gtk-4.1 + +# Check for libclang +find /usr -name "libclang.so*" 2>/dev/null +``` + +--- + +## 🆘 Getting Help + +If none of these solutions work: + +1. **Gather diagnostics:** Run the commands above +2. **Check build output:** Save the full output of `./build-gpu.sh` +3. **Open an issue:** https://github.com/Zackriya-Solutions/meeting-minutes/issues + +Include: +- Your distribution and version +- GPU type and driver version +- Full error message +- Output of diagnostic commands diff --git a/docs/building_in_linux.md b/docs/building_in_linux.md index 0dee4a3c..4a9e3ffe 100644 --- a/docs/building_in_linux.md +++ b/docs/building_in_linux.md @@ -8,23 +8,42 @@ This guide helps you build Meetily on Linux with **automatic GPU acceleration**. If you're new to building on Linux, start here. These simple commands work for most users: -### 1. Install Basic Dependencies +### 1. Install All Dependencies + +The build requires several tools. Install them all at once: ```bash # Ubuntu/Debian sudo apt update -sudo apt install build-essential cmake git +sudo apt install build-essential cmake git curl nodejs npm rustc cargo clang libclang-dev \ + libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev pnpm # Fedora/RHEL -sudo dnf install gcc-c++ cmake git +sudo dnf install gcc-c++ cmake git nodejs npm rust cargo clang clang-devel \ + webkit2gtk4.1-devel gtk3-devel libappindicator-gtk3-devel librsvg2-devel +sudo npm install -g pnpm # Arch Linux -sudo pacman -S base-devel cmake git +sudo pacman -S base-devel cmake git nodejs npm rust clang pnpm \ + webkit2gtk-4.1 gtk3 libayatana-appindicator librsvg +``` + +> **Note:** On some distributions, you may need to install `pnpm` via npm: `sudo npm install -g pnpm` + +### 2. Clone and Setup + +```bash +git clone https://github.com/Zackriya-Solutions/meeting-minutes.git +cd meeting-minutes/frontend +pnpm install ``` -### 2. Build and Run +### 3. Build and Run ```bash +# Navigate to frontend directory (where the build scripts are located) +cd frontend + # Development mode (with hot reload) ./dev-gpu.sh @@ -32,8 +51,18 @@ sudo pacman -S base-devel cmake git ./build-gpu.sh ``` +> **Important:** The build scripts (`dev-gpu.sh` and `build-gpu.sh`) are located in the `frontend/` directory, not the project root. + **That's it!** The scripts automatically detect your GPU and configure acceleration. +### Build Output Location + +After a successful build, you'll find the AppImage at: + +``` +/target/release/bundle/appimage/meetily__amd64.AppImage +``` + ### What Happens Automatically? - ✅ **NVIDIA GPU** → CUDA acceleration (if toolkit installed) @@ -44,6 +73,68 @@ sudo pacman -S base-devel cmake git --- +## 📦 Distribution-Specific Instructions + +### Arch Linux + +```bash +# Install all dependencies +sudo pacman -S base-devel cmake git nodejs npm rust clang pnpm \ + webkit2gtk-4.1 gtk3 libayatana-appindicator librsvg + +# For NVIDIA GPU acceleration +sudo pacman -S cuda nvidia-utils + +# Clone and build +git clone https://github.com/Zackriya-Solutions/meeting-minutes.git +cd meeting-minutes/frontend +pnpm install +./build-gpu.sh +``` + +### Ubuntu/Debian + +```bash +# Install all dependencies +sudo apt update +sudo apt install build-essential cmake git curl rustc cargo clang libclang-dev \ + libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev + +# Install Node.js (LTS version recommended) +curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - +sudo apt install nodejs +sudo npm install -g pnpm + +# For NVIDIA GPU acceleration +sudo apt install nvidia-driver-550 nvidia-cuda-toolkit + +# Clone and build +git clone https://github.com/Zackriya-Solutions/meeting-minutes.git +cd meeting-minutes/frontend +pnpm install +./build-gpu.sh +``` + +### Fedora/RHEL + +```bash +# Install all dependencies +sudo dnf install gcc-c++ cmake git nodejs npm rust cargo clang clang-devel \ + webkit2gtk4.1-devel gtk3-devel libappindicator-gtk3-devel librsvg2-devel +sudo npm install -g pnpm + +# For NVIDIA GPU acceleration (RPM Fusion required) +sudo dnf install cuda nvidia-driver + +# Clone and build +git clone https://github.com/Zackriya-Solutions/meeting-minutes.git +cd meeting-minutes/frontend +pnpm install +./build-gpu.sh +``` + +--- + ## 🧠 Understanding Auto-Detection The build scripts (`dev-gpu.sh` and `build-gpu.sh`) orchestrate the entire build process. They first call `scripts/auto-detect-gpu.js` to identify your hardware, then build the `llama-helper` sidecar with the appropriate features, and finally launch the Tauri application. @@ -87,6 +178,12 @@ Want better performance? Follow these guides to enable GPU acceleration. # Ubuntu/Debian (CUDA 12.x) sudo apt install nvidia-driver-550 nvidia-cuda-toolkit +# Arch Linux +sudo pacman -S cuda nvidia-utils + +# Fedora (RPM Fusion required) +sudo dnf install cuda nvidia-driver + # Verify installation nvidia-smi # Shows GPU info nvcc --version # Shows CUDA version @@ -99,6 +196,7 @@ nvcc --version # Shows CUDA version # Example: RTX 3080 = 8.6 → use "86" # Example: GTX 1080 = 6.1 → use "61" +cd frontend CMAKE_CUDA_ARCHITECTURES=75 \ CMAKE_CUDA_STANDARD=17 \ CMAKE_POSITION_INDEPENDENT_CODE=ON \ @@ -143,7 +241,8 @@ sudo pacman -S vulkan-devel openblas ```bash # Add to ~/.bashrc or ~/.zshrc export VULKAN_SDK=/usr -export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu +export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu # Ubuntu/Debian +# or for Arch: export BLAS_INCLUDE_DIRS=/usr/include # Apply changes source ~/.bashrc @@ -152,6 +251,7 @@ source ~/.bashrc #### Step 3: Build ```bash +cd frontend ./build-gpu.sh ``` @@ -168,6 +268,9 @@ The script will automatically detect Vulkan and build with `--features vulkan`. # Add ROCm repository (see https://rocm.docs.amd.com for latest) sudo apt install rocm-smi hipcc +# Arch Linux +sudo pacman -S rocm-hip-sdk + # Set environment export ROCM_PATH=/opt/rocm @@ -176,6 +279,7 @@ rocm-smi # Shows GPU info hipcc --version # Shows ROCm version # Build +cd frontend ./build-gpu.sh ``` @@ -188,6 +292,8 @@ hipcc --version # Shows ROCm version Want to force a specific acceleration method? Use the `TAURI_GPU_FEATURE` environment variable with the shell scripts: ```bash +cd frontend + # Force CUDA (ignore auto-detection) TAURI_GPU_FEATURE=cuda ./dev-gpu.sh TAURI_GPU_FEATURE=cuda ./build-gpu.sh @@ -209,42 +315,67 @@ TAURI_GPU_FEATURE=openblas ./dev-gpu.sh TAURI_GPU_FEATURE=openblas ./build-gpu.sh ``` -### Build Output Location +--- -After successful build: +## 🧭 Troubleshooting -``` -src-tauri/target/release/bundle/appimage/Meetily__amd64.AppImage +For detailed troubleshooting information, see [TROUBLESHOOTING_LINUX.md](TROUBLESHOOTING_LINUX.md). + +### Quick Fixes + +#### "cargo: command not found" + +Install Rust: +```bash +# Ubuntu/Debian +sudo apt install rustc cargo + +# Arch Linux +sudo pacman -S rust + +# Or via rustup (all distros) +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` ---- +#### "Unable to find libclang" -## 🧭 Troubleshooting +Install clang development files: +```bash +# Ubuntu/Debian +sudo apt install clang libclang-dev -### "CUDA toolkit not found" +# Arch Linux +sudo pacman -S clang -- **Fix:** Install `nvidia-cuda-toolkit` or set `CUDA_PATH` environment variable -- **Check:** `nvcc --version` should work +# Fedora +sudo dnf install clang clang-devel +``` -### "Vulkan detected but missing dependencies" +#### "pnpm: command not found" -- **Fix:** Set both `VULKAN_SDK` and `BLAS_INCLUDE_DIRS` environment variables -- **Example:** - ```bash - export VULKAN_SDK=/usr - export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu - ``` +```bash +# Via npm (all distros) +sudo npm install -g pnpm -### "AppImage build stripping symbols" +# Or via pacman (Arch Linux) +sudo pacman -S pnpm +``` -- **Fix:** Already handled! `build-gpu.sh` sets `NO_STRIP=true` automatically -- **Why:** Prevents runtime errors from missing symbols +#### "tauri: command not found" -### Build works but no GPU acceleration +```bash +cd frontend +pnpm install # This installs @tauri-apps/cli locally +``` + +#### White/blank screen after launch + +This is usually a WebKit rendering issue. Launch with: +```bash +WEBKIT_DISABLE_COMPOSITING_MODE=1 ./path/to/meetily.AppImage +``` -- **Check detection:** Look at the build output for GPU detection messages -- **Verify:** `nvidia-smi` (NVIDIA) or `rocm-smi` (AMD) should work -- **Missing SDK:** Install the development toolkit, not just drivers +See [TROUBLESHOOTING_LINUX.md](TROUBLESHOOTING_LINUX.md) for permanent fixes. --- @@ -291,14 +422,20 @@ Both `dev-gpu.sh` and `build-gpu.sh` work the same way: ### NVIDIA GPU (CUDA) ```bash -# Install -sudo apt install nvidia-driver-550 nvidia-cuda-toolkit +# Install dependencies (Ubuntu/Debian) +sudo apt install build-essential cmake git rustc cargo clang libclang-dev \ + libwebkit2gtk-4.1-dev libgtk-3-dev pnpm nvidia-driver-550 nvidia-cuda-toolkit -# Verify +# Clone and build +git clone https://github.com/Zackriya-Solutions/meeting-minutes.git +cd meeting-minutes/frontend +pnpm install + +# Verify GPU nvidia-smi --query-gpu=compute_cap --format=csv # Build (adjust architecture for your GPU) -CMAKE_CUDA_ARCHITECTURES=86 \ # (86 may change in your case) +CMAKE_CUDA_ARCHITECTURES=86 \ CMAKE_CUDA_STANDARD=17 \ CMAKE_POSITION_INDEPENDENT_CODE=ON \ ./build-gpu.sh @@ -312,6 +449,7 @@ sudo apt install rocm-smi hipcc export ROCM_PATH=/opt/rocm # Build +cd meeting-minutes/frontend ./build-gpu.sh ``` @@ -326,6 +464,7 @@ export VULKAN_SDK=/usr export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu # Build +cd meeting-minutes/frontend ./build-gpu.sh ``` @@ -333,9 +472,10 @@ export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu ```bash # Just build - works out of the box +cd meeting-minutes/frontend ./build-gpu.sh ``` --- -**Need help?** Open an issue on GitHub with your GPU type, distro, and the output from `./build-gpu.sh`. +**Need help?** Check [TROUBLESHOOTING_LINUX.md](TROUBLESHOOTING_LINUX.md) or open an issue on GitHub with your GPU type, distro, and the output from `./build-gpu.sh`. diff --git a/frontend/src-tauri/migrations/20251105120000_add_pro_license_custom_openai.sql b/frontend/src-tauri/migrations/20251105120000_add_pro_license_custom_openai.sql index 4c607584..fe665967 100644 --- a/frontend/src-tauri/migrations/20251105120000_add_pro_license_custom_openai.sql +++ b/frontend/src-tauri/migrations/20251105120000_add_pro_license_custom_openai.sql @@ -1,7 +1,8 @@ +-- Migration: Add PRO License and Custom OpenAI Configuration (RSA-based) + -- This column stores: {endpoint, apiKey, model, maxTokens, temperature, topP} ALTER TABLE settings ADD COLUMN customOpenAIConfig TEXT; --- Migration: Add PRO License [Not needed for the app to work, But only for compatibility with PRO] -- Drop and recreate licensing table with RSA structure DROP TABLE IF EXISTS licensing; diff --git a/frontend/src-tauri/migrations/20251110000000_add_grace_period_to_licensing.sql b/frontend/src-tauri/migrations/20251110000000_add_grace_period_to_licensing.sql index 0460662c..82fe7d5b 100644 --- a/frontend/src-tauri/migrations/20251110000000_add_grace_period_to_licensing.sql +++ b/frontend/src-tauri/migrations/20251110000000_add_grace_period_to_licensing.sql @@ -1,4 +1,4 @@ --- Migration: Add grace_period column to licensing table [Not needed for the app to work, But only for compatibility with PRO] +-- Migration: Add grace_period column to licensing table -- This allows per-license grace period configuration instead of using a global constant -- Add grace_period column (stores seconds of grace period after expiry)