rubenv / rubenv/sql-migrate

Unable to build with CGO_ENABLED=0

Open
#147 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.4k
Forks
292
PR merge metrics
No merged PRs in 30d

Description

In my docker file:

FROM golang:1.13-alpine

RUN apk update && apk add postgresql git gcc libc-dev
ENV CGO_ENABLED=0
RUN go get github.com/rubenv/sql-migrate/...

This fails with the error:

# github.com/mattn/go-sqlite3
src/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate.go:12:16: undefined: SQLiteConn

Also, see https://github.com/mattn/go-sqlite3/issues/327

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Dockerfile build with golang:1.13-alpine, CGO_ENABLED=0, and the listed apk packages, then inspect the github.com/mattn/go-sqlite3 failure at sqlite3_opt_preupdate.go:12 and compare it with the linked upstream issue. Done means the requested build behavior is either working or the repository clearly documents the incompatibility and its scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, sqlite
Domain
build-system, databases, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.