libsql
libsql copied to clipboard
Error related to `libsql_experimental.a` when used with golang sqlite3 driver
Hi,
I'm using golang and am using go-libsql.
When I import sqlite3
and libsql
, both drivers, the error below occurs.
import (
_ "github.com/libsql/go-libsql"
_ "github.com/mattn/go-sqlite3"
)
/usr/local/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1
duplicate symbol '_sqlite3_vsnprintf' in:
/private/var/folders/16/lvgrynkd1n93dqjg140gs5wm0000gn/T/go-link-3924145887/000013.o
/Users/sejunpark/go/pkg/mod/github.com/libsql/[email protected]/lib/darwin_arm64/libsql_experimental.a[102](sqlite3.o)
duplicate symbol '_sqlite3_column_count' in:
/private/var/folders/16/lvgrynkd1n93dqjg140gs5wm0000gn/T/go-link-3924145887/000013.o
/Users/sejunpark/go/pkg/mod/github.com/libsql/[email protected]/lib/darwin_arm64/libsql_experimental.a[102](sqlite3.o)
duplicate symbol '_sqlite3_vfs_find' in:
/private/var/folders/16/lvgrynkd1n93dqjg140gs5wm0000gn/T/go-link-3924145887/000013.o
/Users/sejunpark/go/pkg/mod/github.com/libsql/[email protected]/lib/darwin_arm64/libsql_experimental.a[102](sqlite3.o)
(omitted)
ld: 266 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I thought this was an error related to bindings/c/Makefile
@haaawk Can you help check this out if possible? Thanks again.
Thanks for reporting this issue @sjunepark. Do you have any suggestions on how to change the Makefile to fix the issue?
@haaawk Wish I could help but I have no idea on what's going on😔
Plus one on this, I've tried working on multiple golang migration libraries and they all have link issues.