Comments (9)
I'm not a master of gccgo. And I've not try them. Would you please point the source link that gcc go can't treat static.
from go-sqlite3.
Do you know something like to use what the compiler is used?
For example '#ifdef GCC_GO`. I don't have gccgo environment.
from go-sqlite3.
Good that you wrote again :) I'll try to check this soon. But by heart I don't know how to fix this cleanly.
from go-sqlite3.
This is what I see:
$ go test -compiler gccgo -ldflags "-r /nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/lib"
# testmain
/tmp/go-build000228459/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.exec.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteConn':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:65: undefined reference to `sqlite3_exec'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:67: undefined reference to `sqlite3_errmsg'
/tmp/go-build000228459/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Open.pN52_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteDriver':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:80: undefined reference to `sqlite3_threadsafe'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:87: undefined reference to `sqlite3_open_v2'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:93: undefined reference to `sqlite3_errmsg'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:99: undefined reference to `sqlite3_busy_timeout'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:101: undefined reference to `sqlite3_errmsg'
...
...
I see this is unrelated to the 'static' keyword, but that's what I'm seeing now. :) I'll check a little more.
from go-sqlite3.
Could you try with -x
option? I want to know the compiler is gccgo or not
.
from go-sqlite3.
For example, what value do you get with pkg-config --cflags sqlite3
and pkg-config --libs sqlite3
from go-sqlite3.
pouproxy:[viric@bergamota:~/go/src/github.com/mattn/go-sqlite3]$ pkg-config --cflags sqlite3
-I/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/include
pouproxy:[viric@bergamota:~/go/src/github.com/mattn/go-sqlite3]$ pkg-config --libs sqlite3
-L/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/lib -lsqlite3
pouproxy:[viric@bergamota:~/go/src/github.com/mattn/go-sqlite3]$ go test -a -x -compiler gccgo
WORK=/tmp/go-build162752930
mkdir -p $WORK/github.com/mattn/go-sqlite3/_test/github.com/mattn/
mkdir -p $WORK/github.com/mattn/go-sqlite3/_test/
cd /home/viric/go/src/github.com/mattn/go-sqlite3
pkg-config --cflags sqlite3
pkg-config --libs sqlite3
/nix/store/wzkcdbnqhgvirmxxv9lyarvfqcpm8gl3-go-1.0.3/share/go/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/mattn/go-sqlite3/_test/ -gccgo -gccgoprefix=fake_github.com/mattn/go-sqlite3 -- -I/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/include -I $WORK/github.com/mattn/go-sqlite3/_test/ sqlite3.go
gcc -Wall -g -I $WORK/github.com/mattn/go-sqlite3/_test/ -I /nix/store/wzkcdbnqhgvirmxxv9lyarvfqcpm8gl3-go-1.0.3/share/go/pkg/linux_amd64 -o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_defun.o -DGOOS_linux -DGOARCH_amd64 -c $WORK/github.com/mattn/go-sqlite3/_test/_cgo_defun.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/include -I $WORK/github.com/mattn/go-sqlite3/_test/ -o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_main.o -c $WORK/github.com/mattn/go-sqlite3/_test/_cgo_main.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/include -I $WORK/github.com/mattn/go-sqlite3/_test/ -o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_export.o -c $WORK/github.com/mattn/go-sqlite3/_test/_cgo_export.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/include -I $WORK/github.com/mattn/go-sqlite3/_test/ -o $WORK/github.com/mattn/go-sqlite3/_test/sqlite3.cgo2.o -c $WORK/github.com/mattn/go-sqlite3/_test/sqlite3.cgo2.c
gcc -I . -g -O2 -fPIC -m64 -pthread -o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_.o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_main.o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_export.o $WORK/github.com/mattn/go-sqlite3/_test/sqlite3.cgo2.o -L/nix/store/skcdlrw0ip5wd1s5qgwkinbgy5wc0bjx-sqlite-3.7.13/lib -lsqlite3
gccgo -I $WORK -c -g -fgo-prefix=fake_github.com/mattn/go-sqlite3 -o $WORK/github.com/mattn/go-sqlite3/_test/sqlite.o ./sqlite3_test.go $WORK/github.com/mattn/go-sqlite3/_test/_cgo_gotypes.go $WORK/github.com/mattn/go-sqlite3/_test/sqlite3.cgo1.go
ar cru $WORK/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a $WORK/github.com/mattn/go-sqlite3/_test/sqlite.o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_defun.o $WORK/github.com/mattn/go-sqlite3/_test/_cgo_export.o $WORK/github.com/mattn/go-sqlite3/_test/sqlite3.cgo2.o
cd $WORK/github.com/mattn/go-sqlite3/_test
gccgo -I . -I $WORK -c -g -o ./main.o ./_testmain.go
ar cru ./main.a ./main.o
cd .
gccgo -o $WORK/github.com/mattn/go-sqlite3/_test/go-sqlite3.test $WORK/github.com/mattn/go-sqlite3/_test/main.o -Wl,-( $WORK/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a -lpthread -Wl,-)
# testmain
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.exec.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteConn':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:65: undefined reference to `sqlite3_exec'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:67: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Open.pN52_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteDriver':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:80: undefined reference to `sqlite3_threadsafe'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:87: undefined reference to `sqlite3_open_v2'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:93: undefined reference to `sqlite3_errmsg'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:99: undefined reference to `sqlite3_busy_timeout'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:101: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Close.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteConn':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:108: undefined reference to `sqlite3_next_stmt'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:109: undefined reference to `sqlite3_finalize'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:111: undefined reference to `sqlite3_next_stmt'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:113: undefined reference to `sqlite3_close'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Prepare.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteConn':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:133: undefined reference to `sqlite3_prepare_v2'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:135: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Close.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteStmt':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:149: undefined reference to `sqlite3_finalize'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:151: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.NumInput.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteStmt':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:157: undefined reference to `sqlite3_bind_parameter_count'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.bind.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteStmt':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:161: undefined reference to `sqlite3_reset'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:163: undefined reference to `sqlite3_errmsg'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:170: undefined reference to `sqlite3_bind_null'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:180: undefined reference to `sqlite3_bind_int'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:182: undefined reference to `sqlite3_bind_int64'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:184: undefined reference to `sqlite3_bind_int'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:187: undefined reference to `sqlite3_bind_int'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:189: undefined reference to `sqlite3_bind_int'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:192: undefined reference to `sqlite3_bind_double'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:194: undefined reference to `sqlite3_bind_double'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:206: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Query.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteStmt':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:216: undefined reference to `sqlite3_column_count'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.LastInsertId.pN52_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteResult':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:224: undefined reference to `sqlite3_last_insert_rowid'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.RowsAffected.pN52_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteResult':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:228: undefined reference to `sqlite3_changes'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Exec.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteStmt':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:235: undefined reference to `sqlite3_step'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:237: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Close.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteRows':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:250: undefined reference to `sqlite3_reset'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:252: undefined reference to `sqlite3_errmsg'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Columns.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteRows':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:261: undefined reference to `sqlite3_column_name'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite.o): In function `fake_github.com_mattn_go_sqlite3.sqlite.Next.pN50_fake_github.com_mattn_go_sqlite3.sqlite.SQLiteRows':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:268: undefined reference to `sqlite3_step'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:273: undefined reference to `sqlite3_errmsg'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:279: undefined reference to `sqlite3_column_decltype'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:284: undefined reference to `sqlite3_column_type'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:286: undefined reference to `sqlite3_column_int64'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:296: undefined reference to `sqlite3_column_double'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:298: undefined reference to `sqlite3_column_bytes'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:299: undefined reference to `sqlite3_column_blob'
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:312: undefined reference to `sqlite3_column_text'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite3.cgo2.o): In function `_sqlite3_bind_text':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:9: undefined reference to `sqlite3_bind_text'
/tmp/go-build162752930/github.com/mattn/go-sqlite3/_test/github.com/mattn/libgo-sqlite3.a(sqlite3.cgo2.o): In function `_sqlite3_bind_blob':
/home/viric/go/src/github.com/mattn/go-sqlite3/sqlite3.go:14: undefined reference to `sqlite3_bind_blob'
collect2: error: ld returned 1 exit status
$WORK/github.com/mattn/go-sqlite3/_test/go-sqlite3.test
FAIL github.com/mattn/go-sqlite3 [build failed]
from go-sqlite3.
The problem is that when "go build" builds the package using gccgo, it first compiles the sqlite3 library code (sqlite3.c) into sqlite3.o, and then compiles the cgo-generated files (sqlite3.cgo1.go et al) into sqlite3.o, overwriting the first one.
$ go build -compiler gccgo -x
WORK=/tmp/go-build083620248
mkdir -p $WORK/_/bobo/submodules/go-sqlite3/_obj/
mkdir -p $WORK/_/bobo/submodules/
cd /bobo/submodules/go-sqlite3
/usr/lib/go/pkg/tool/linux_amd64/cgo -objdir $WORK/_/bobo/submodules/go-sqlite3/_obj/ -gccgo -gccgopkgpath=_/bobo/submodules/go-sqlite3 -- -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE backup.go error.go sqlite3.go sqlite3_other.go
gcc -Wall -g -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I /usr/lib/go/pkg/linux_amd64 -o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_defun.o -D GOOS_linux -D GOARCH_amd64 -m64 -D "GOPKGPATH=\"__home_eswierk_drydock_submodules_go_sqlite3\"" -c $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_defun.c
gcc -I . -g -O2 -fPIC -m64 -pthread -print-libgcc-file-name
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_main.o -c $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_main.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_export.o -c $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_export.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/backup.cgo2.o -c $WORK/_/bobo/submodules/go-sqlite3/_obj/backup.cgo2.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/error.cgo2.o -c $WORK/_/bobo/submodules/go-sqlite3/_obj/error.cgo2.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.cgo2.o -c $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.cgo2.c
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3_other.cgo2.o -c $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3_other.cgo2.c
### First sqlite3.o:
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/_/bobo/submodules/go-sqlite3/_obj/ -I. -DSQLITE_ENABLE_RTREE -o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.o -c ./sqlite3.c
gcc -I . -g -O2 -fPIC -m64 -pthread -o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_.o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_main.o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_export.o $WORK/_/bobo/submodules/go-sqlite3/_obj/backup.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/error.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3_other.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.o -ldl
### Second sqlite3.o overwrites the first:
gccgo -I $WORK -c -g -m64 -fgo-pkgpath=_/bobo/submodules/go-sqlite3 -fgo-relative-import-path=_/bobo/submodules/go-sqlite3 -o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_gotypes.go $WORK/_/bobo/submodules/go-sqlite3/_obj/backup.cgo1.go $WORK/_/bobo/submodules/go-sqlite3/_obj/error.cgo1.go $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.cgo1.go $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3_other.cgo1.go
ar cru $WORK/_/bobo/submodules/libgo-sqlite3.a $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_defun.o $WORK/_/bobo/submodules/go-sqlite3/_obj/_cgo_export.o $WORK/_/bobo/submodules/go-sqlite3/_obj/backup.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/error.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3_other.cgo2.o $WORK/_/bobo/submodules/go-sqlite3/_obj/sqlite3.o
This problem does not occur with the gc compiler because it runs a totally different sequence of compiler commands, with different output filenames (for example the cgo-generated files are compiled into go.6 rather than sqlite3.o).
To work around the problem, rename sqlite3.{h,c} to sqlite3-orig.{h,c}, and modify the #includes in sqlite3.go, backup.go, and sqlite3ext.h.
from go-sqlite3.
# go get -u -tags "sqlite redis memcache" github.com/gogits/gogs
# github.com/mattn/go-sqlite3
cc did not produce error at completed:1
on input:
#line 8 "/home/derry/.gopkg/src/github.com/mattn/go-sqlite3/sqlite3.go"
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
#ifdef __CYGWIN__
# include <errno.h>
#endif
#ifndef SQLITE_OPEN_READWRITE
# define SQLITE_OPEN_READWRITE 0
#endif
#ifndef SQLITE_OPEN_FULLMUTEX
# define SQLITE_OPEN_FULLMUTEX 0
#endif
static int
_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {
#ifdef SQLITE_OPEN_URI
return sqlite3_open_v2(filename, ppDb, flags | SQLITE_OPEN_URI, zVfs);
#else
return sqlite3_open_v2(filename, ppDb, flags, zVfs);
#endif
}
static int
_sqlite3_bind_text(sqlite3_stmt *stmt, int n, char *p, int np) {
return sqlite3_bind_text(stmt, n, p, np, SQLITE_TRANSIENT);
}
static int
_sqlite3_bind_blob(sqlite3_stmt *stmt, int n, void *p, int np) {
return sqlite3_bind_blob(stmt, n, p, np, SQLITE_TRANSIENT);
}
#include <stdio.h>
#include <stdint.h>
static long
_sqlite3_last_insert_rowid(sqlite3* db) {
return (long) sqlite3_last_insert_rowid(db);
}
static long
_sqlite3_changes(sqlite3* db) {
return (long) sqlite3_changes(db);
}
#include <stddef.h> /* for ptrdiff_t and size_t below */
/* Define intgo when compiling with GCC. */
typedef ptrdiff_t intgo;
typedef struct { char *p; intgo n; } _GoString_;
typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
_GoString_ GoString(char *p);
_GoString_ GoStringN(char *p, int l);
_GoBytes_ GoBytes(void *p, int n);
char *CString(_GoString_);
void *_CMalloc(size_t);
#line 1 "not-declared"
void __cgo_f_1_1(void) { __typeof__(CString) *__cgo_undefined__; }
#line 1 "not-type"
void __cgo_f_1_2(void) { CString *__cgo_undefined__; }
#line 1 "not-const"
void __cgo_f_1_3(void) { enum { __cgo__undefined__ = (CString)*1 }; }
#line 2 "not-declared"
void __cgo_f_2_1(void) { __typeof__(GoString) *__cgo_undefined__; }
#line 2 "not-type"
void __cgo_f_2_2(void) { GoString *__cgo_undefined__; }
#line 2 "not-const"
void __cgo_f_2_3(void) { enum { __cgo__undefined__ = (GoString)*1 }; }
#line 3 "not-declared"
void __cgo_f_3_1(void) { __typeof__(SQLITE_OPEN_CREATE) *__cgo_undefined__; }
#line 3 "not-type"
void __cgo_f_3_2(void) { SQLITE_OPEN_CREATE *__cgo_undefined__; }
#line 3 "not-const"
void __cgo_f_3_3(void) { enum { __cgo__undefined__ = (SQLITE_OPEN_CREATE)*1 }; }
#line 4 "not-declared"
void __cgo_f_4_1(void) { __typeof__(SQLITE_OPEN_FULLMUTEX) *__cgo_undefined__; }
#line 4 "not-type"
void __cgo_f_4_2(void) { SQLITE_OPEN_FULLMUTEX *__cgo_undefined__; }
#line 4 "not-const"
void __cgo_f_4_3(void) { enum { __cgo__undefined__ = (SQLITE_OPEN_FULLMUTEX)*1 }; }
#line 5 "not-declared"
void __cgo_f_5_1(void) { __typeof__(SQLITE_OPEN_READWRITE) *__cgo_undefined__; }
#line 5 "not-type"
void __cgo_f_5_2(void) { SQLITE_OPEN_READWRITE *__cgo_undefined__; }
#line 5 "not-const"
void __cgo_f_5_3(void) { enum { __cgo__undefined__ = (SQLITE_OPEN_READWRITE)*1 }; }
#line 6 "not-declared"
void __cgo_f_6_1(void) { __typeof__(_sqlite3_bind_blob) *__cgo_undefined__; }
#line 6 "not-type"
void __cgo_f_6_2(void) { _sqlite3_bind_blob *__cgo_undefined__; }
#line 6 "not-const"
void __cgo_f_6_3(void) { enum { __cgo__undefined__ = (_sqlite3_bind_blob)*1 }; }
#line 7 "not-declared"
void __cgo_f_7_1(void) { __typeof__(_sqlite3_bind_text) *__cgo_undefined__; }
#line 7 "not-type"
void __cgo_f_7_2(void) { _sqlite3_bind_text *__cgo_undefined__; }
#line 7 "not-const"
void __cgo_f_7_3(void) { enum { __cgo__undefined__ = (_sqlite3_bind_text)*1 }; }
#line 8 "not-declared"
void __cgo_f_8_1(void) { __typeof__(_sqlite3_changes) *__cgo_undefined__; }
#line 8 "not-type"
void __cgo_f_8_2(void) { _sqlite3_changes *__cgo_undefined__; }
#line 8 "not-const"
void __cgo_f_8_3(void) { enum { __cgo__undefined__ = (_sqlite3_changes)*1 }; }
#line 9 "not-declared"
void __cgo_f_9_1(void) { __typeof__(_sqlite3_last_insert_rowid) *__cgo_undefined__; }
#line 9 "not-type"
void __cgo_f_9_2(void) { _sqlite3_last_insert_rowid *__cgo_undefined__; }
#line 9 "not-const"
void __cgo_f_9_3(void) { enum { __cgo__undefined__ = (_sqlite3_last_insert_rowid)*1 }; }
#line 10 "not-declared"
void __cgo_f_10_1(void) { __typeof__(_sqlite3_open_v2) *__cgo_undefined__; }
#line 10 "not-type"
void __cgo_f_10_2(void) { _sqlite3_open_v2 *__cgo_undefined__; }
#line 10 "not-const"
void __cgo_f_10_3(void) { enum { __cgo__undefined__ = (_sqlite3_open_v2)*1 }; }
#line 11 "not-declared"
void __cgo_f_11_1(void) { __typeof__(char) *__cgo_undefined__; }
#line 11 "not-type"
void __cgo_f_11_2(void) { char *__cgo_undefined__; }
#line 11 "not-const"
void __cgo_f_11_3(void) { enum { __cgo__undefined__ = (char)*1 }; }
#line 12 "not-declared"
void __cgo_f_12_1(void) { __typeof__(double) *__cgo_undefined__; }
#line 12 "not-type"
void __cgo_f_12_2(void) { double *__cgo_undefined__; }
#line 12 "not-const"
void __cgo_f_12_3(void) { enum { __cgo__undefined__ = (double)*1 }; }
#line 13 "not-declared"
void __cgo_f_13_1(void) { __typeof__(free) *__cgo_undefined__; }
#line 13 "not-type"
void __cgo_f_13_2(void) { free *__cgo_undefined__; }
#line 13 "not-const"
void __cgo_f_13_3(void) { enum { __cgo__undefined__ = (free)*1 }; }
#line 14 "not-declared"
void __cgo_f_14_1(void) { __typeof__(int) *__cgo_undefined__; }
#line 14 "not-type"
void __cgo_f_14_2(void) { int *__cgo_undefined__; }
#line 14 "not-const"
void __cgo_f_14_3(void) { enum { __cgo__undefined__ = (int)*1 }; }
#line 15 "not-declared"
void __cgo_f_15_1(void) { __typeof__(sqlite3) *__cgo_undefined__; }
#line 15 "not-type"
void __cgo_f_15_2(void) { sqlite3 *__cgo_undefined__; }
#line 15 "not-const"
void __cgo_f_15_3(void) { enum { __cgo__undefined__ = (sqlite3)*1 }; }
#line 16 "not-declared"
void __cgo_f_16_1(void) { __typeof__(sqlite3_bind_double) *__cgo_undefined__; }
#line 16 "not-type"
void __cgo_f_16_2(void) { sqlite3_bind_double *__cgo_undefined__; }
#line 16 "not-const"
void __cgo_f_16_3(void) { enum { __cgo__undefined__ = (sqlite3_bind_double)*1 }; }
#line 17 "not-declared"
void __cgo_f_17_1(void) { __typeof__(sqlite3_bind_int) *__cgo_undefined__; }
#line 17 "not-type"
void __cgo_f_17_2(void) { sqlite3_bind_int *__cgo_undefined__; }
#line 17 "not-const"
void __cgo_f_17_3(void) { enum { __cgo__undefined__ = (sqlite3_bind_int)*1 }; }
#line 18 "not-declared"
void __cgo_f_18_1(void) { __typeof__(sqlite3_bind_int64) *__cgo_undefined__; }
#line 18 "not-type"
void __cgo_f_18_2(void) { sqlite3_bind_int64 *__cgo_undefined__; }
#line 18 "not-const"
void __cgo_f_18_3(void) { enum { __cgo__undefined__ = (sqlite3_bind_int64)*1 }; }
#line 19 "not-declared"
void __cgo_f_19_1(void) { __typeof__(sqlite3_bind_null) *__cgo_undefined__; }
#line 19 "not-type"
void __cgo_f_19_2(void) { sqlite3_bind_null *__cgo_undefined__; }
#line 19 "not-const"
void __cgo_f_19_3(void) { enum { __cgo__undefined__ = (sqlite3_bind_null)*1 }; }
#line 20 "not-declared"
void __cgo_f_20_1(void) { __typeof__(sqlite3_bind_parameter_count) *__cgo_undefined__; }
#line 20 "not-type"
void __cgo_f_20_2(void) { sqlite3_bind_parameter_count *__cgo_undefined__; }
#line 20 "not-const"
void __cgo_f_20_3(void) { enum { __cgo__undefined__ = (sqlite3_bind_parameter_count)*1 }; }
#line 21 "not-declared"
void __cgo_f_21_1(void) { __typeof__(sqlite3_busy_timeout) *__cgo_undefined__; }
#line 21 "not-type"
void __cgo_f_21_2(void) { sqlite3_busy_timeout *__cgo_undefined__; }
#line 21 "not-const"
void __cgo_f_21_3(void) { enum { __cgo__undefined__ = (sqlite3_busy_timeout)*1 }; }
#line 22 "not-declared"
void __cgo_f_22_1(void) { __typeof__(sqlite3_close_v2) *__cgo_undefined__; }
#line 22 "not-type"
void __cgo_f_22_2(void) { sqlite3_close_v2 *__cgo_undefined__; }
#line 22 "not-const"
void __cgo_f_22_3(void) { enum { __cgo__undefined__ = (sqlite3_close_v2)*1 }; }
#line 23 "not-declared"
void __cgo_f_23_1(void) { __typeof__(sqlite3_column_blob) *__cgo_undefined__; }
#line 23 "not-type"
void __cgo_f_23_2(void) { sqlite3_column_blob *__cgo_undefined__; }
#line 23 "not-const"
void __cgo_f_23_3(void) { enum { __cgo__undefined__ = (sqlite3_column_blob)*1 }; }
#line 24 "not-declared"
void __cgo_f_24_1(void) { __typeof__(sqlite3_column_bytes) *__cgo_undefined__; }
#line 24 "not-type"
void __cgo_f_24_2(void) { sqlite3_column_bytes *__cgo_undefined__; }
#line 24 "not-const"
void __cgo_f_24_3(void) { enum { __cgo__undefined__ = (sqlite3_column_bytes)*1 }; }
#line 25 "not-declared"
void __cgo_f_25_1(void) { __typeof__(sqlite3_column_count) *__cgo_undefined__; }
#line 25 "not-type"
void __cgo_f_25_2(void) { sqlite3_column_count *__cgo_undefined__; }
#line 25 "not-const"
void __cgo_f_25_3(void) { enum { __cgo__undefined__ = (sqlite3_column_count)*1 }; }
#line 26 "not-declared"
void __cgo_f_26_1(void) { __typeof__(sqlite3_column_decltype) *__cgo_undefined__; }
#line 26 "not-type"
void __cgo_f_26_2(void) { sqlite3_column_decltype *__cgo_undefined__; }
#line 26 "not-const"
void __cgo_f_26_3(void) { enum { __cgo__undefined__ = (sqlite3_column_decltype)*1 }; }
#line 27 "not-declared"
void __cgo_f_27_1(void) { __typeof__(sqlite3_column_double) *__cgo_undefined__; }
#line 27 "not-type"
void __cgo_f_27_2(void) { sqlite3_column_double *__cgo_undefined__; }
#line 27 "not-const"
void __cgo_f_27_3(void) { enum { __cgo__undefined__ = (sqlite3_column_double)*1 }; }
#line 28 "not-declared"
void __cgo_f_28_1(void) { __typeof__(sqlite3_column_int64) *__cgo_undefined__; }
#line 28 "not-type"
void __cgo_f_28_2(void) { sqlite3_column_int64 *__cgo_undefined__; }
#line 28 "not-const"
void __cgo_f_28_3(void) { enum { __cgo__undefined__ = (sqlite3_column_int64)*1 }; }
#line 29 "not-declared"
void __cgo_f_29_1(void) { __typeof__(sqlite3_column_name) *__cgo_undefined__; }
#line 29 "not-type"
void __cgo_f_29_2(void) { sqlite3_column_name *__cgo_undefined__; }
#line 29 "not-const"
void __cgo_f_29_3(void) { enum { __cgo__undefined__ = (sqlite3_column_name)*1 }; }
#line 30 "not-declared"
void __cgo_f_30_1(void) { __typeof__(sqlite3_column_text) *__cgo_undefined__; }
#line 30 "not-type"
void __cgo_f_30_2(void) { sqlite3_column_text *__cgo_undefined__; }
#line 30 "not-const"
void __cgo_f_30_3(void) { enum { __cgo__undefined__ = (sqlite3_column_text)*1 }; }
#line 31 "not-declared"
void __cgo_f_31_1(void) { __typeof__(sqlite3_column_type) *__cgo_undefined__; }
#line 31 "not-type"
void __cgo_f_31_2(void) { sqlite3_column_type *__cgo_undefined__; }
#line 31 "not-const"
void __cgo_f_31_3(void) { enum { __cgo__undefined__ = (sqlite3_column_type)*1 }; }
#line 32 "not-declared"
void __cgo_f_32_1(void) { __typeof__(sqlite3_enable_load_extension) *__cgo_undefined__; }
#line 32 "not-type"
void __cgo_f_32_2(void) { sqlite3_enable_load_extension *__cgo_undefined__; }
#line 32 "not-const"
void __cgo_f_32_3(void) { enum { __cgo__undefined__ = (sqlite3_enable_load_extension)*1 }; }
#line 33 "not-declared"
void __cgo_f_33_1(void) { __typeof__(sqlite3_errcode) *__cgo_undefined__; }
#line 33 "not-type"
void __cgo_f_33_2(void) { sqlite3_errcode *__cgo_undefined__; }
#line 33 "not-const"
void __cgo_f_33_3(void) { enum { __cgo__undefined__ = (sqlite3_errcode)*1 }; }
#line 34 "not-declared"
void __cgo_f_34_1(void) { __typeof__(sqlite3_errmsg) *__cgo_undefined__; }
#line 34 "not-type"
void __cgo_f_34_2(void) { sqlite3_errmsg *__cgo_undefined__; }
#line 34 "not-const"
void __cgo_f_34_3(void) { enum { __cgo__undefined__ = (sqlite3_errmsg)*1 }; }
#line 35 "not-declared"
void __cgo_f_35_1(void) { __typeof__(sqlite3_errstr) *__cgo_undefined__; }
#line 35 "not-type"
void __cgo_f_35_2(void) { sqlite3_errstr *__cgo_undefined__; }
#line 35 "not-const"
void __cgo_f_35_3(void) { enum { __cgo__undefined__ = (sqlite3_errstr)*1 }; }
#line 36 "not-declared"
void __cgo_f_36_1(void) { __typeof__(sqlite3_exec) *__cgo_undefined__; }
#line 36 "not-type"
void __cgo_f_36_2(void) { sqlite3_exec *__cgo_undefined__; }
#line 36 "not-const"
void __cgo_f_36_3(void) { enum { __cgo__undefined__ = (sqlite3_exec)*1 }; }
#line 37 "not-declared"
void __cgo_f_37_1(void) { __typeof__(sqlite3_extended_errcode) *__cgo_undefined__; }
#line 37 "not-type"
void __cgo_f_37_2(void) { sqlite3_extended_errcode *__cgo_undefined__; }
#line 37 "not-const"
void __cgo_f_37_3(void) { enum { __cgo__undefined__ = (sqlite3_extended_errcode)*1 }; }
#line 38 "not-declared"
void __cgo_f_38_1(void) { __typeof__(sqlite3_finalize) *__cgo_undefined__; }
#line 38 "not-type"
void __cgo_f_38_2(void) { sqlite3_finalize *__cgo_undefined__; }
#line 38 "not-const"
void __cgo_f_38_3(void) { enum { __cgo__undefined__ = (sqlite3_finalize)*1 }; }
#line 39 "not-declared"
void __cgo_f_39_1(void) { __typeof__(sqlite3_get_autocommit) *__cgo_undefined__; }
#line 39 "not-type"
void __cgo_f_39_2(void) { sqlite3_get_autocommit *__cgo_undefined__; }
#line 39 "not-const"
void __cgo_f_39_3(void) { enum { __cgo__undefined__ = (sqlite3_get_autocommit)*1 }; }
#line 40 "not-declared"
void __cgo_f_40_1(void) { __typeof__(sqlite3_int64) *__cgo_undefined__; }
#line 40 "not-type"
void __cgo_f_40_2(void) { sqlite3_int64 *__cgo_undefined__; }
#line 40 "not-const"
void __cgo_f_40_3(void) { enum { __cgo__undefined__ = (sqlite3_int64)*1 }; }
#line 41 "not-declared"
void __cgo_f_41_1(void) { __typeof__(sqlite3_libversion) *__cgo_undefined__; }
#line 41 "not-type"
void __cgo_f_41_2(void) { sqlite3_libversion *__cgo_undefined__; }
#line 41 "not-const"
void __cgo_f_41_3(void) { enum { __cgo__undefined__ = (sqlite3_libversion)*1 }; }
#line 42 "not-declared"
void __cgo_f_42_1(void) { __typeof__(sqlite3_libversion_number) *__cgo_undefined__; }
#line 42 "not-type"
void __cgo_f_42_2(void) { sqlite3_libversion_number *__cgo_undefined__; }
#line 42 "not-const"
void __cgo_f_42_3(void) { enum { __cgo__undefined__ = (sqlite3_libversion_number)*1 }; }
#line 43 "not-declared"
void __cgo_f_43_1(void) { __typeof__(sqlite3_load_extension) *__cgo_undefined__; }
#line 43 "not-type"
void __cgo_f_43_2(void) { sqlite3_load_extension *__cgo_undefined__; }
#line 43 "not-const"
void __cgo_f_43_3(void) { enum { __cgo__undefined__ = (sqlite3_load_extension)*1 }; }
#line 44 "not-declared"
void __cgo_f_44_1(void) { __typeof__(sqlite3_prepare_v2) *__cgo_undefined__; }
#line 44 "not-type"
void __cgo_f_44_2(void) { sqlite3_prepare_v2 *__cgo_undefined__; }
#line 44 "not-const"
void __cgo_f_44_3(void) { enum { __cgo__undefined__ = (sqlite3_prepare_v2)*1 }; }
#line 45 "not-declared"
void __cgo_f_45_1(void) { __typeof__(sqlite3_reset) *__cgo_undefined__; }
#line 45 "not-type"
void __cgo_f_45_2(void) { sqlite3_reset *__cgo_undefined__; }
#line 45 "not-const"
void __cgo_f_45_3(void) { enum { __cgo__undefined__ = (sqlite3_reset)*1 }; }
#line 46 "not-declared"
void __cgo_f_46_1(void) { __typeof__(sqlite3_sourceid) *__cgo_undefined__; }
#line 46 "not-type"
void __cgo_f_46_2(void) { sqlite3_sourceid *__cgo_undefined__; }
#line 46 "not-const"
void __cgo_f_46_3(void) { enum { __cgo__undefined__ = (sqlite3_sourceid)*1 }; }
#line 47 "not-declared"
void __cgo_f_47_1(void) { __typeof__(sqlite3_step) *__cgo_undefined__; }
#line 47 "not-type"
void __cgo_f_47_2(void) { sqlite3_step *__cgo_undefined__; }
#line 47 "not-const"
void __cgo_f_47_3(void) { enum { __cgo__undefined__ = (sqlite3_step)*1 }; }
#line 48 "not-declared"
void __cgo_f_48_1(void) { __typeof__(sqlite3_stmt) *__cgo_undefined__; }
#line 48 "not-type"
void __cgo_f_48_2(void) { sqlite3_stmt *__cgo_undefined__; }
#line 48 "not-const"
void __cgo_f_48_3(void) { enum { __cgo__undefined__ = (sqlite3_stmt)*1 }; }
#line 49 "not-declared"
void __cgo_f_49_1(void) { __typeof__(sqlite3_threadsafe) *__cgo_undefined__; }
#line 49 "not-type"
void __cgo_f_49_2(void) { sqlite3_threadsafe *__cgo_undefined__; }
#line 49 "not-const"
void __cgo_f_49_3(void) { enum { __cgo__undefined__ = (sqlite3_threadsafe)*1 }; }
#line 50 "not-declared"
void __cgo_f_50_1(void) { __typeof__(strlen) *__cgo_undefined__; }
#line 50 "not-type"
void __cgo_f_50_2(void) { strlen *__cgo_undefined__; }
#line 50 "not-const"
void __cgo_f_50_3(void) { enum { __cgo__undefined__ = (strlen)*1 }; }
#line 1 "completed"
int __cgo__1 = __cgo__2;
full error output:
not-type:1:35: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_1_2(void) { CString *__cgo_undefined__; }
^
not-const:1:63: error: invalid operands to binary expression ('char *(*)(_GoString_)' and 'int')
void __cgo_f_1_3(void) { enum { __cgo__undefined__ = (CString)*1 }; }
~~~~~~~~~^~
not-type:2:36: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_2_2(void) { GoString *__cgo_undefined__; }
^
not-const:2:64: error: invalid operands to binary expression ('_GoString_ (*)(char *)' and 'int')
void __cgo_f_2_3(void) { enum { __cgo__undefined__ = (GoString)*1 }; }
~~~~~~~~~~^~
not-type:3:46: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_3_2(void) { SQLITE_OPEN_CREATE *__cgo_undefined__; }
^
not-type:4:49: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_4_2(void) { SQLITE_OPEN_FULLMUTEX *__cgo_undefined__; }
^
not-type:5:49: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_5_2(void) { SQLITE_OPEN_READWRITE *__cgo_undefined__; }
^
not-type:6:46: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_6_2(void) { _sqlite3_bind_blob *__cgo_undefined__; }
^
not-const:6:74: error: invalid operands to binary expression ('int (*)(sqlite3_stmt *, int, void *, int)' and 'int')
void __cgo_f_6_3(void) { enum { __cgo__undefined__ = (_sqlite3_bind_blob)*1 }; }
~~~~~~~~~~~~~~~~~~~~^~
not-type:7:46: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_7_2(void) { _sqlite3_bind_text *__cgo_undefined__; }
^
not-const:7:74: error: invalid operands to binary expression ('int (*)(sqlite3_stmt *, int, char *, int)' and 'int')
void __cgo_f_7_3(void) { enum { __cgo__undefined__ = (_sqlite3_bind_text)*1 }; }
~~~~~~~~~~~~~~~~~~~~^~
not-type:8:44: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_8_2(void) { _sqlite3_changes *__cgo_undefined__; }
^
not-const:8:72: error: invalid operands to binary expression ('long (*)(sqlite3 *)' and 'int')
void __cgo_f_8_3(void) { enum { __cgo__undefined__ = (_sqlite3_changes)*1 }; }
~~~~~~~~~~~~~~~~~~^~
not-type:9:54: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_9_2(void) { _sqlite3_last_insert_rowid *__cgo_undefined__; }
^
not-const:9:82: error: invalid operands to binary expression ('long (*)(sqlite3 *)' and 'int')
void __cgo_f_9_3(void) { enum { __cgo__undefined__ = (_sqlite3_last_insert_rowid)*1 }; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
not-type:10:45: error: use of undeclared identifier '__cgo_undefined__'
void __cgo_f_10_2(void) { _sqlite3_open_v2 *__cgo_undefined__; }
^
not-const:10:73: error: invalid operands to binary expression ('int (*)(const char *, sqlite3 **, int, const char *)' and 'int')
void __cgo_f_10_3(void) { enum { __cgo__undefined__ = (_sqlite3_open_v2)*1 }; }
~~~~~~~~~~~~~~~~~~^~
not-const:11:61: error: indirection requires pointer operand ('int' invalid)
void __cgo_f_11_3(void) { enum { __cgo__undefined__ = (char)*1 }; }
^~
not-const:12:63: error: indirection requires pointer operand ('int' invalid)
void __cgo_f_12_3(void) { enum { __cgo__undefined__ = (double)*1 }; }
^~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
from go-sqlite3.
Related Issues (20)
- v3.45.1 release HOT 1
- Scanning of timestamps not working when using "with time zone"
- Support for custom window functions
- Drop static_mock.go
- Getting Errors with go-sqlite3 HOT 4
- env “TMPDIR" can't change the tmp store diretory HOT 7
- "NOT json_valid(NULL)" unexpected empty result (works in CLI) HOT 2
- docker build fail undefined: sqlite3.Error HOT 2
- Database file does not get created when using connection string HOT 4
- Cannot read result row of pragma wal_checkpoint HOT 4
- importing go-sqlite hangs my application!!?? HOT 2
- Inconsistent parsing of DATETIME type, causing errors HOT 7
- C code errors on linux amd64
- exec for update does not correctly return sql.Results HOT 1
- Can't seem to fuzz SQLite?? HOT 1
- sqlite3 in-memory mode deletes data and releases memory
- x86编译问题
- It doesn't create a new database file if opened in a `network drive` with `:encrypted.db?_key`.
- Flagged by Windows Defender since v1.14.20 HOT 2
- Race conditions during unit tests despite workarounds HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-sqlite3.