Issue building go-sqlite3 with linking to libsqllite3 under macos 10.15.2
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 9.2k
- Forks
- 1.2k
- Avg merge
- 19m
- Merged PRs (30d)
- 4
Description
Hi;
I'm having issues trying to build go-sqlite3 linking to sqllite3 under macos 10.15.2.
[go-sqlite3]$ go build --tags "libsqlite3 darwin"
# github.com/mattn/go-sqlite3
./sqlite3_load_extension.go:25:8: could not determine kind of name for C.sqlite3_enable_load_extension
./sqlite3_load_extension.go:33:8: could not determine kind of name for C.sqlite3_load_extension
I'm actually trying to solve an issue getting an externally compiled sqlite extension to run under go-sqlite3, but that's much harder issue to describe and my googling lead me to trying to go build with libsqlite3, so thought I'd try and figure this issue out first.
I've tried the suggestions of using brew's gcc here #126 and here #95 but with no luck.
Any thoughts?
Thanks
[go-sqlite3]$ go version
go version go1.14.5 darwin/amd64
[go-sqlite3]$ uname -a
Darwin mac.local 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64
[go-sqlite3]$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/gav/Library/Caches/go-build"
GOENV="/Users/gav/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/gav/gocode"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="GCC-10"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/var/folders/wz/nf87bmg16rnf77tn3z6753r00000gn/T/go-build418741130=/tmp/go-build -gno-record-gcc-switches -fno-common"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reported failure occurs in sqlite3_load_extension.go when building with the libsqlite3 darwin tags. Start by reproducing the command with the listed Go and macOS environment, then inspect how the sqlite3_enable_load_extension and sqlite3_load_extension C symbols are declared. Done means identifying the cause and providing a tested resolution for this build failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, go, macos
- Domain
- build-system, databases, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100