Hi, while trying integrate this library into my project, I got an error from gcc saying there were multiple xxhash definitions because another package I used also includes the xxhash library.
Is there any good way to solved this problem? Currently, it seems that I have no choice but fork and rename all the conflicted definitions.
GCC error:
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH_versionNumber':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:322: multiple definition of `XXH_versionNumber'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:1694: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_copyState':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:329: multiple definition of `XXH32_copyState'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:1986: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_copyState':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:334: multiple definition of `XXH64_copyState'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2545: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:409: multiple definition of `XXH32'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:1950: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:521: multiple definition of `XXH64'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2511: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_createState':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:552: multiple definition of `XXH32_createState'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:1974: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_freeState':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:556: multiple definition of `XXH32_freeState'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:1979: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_createState':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:562: multiple definition of `XXH64_createState'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2533: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_freeState':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:566: multiple definition of `XXH64_freeState'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2538: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_reset':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:575: multiple definition of `XXH32_reset'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:1992: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_reset':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:588: multiple definition of `XXH64_reset'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2551: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_update':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:659: multiple definition of `XXH32_update'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2008: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_digest':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:707: multiple definition of `XXH32_digest'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2072: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_update':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:776: multiple definition of `XXH64_update'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2566: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_digest':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:840: multiple definition of `XXH64_digest'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2627: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_canonicalFromHash':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:861: multiple definition of `XXH32_canonicalFromHash'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2107: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_canonicalFromHash':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:868: multiple definition of `XXH64_canonicalFromHash'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2655: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH32_hashFromCanonical':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:875: multiple definition of `XXH32_hashFromCanonical'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2114: first defined here
/usr/bin/ld: /tmp/go-link-014105907/000112.o: in function `XXH64_hashFromCanonical':
/home/circleci/.go_workspace/pkg/mod/github.com/!data!dog/zstd@v1.4.6-0.20210211175136-c6db21d202f4/xxhash.c:880: multiple definition of `XXH64_hashFromCanonical'; /tmp/go-link-014105907/000081.o:/home/circleci/.go_workspace/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.0.2/parser/include/xxhash.h:2663: first defined here
collect2: error: ld returned 1 exit status
Hi, while trying integrate this library into my project, I got an error from gcc saying there were multiple xxhash definitions because another package I used also includes the xxhash library.
Is there any good way to solved this problem? Currently, it seems that I have no choice but fork and rename all the conflicted definitions.
GCC error: