So I have been trying to integrate the following sqlite3 driver into my Go project; https://github.com/mattn/go-sqlite3, using the commands;
go get github.com/mattn/go-sqlite3 && go install github.com/mattn/go-sqlite3
as instructed in the readme file. Unfortunately with no success whatsoever - after running the commands and trying to import the driver using import("github.com/mattn/go-sqlite3")
I am left with two very little specific errors, which I assume are related to the gcc compiler?
# command-line-arguments
/usr/bin/ld: $WORK/b001/_pkg1_.a(_x009.o): undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
//usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Here is the output of go env, I have got both sqlite3 and GCC installed;
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/maciej/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/maciej/go"
GORACE=""
GOROOT="/usr"
GOTMPDIR=""
GOTOOLDIR="/usr/libexec/gcc/x86_64-redhat-linux/8"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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=/tmp/go-build343666347=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
sqlite3 -version
3.22.0 2018-01-22 18:45:57
gcc version 8.2.1 20181105 (Red Hat 8.2.1-5) (GCC)
Out of curiosity I tried running exactly the same procedure on Windows 10 using TDM gcc 5.1.0 and it worked flawlessly, I'll be really thankful for any advice regarding my problem, thank you.