mig icon indicating copy to clipboard operation
mig copied to clipboard

macOS builds seem to have a CGO issue

Open tlhunter opened this issue 2 years ago • 1 comments

Running the sqlite tests using the mig binaries available in the releases produces this output:

{
  "error":"unable to tell if 'migrations' table exists!",
  "error_details":"Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub",
  "code":"unable_check_migrations"
}

However, when building locally on macOS the resulting binary is fine.

This means that the mig release binaries don't support SQLite. However MySQL and PostgreSQL both work fine.

Discovered while working on #16.

tlhunter avatar Aug 13 '23 04:08 tlhunter

Simply adding CGO_ENABLED=1 won't fix it: https://github.com/tlhunter/mig/actions/runs/5850743699/job/15860572068

tlhunter avatar Aug 15 '23 03:08 tlhunter