Skip to content

Handle missing pacman in msys2 install_dependencies.sh - #8551

Open
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:msys2-pacman-fallback
Open

Handle missing pacman in msys2 install_dependencies.sh#8551
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:msys2-pacman-fallback

Conversation

@danoli3

@danoli3 danoli3 commented Sep 2, 2026

Copy link
Copy Markdown
Member

Problem

On Windows Git Bash this dies immediately:

scripts/msys2/install_dependencies.sh: line 70: pacman: command not found

pacman only exists inside an MSYS2 UCRT64/MINGW64/CLANG64 shell. Git Bash, cmd, and PowerShell do not have it, and OF does not need those MinGW packages for a Visual Studio build.

Fix

  • Find pacman on PATH, then typical MSYS2 locations (C:\msys64\..., scoop, etc.)
  • Default MSYSTEM / MINGW_PACKAGE_PREFIX to ucrt64 when unset
  • If pacman is still missing: print that this script is MSYS2-only, point at scripts/vs/install_dependencies.sh + scripts/vs/download_libs.sh, and on Windows exec the VS helper (gum via winget/scoop) instead of crashing

MSYS2 users who already have pacman are unchanged.

Look up pacman on PATH and common MSYS2 install locations from Git
Bash. If missing, point at the VS helper and msys2.org, and on
Windows fall back to scripts/vs/install_dependencies.sh.

Default to UCRT64, skip empty MINGW_PACKAGE_PREFIX from the MSYS
shell, use --noconfirm (not --confirm), refresh the package DB
before install, and pin OpenCV 4 from the ucrt64 repo.
@danoli3
danoli3 force-pushed the msys2-pacman-fallback branch from 09b0cf6 to 509a707 Compare September 2, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant