Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not determine kind of name for #505

Closed
mingrammer opened this issue Dec 11, 2017 · 16 comments
Closed

Could not determine kind of name for #505

mingrammer opened this issue Dec 11, 2017 · 16 comments

Comments

@mingrammer
Copy link

mingrammer commented Dec 11, 2017

# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
vendor/github.com/mattn/go-sqlite3/backup.go:24:5: could not determine kind of name for C.sqlite3_backup
vendor/github.com/mattn/go-sqlite3/backup.go:73:9: could not determine kind of name for C.sqlite3_backup_finish
vendor/github.com/mattn/go-sqlite3/backup.go:34:10: could not determine kind of name for C.sqlite3_backup_init
vendor/github.com/mattn/go-sqlite3/backup.go:63:13: could not determine kind of name for C.sqlite3_backup_pagecount
vendor/github.com/mattn/go-sqlite3/backup.go:58:13: could not determine kind of name for C.sqlite3_backup_remaining
vendor/github.com/mattn/go-sqlite3/backup.go:47:9: could not determine kind of name for C.sqlite3_backup_step
The command '/bin/sh -c go build -o ${APP_NAME} --tags "libsqlite3 linux"' returned a non-zero code: 2

I ran go build -o ${APP_NAME} --tags "libsqlite3 linux" on CentOS 5.8 with Go 1.9.2, and it was failed with above message.

I have a gcc and sqlite/sqlite-devel on my docker machine.

How can I solve it?

@mingrammer mingrammer changed the title Could not Could not determine kind of name for Dec 11, 2017
@mattn
Copy link
Owner

mattn commented Dec 11, 2017

please set CGO_ENABLE=1

@mingrammer
Copy link
Author

It already set as 1. Same problem.

@mingrammer
Copy link
Author

Here is my docker go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
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"

@mattn
Copy link
Owner

mattn commented Dec 12, 2017

What version of Go do you use?

Sorry, you use 1.9.2.

@mingrammer
Copy link
Author

I'm using go1.9.2

@mattn
Copy link
Owner

mattn commented Dec 12, 2017

If you don't use tag, what you get?

@mingrammer
Copy link
Author

mingrammer commented Dec 12, 2017

Here is

# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/callback.go:15,
                 from _cgo_export.c:3:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/backup.go:10:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/callback.go:15:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/sqlite3.go:16:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/sqlite3_context.go:11:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension.go:11:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
In file included from vendor/github.com/mattn/go-sqlite3/sqlite3_type.go:5:
vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h:10475:8: warning: no newline at end of file
# github.com/sundaytoz/sql-notebook/vendor/github.com/mattn/go-sqlite3
/usr/bin/ld: unrecognized option '--build-id=none'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status

@mingrammer
Copy link
Author

mingrammer commented Dec 12, 2017

Is it related to this?

@mattn
Copy link
Owner

mattn commented Dec 12, 2017

What C compiler do you use? Please try export CC=gcc.

@mingrammer
Copy link
Author

Although using that, same problem occurs ..

@mattn
Copy link
Owner

mattn commented Dec 12, 2017

gcc version?

@mingrammer
Copy link
Author

I'm using gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52) on CentOS 5.8

@mattn
Copy link
Owner

mattn commented Dec 12, 2017

Wow, it's older.

@mattn
Copy link
Owner

mattn commented Dec 12, 2017

Please install latest Go compiler.

@mingrammer
Copy link
Author

mingrammer commented Dec 12, 2017

Yeah. Sadly, because my company using the old legacy system .. I have to fit the version to that

@mingrammer
Copy link
Author

mingrammer commented Dec 12, 2017

Ok. I'll try do that

gjrtimmer added a commit to gjrtimmer/go-sqlite3 that referenced this issue May 26, 2018
Compile Section Closes mattn#175
Compile Section Closes mattn#201
Compile Section Closes mattn#206
Compile Section Closes mattn#404
Compile Section Closes mattn#217
Compile Section Closes mattn#224
Compile Section Closes mattn#234
Compile Section Closes mattn#242
Feature table Closes mattn#255
Description Section Closes mattn#232
Golang:1.6 not supported Closes mattn#272
Golang:1.5 not supported + compilation section Closes mattn#283
usleep Implemented Closes mattn#285
FAQ Section Closes mattn#289
Compile Section closes mattn#295
FAQ Section Closes mattn#305
PR339 Closes mattn#318 mattn#321
Compilation Section Closes mattn#341
PR407 Closes mattn#364
Feature `sqlite_vtable` Closes mattn#393
Compile Section Closes mattn#416
sqlite_trace feature Closes mattn#433
Compilation Section Closes mattn#435
Compilation Section Closes mattn#443
Golang:1.6 Not Supported Closes mattn#445
Compilation Section Closes mattn#451
Compilation Section Closes mattn#467
Compilation Section Closes mattn#491
Compilation Section Closes mattn#495
Compilation Section Closes mattn#505
Compilation Section Closes mattn#557
Compilation Section Closes mattn#560
@mattn mattn closed this as completed in c9394b1 May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants