Closed kminehart closed 9 months ago
Is there a reason why you are using golang:buster
?
It runs with golang:latest
pretty fine:
docker run --rm -e CGO_ENABLED=1 -e GOOS=linux -e GOARCH=amd64 --platform=linux/amd64 -it -v $PWD:/src --workdir=/src golang:latest go build -o ex ./examples
And to test the output:
docker run --rm --platform=linux/amd64 -v $(PWD):/app golang:latest /app/ex
Is there a reason why you are using
golang:buster
?It runs with
golang:latest
pretty fine:
docker run --rm -e CGO_ENABLED=1 -e GOOS=linux -e GOARCH=amd64 --platform=linux/amd64 -it -v $PWD:/src --workdir=/src golang:latest go build -o ex ./examples
And to test the output:
docker run --rm --platform=linux/amd64 -v $(PWD):/app golang:latest /app/ex
hi,
I try to build my project within docker
image golang:1.22.5-alpine
, and it fails with lots of undefined references
I have tried golang:1.22.5 following your commands, it does work but on alpine
it fails
I want to know if there is any solution solving my problem cause alpine
is really smaller than ubuntu
thanks!
here is my dockerfile
FROM golang:1.22.5-alpine as build
WORKDIR /opt/nq
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk add --no-cache --update git make build-base
ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOARCH=amd64
ENV GOPROXY=https://goproxy.cn
COPY go.mod go.sum go.work go.work.sum ./
RUN go mod download && go mod verify
COPY .. .
RUN go build -tags="no_duckdb_arrow" -o built/bin/nq ./cmd/nq
FROM golang:1.22.5-alpine
ARG USER_ID=10001
ENV TZ=Asia/Shanghai
WORKDIR /opt/nq
COPY --from=build /opt/nq/built /opt/nq/built
COPY --from=build /opt/nq/assets /opt/nq/assets
COPY --from=build /etc/passwd /etc/passwd
RUN adduser -u ${USER_ID} -D nq
# RUN adduser -uid ${USER_ID} nq
USER nq
RUN mkdir -p ~/.nq
CMD [ "./built/bin/nq", "--help" ]
here is output when run docker build
> [build 8/8] RUN go build -tags="no_duckdb_arrow" -o built/bin/nq ./cmd/nq:
36.80 # nq/cmd/nq
36.80 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_capi.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_main_capi.cpp:(.text+0x327): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_parser.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_parser.cpp:(.text+0x553): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_planner.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_planner.cpp:(.text+0xf2e): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_planner_expression.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_planner_expression.cpp:(.text+0x517): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_progress_bar.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_progress_bar.cpp:(.text+0xd6): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_statistics.cpp.o):ub_duckdb_storage_statistics.cpp:(.text+0x947): more undefined references to `__vsnprintf_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_statistics.cpp.o): in function `duckdb::StringStats::Update(duckdb::BaseStatistics&, duckdb::string_t const&)':
36.80 ub_duckdb_storage_statistics.cpp:(.text+0x2c5a): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ub_duckdb_storage_statistics.cpp:(.text+0x2db5): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_table.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_storage_table.cpp:(.text+0x8652): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_transformer_statement.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_transformer_statement.cpp:(.text+0x27e): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_bind_expression.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_bind_expression.cpp:(.text+0x8fe): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_bind_query_node.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_bind_query_node.cpp:(.text+0x42e): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_bind_statement.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_bind_statement.cpp:(.text+0x6a7): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_bind_tableref.cpp.o):ub_duckdb_bind_tableref.cpp:(.text+0x337): more undefined references to `__vsnprintf_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_common.cpp.o): in function `duckdb::RemoveDirectoryRecursive(char const*) [clone .localalias]':
36.80 ub_duckdb_common.cpp:(.text+0x6acc): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_common.cpp.o): in function `duckdb::Printer::RawPrint(duckdb::OutputStream, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
36.80 ub_duckdb_common.cpp:(.text+0x74c6): undefined reference to `__fprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_common_types.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_common_types.cpp:(.text+0x1858): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_execution_index_art.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_execution_index_art.cpp:(.text+0x352): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_expression.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_expression.cpp:(.text+0x138e): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_expression_binders.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_expression_binders.cpp:(.text+0x2b7): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_func_table.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_func_table.cpp:(.text+0xaa7): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main.cpp.o):ub_duckdb_main.cpp:(.text+0x982): more undefined references to `__vsnprintf_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::detail::SocketStream::is_writable() const':
36.80 ub_duckdb_main_extension.cpp:(.text._ZNK14duckdb_httplib6detail12SocketStream11is_writableEv[_ZNK14duckdb_httplib6detail12SocketStream11is_writableEv]+0x57): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::detail::SocketStream::write(char const*, unsigned long)':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6detail12SocketStream5writeEPKcm[_ZN14duckdb_httplib6detail12SocketStream5writeEPKcm]+0x7a): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::detail::SocketStream::is_readable() const':
36.80 ub_duckdb_main_extension.cpp:(.text._ZNK14duckdb_httplib6detail12SocketStream11is_readableEv[_ZNK14duckdb_httplib6detail12SocketStream11is_readableEv]+0x57): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::detail::SocketStream::read(char*, unsigned long)':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6detail12SocketStream4readEPcm[_ZN14duckdb_httplib6detail12SocketStream4readEPcm]+0xf5): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `int duckdb_httplib::detail::create_socket<duckdb_httplib::detail::create_client_socket(char const*, char const*, int, int, bool, std::function<void (int)>, long, long, long, long, long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, duckdb_httplib::Error&)::{lambda(int, addrinfo&)#1}>(char const*, char const*, int, int, int, bool, std::function<void (int)>, duckdb_httplib::detail::create_client_socket(char const*, char const*, int, int, bool, std::function<void (int)>, long, long, long, long, long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, duckdb_httplib::Error&)::{lambda(int, addrinfo&)#1})':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6detail13create_socketIZNS0_20create_client_socketEPKcS3_iibSt8functionIFviEEllllllRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ErrorEEUliR8addrinfoE_EEiS3_S3_iiibS6_T_[_ZN14duckdb_httplib6detail13create_socketIZNS0_20create_client_socketEPKcS3_iibSt8functionIFviEEllllllRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ErrorEEUliR8addrinfoE_EEiS3_S3_iiibS6_T_]+0x379): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o):ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6detail13create_socketIZNS0_20create_client_socketEPKcS3_iibSt8functionIFviEEllllllRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ErrorEEUliR8addrinfoE_EEiS3_S3_iiibS6_T_[_ZN14duckdb_httplib6detail13create_socketIZNS0_20create_client_socketEPKcS3_iibSt8functionIFviEEllllllRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ErrorEEUliR8addrinfoE_EEiS3_S3_iiibS6_T_]+0x390): more undefined references to `__fdelt_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `int duckdb_httplib::detail::create_socket<duckdb_httplib::detail::create_client_socket(char const*, char const*, int, int, bool, std::function<void (int)>, long, long, long, long, long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, duckdb_httplib::Error&)::{lambda(int, addrinfo&)#1}>(char const*, char const*, int, int, int, bool, std::function<void (int)>, duckdb_httplib::detail::create_client_socket(char const*, char const*, int, int, bool, std::function<void (int)>, long, long, long, long, long, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, duckdb_httplib::Error&)::{lambda(int, addrinfo&)#1})':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6detail13create_socketIZNS0_20create_client_socketEPKcS3_iibSt8functionIFviEEllllllRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ErrorEEUliR8addrinfoE_EEiS3_S3_iiibS6_T_[_ZN14duckdb_httplib6detail13create_socketIZNS0_20create_client_socketEPKcS3_iibSt8functionIFviEEllllllRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ErrorEEUliR8addrinfoE_EEiS3_S3_iiibS6_T_]+0x796): undefined reference to `__res_init'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::ClientImpl::send(duckdb_httplib::Request&, duckdb_httplib::Response&, duckdb_httplib::Error&)':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib10ClientImpl4sendERNS_7RequestERNS_8ResponseERNS_5ErrorE[_ZN14duckdb_httplib10ClientImpl4sendERNS_7RequestERNS_8ResponseERNS_5ErrorE]+0xa95): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::ClientImpl::write_request(duckdb_httplib::Stream&, duckdb_httplib::Request&, bool, duckdb_httplib::Error&)':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE[_ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE]+0x31f): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE[_ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE]+0x422): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE[_ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE]+0x5bd): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE[_ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE]+0x7f9): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE[_ZN14duckdb_httplib10ClientImpl13write_requestERNS_6StreamERNS_7RequestEbRNS_5ErrorE]+0x8eb): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o):ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6Server19write_response_coreERNS_6StreamEbRKNS_7RequestERNS_8ResponseEb[_ZN14duckdb_httplib6Server19write_response_coreERNS_6StreamEbRKNS_7RequestERNS_8ResponseEb]+0x309): more undefined references to `__snprintf_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::Server::process_and_close_socket(int)':
36.80 ub_duckdb_main_extension.cpp:(.text._ZN14duckdb_httplib6Server24process_and_close_socketEi[_ZN14duckdb_httplib6Server24process_and_close_socketEi]+0x104): undefined reference to `__fdelt_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_main_relation.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_main_relation.cpp:(.text+0x667): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_operator_helper.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_operator_helper.cpp:(.text+0x68d): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_optimizer_join_order.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_optimizer_join_order.cpp:(.text+0x467): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_storage.cpp:(.text+0x1083): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage.cpp.o): in function `duckdb::SerializeVersionNumber(duckdb::WriteStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
36.80 ub_duckdb_storage.cpp:(.text+0x5cd7): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_storage_compression.cpp:(.text+0x1d87): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o): in function `duckdb::DictionaryCompressionStorage::FinalizeCompress(duckdb::CompressionState&)':
36.80 ub_duckdb_storage_compression.cpp:(.text+0x8882): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o): in function `duckdb::unique_ptr<duckdb::SegmentScanState, std::default_delete<duckdb::SegmentScanState>, true> duckdb::AlpRDInitScan<double>(duckdb::ColumnSegment&)':
36.80 ub_duckdb_storage_compression.cpp:(.text._ZN6duckdb13AlpRDInitScanIdEENS_10unique_ptrINS_16SegmentScanStateESt14default_deleteIS2_ELb1EEERNS_13ColumnSegmentE[_ZN6duckdb13AlpRDInitScanIdEENS_10unique_ptrINS_16SegmentScanStateESt14default_deleteIS2_ELb1EEERNS_13ColumnSegmentE]+0xe5): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o): in function `duckdb::unique_ptr<duckdb::SegmentScanState, std::default_delete<duckdb::SegmentScanState>, true> duckdb::AlpRDInitScan<float>(duckdb::ColumnSegment&)':
36.80 ub_duckdb_storage_compression.cpp:(.text._ZN6duckdb13AlpRDInitScanIfEENS_10unique_ptrINS_16SegmentScanStateESt14default_deleteIS2_ELb1EEERNS_13ColumnSegmentE[_ZN6duckdb13AlpRDInitScanIfEENS_10unique_ptrINS_16SegmentScanStateESt14default_deleteIS2_ELb1EEERNS_13ColumnSegmentE]+0xe5): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o): in function `void duckdb::BitpackingPrimitives::PackBuffer<unsigned int, false>(unsigned char*, unsigned int*, unsigned long, unsigned char)':
36.80 ub_duckdb_storage_compression.cpp:(.text._ZN6duckdb20BitpackingPrimitives10PackBufferIjLb0EEEvPhPT_mh[_ZN6duckdb20BitpackingPrimitives10PackBufferIjLb0EEEvPhPT_mh]+0xe1): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o): in function `duckdb::unique_ptr<duckdb::CompressionState, std::default_delete<duckdb::CompressionState>, true> duckdb::AlpRDInitCompression<float>(duckdb::ColumnDataCheckpointer&, duckdb::unique_ptr<duckdb::AnalyzeState, std::default_delete<duckdb::AnalyzeState>, true>)':
36.80 ub_duckdb_storage_compression.cpp:(.text._ZN6duckdb20AlpRDInitCompressionIfEENS_10unique_ptrINS_16CompressionStateESt14default_deleteIS2_ELb1EEERNS_22ColumnDataCheckpointerENS1_INS_12AnalyzeStateES3_IS8_ELb1EEE[_ZN6duckdb20AlpRDInitCompressionIfEENS_10unique_ptrINS_16CompressionStateESt14default_deleteIS2_ELb1EEERNS_22ColumnDataCheckpointerENS1_INS_12AnalyzeStateES3_IS8_ELb1EEE]+0x1a8): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_storage_compression.cpp.o):ub_duckdb_storage_compression.cpp:(.text._ZN6duckdb20AlpRDInitCompressionIdEENS_10unique_ptrINS_16CompressionStateESt14default_deleteIS2_ELb1EEERNS_22ColumnDataCheckpointerENS1_INS_12AnalyzeStateES3_IS8_ELb1EEE[_ZN6duckdb20AlpRDInitCompressionIdEENS_10unique_ptrINS_16CompressionStateESt14default_deleteIS2_ELb1EEERNS_22ColumnDataCheckpointerENS1_INS_12AnalyzeStateES3_IS8_ELb1EEE]+0x1a8): more undefined references to `__memcpy_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_table_func_system.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.80 ub_duckdb_table_func_system.cpp:(.text+0x1582): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(format.cc.o): in function `char* duckdb_fmt::v6::internal::sprintf_format<double>(double, duckdb_fmt::v6::internal::buffer<char>&, duckdb_fmt::v6::internal::sprintf_specs)':
36.80 format.cc:(.text._ZN10duckdb_fmt2v68internal14sprintf_formatIdEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE[_ZN10duckdb_fmt2v68internal14sprintf_formatIdEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE]+0xc7): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: format.cc:(.text._ZN10duckdb_fmt2v68internal14sprintf_formatIdEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE[_ZN10duckdb_fmt2v68internal14sprintf_formatIdEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE]+0x13a): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(format.cc.o): in function `char* duckdb_fmt::v6::internal::sprintf_format<long double>(long double, duckdb_fmt::v6::internal::buffer<char>&, duckdb_fmt::v6::internal::sprintf_specs)':
36.80 format.cc:(.text._ZN10duckdb_fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE[_ZN10duckdb_fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE]+0xc6): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: format.cc:(.text._ZN10duckdb_fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE[_ZN10duckdb_fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE]+0x141): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(format.cc.o): in function `int duckdb_fmt::v6::internal::snprintf_float<double>(double, int, duckdb_fmt::v6::internal::float_specs, duckdb_fmt::v6::internal::buffer<char>&)':
36.80 format.cc:(.text._ZN10duckdb_fmt2v68internal14snprintf_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE[_ZN10duckdb_fmt2v68internal14snprintf_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE]+0xe5): undefined reference to `__snprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(format.cc.o):format.cc:(.text._ZN10duckdb_fmt2v68internal14snprintf_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE[_ZN10duckdb_fmt2v68internal14snprintf_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE]+0x14b): more undefined references to `__snprintf_chk' follow
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(libfsst.cpp.o): in function `compressBulk(SymbolTable&, unsigned long, unsigned long*, unsigned char**, unsigned long, unsigned char*, unsigned long*, unsigned char**, bool, bool)':
36.80 libfsst.cpp:(.text+0x33a): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(libfsst.cpp.o): in function `buildSymbolTable(Counters&, std::vector<unsigned char*, std::allocator<unsigned char*> >, unsigned long*, bool)':
36.80 libfsst.cpp:(.text+0x2b19): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: libfsst.cpp:(.text+0x2bd5): undefined reference to `__memcpy_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(pg_functions.cpp.o): in function `duckdb_libpgquery::errmsg(char const*, ...)':
36.80 pg_functions.cpp:(.text+0x636): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(pg_functions.cpp.o): in function `duckdb_libpgquery::psprintf(char const*, ...)':
36.80 pg_functions.cpp:(.text+0x77c): undefined reference to `__vsnprintf_chk'
36.80 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: pg_functions.cpp:(.text+0x9af): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(re2.cc.o): in function `bool duckdb_re2::re2_internal::Parse<float>(char const*, unsigned long, float*)':
36.81 re2.cc:(.text+0x1349): undefined reference to `__memmove_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: re2.cc:(.text+0x1398): undefined reference to `__memmove_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(re2.cc.o): in function `bool duckdb_re2::re2_internal::Parse<double>(char const*, unsigned long, double*)':
36.81 re2.cc:(.text+0x1549): undefined reference to `__memmove_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: re2.cc:(.text+0x1598): undefined reference to `__memmove_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(re2.cc.o): in function `bool duckdb_re2::re2_internal::Parse<long>(char const*, unsigned long, long*, int)':
36.81 re2.cc:(.text+0x1744): undefined reference to `__memmove_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(re2.cc.o):re2.cc:(.text+0x1771): more undefined references to `__memmove_chk' follow
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(sds.cpp.o): in function `duckdb_hll::sdscatvprintf(char*, char const*, __va_list_tag*)':
36.81 sds.cpp:(.text+0x1142): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(strutil.cc.o): in function `duckdb_re2::StringAppendV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, __va_list_tag*)':
36.81 strutil.cc:(.text+0x69): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: strutil.cc:(.text+0xcd): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(strutil.cc.o): in function `duckdb_re2::CEscape[abi:cxx11](duckdb_re2::StringPiece const&)':
36.81 strutil.cc:(.text+0x3a7): undefined reference to `__snprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_csv_scanner.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.81 ub_duckdb_csv_scanner.cpp:(.text+0x6ce): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_csv_sniffer.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.81 ub_duckdb_csv_sniffer.cpp:(.text+0x8fe): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_csv_util.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.81 ub_duckdb_csv_util.cpp:(.text+0x297): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_func_compressed_materialization.cpp.o): in function `duckdb::hugeint_t duckdb::StringCompress<duckdb::hugeint_t>(duckdb::string_t const&)':
36.81 ub_duckdb_func_compressed_materialization.cpp:(.text+0x1ca): undefined reference to `__memset_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(ub_duckdb_operator_order.cpp.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) [clone .constprop.0]':
36.81 ub_duckdb_operator_order.cpp:(.text+0x2ae): undefined reference to `__vsnprintf_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(miniz.cpp.o): in function `duckdb_miniz::mz_zip_writer_write_zeros(duckdb_miniz::mz_zip_archive*, unsigned long, unsigned int)':
36.81 miniz.cpp:(.text+0x3f2): undefined reference to `__memset_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(miniz.cpp.o): in function `duckdb_miniz::tdefl_start_dynamic_block(duckdb_miniz::tdefl_compressor*)':
36.81 miniz.cpp:(.text+0x1d70): undefined reference to `__memcpy_chk'
36.81 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/marcboeker/go-duckdb@v1.7.0/deps/linux_amd64/libduckdb.a(entropy_common.cpp.o): in function `duckdb_zstd::FSE_readNCount(short*, unsigned int*, unsigned int*, void const*, unsigned long) [clone .localalias]':
36.81 entropy_common.cpp:(.text+0xd6): undefined reference to `__memcpy_chk'
36.81 collect2: error: ld returned 1 exit status
36.81
------
Dockerfile:16
--------------------
14 | COPY .. .
15 |
16 | >>> RUN go build -tags="no_duckdb_arrow" -o built/bin/nq ./cmd/nq
17 |
18 | FROM golang:1.22.5-alpine
@BestNathan
Maybe this helps? It works on my Mac and I'ma able to cross compile to linux/amd64.
You need to adjust it back to your settings, but the idea with FROM --platform=linux/amd64 golang:1.22 as build
should do the trick.
FROM --platform=linux/amd64 golang:1.22 as build
WORKDIR /opt/nq
ENV CGO_ENABLED=1
ENV GOOS=linux
ENV GOARCH=amd64
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY .. .
RUN go build -tags="no_duckdb_arrow" -o /opt/nq/built ./main.go
FROM alpine:3.20.1
ARG USER_ID=10001
ENV TZ=Asia/Shanghai
WORKDIR /opt/nq
COPY --from=build /opt/nq/built /opt/nq/built
COPY --from=build /etc/passwd /etc/passwd
RUN adduser -u ${USER_ID} -D nq
RUN adduser -uid ${USER_ID} nq
USER nq
RUN mkdir -p ~/.nq
CMD [ "/opt/nq/built" ]
@BestNathan
Maybe this helps? It works on my Mac and I'ma able to cross compile to linux/amd64. You need to adjust it back to your settings, but the idea with
FROM --platform=linux/amd64 golang:1.22 as build
should do the trick.FROM --platform=linux/amd64 golang:1.22 as build WORKDIR /opt/nq ENV CGO_ENABLED=1 ENV GOOS=linux ENV GOARCH=amd64 COPY go.mod go.sum ./ RUN go mod download && go mod verify COPY .. . RUN go build -tags="no_duckdb_arrow" -o /opt/nq/built ./main.go FROM alpine:3.20.1 ARG USER_ID=10001 ENV TZ=Asia/Shanghai WORKDIR /opt/nq COPY --from=build /opt/nq/built /opt/nq/built COPY --from=build /etc/passwd /etc/passwd RUN adduser -u ${USER_ID} -D nq RUN adduser -uid ${USER_ID} nq USER nq RUN mkdir -p ~/.nq CMD [ "/opt/nq/built" ]
thanks a lot!
Still not work for me. It reported an error with "no such file or directory", and I ran sh
within the image and found shared libs not found. but when these missing libs installed done, it still say "not found __res_init symbol balabala"
I found that dynamic link
could build and run within alpine
image, and I decided to use this solution for now.
I have learned a lot of knowledge about building with cgo
these days, it is really hard for me but fun.
I will go througth this problem when I am free. If I hava any progress on this I will let you know, also I will follow this project for more information.
Thanks again for your help.
I'm trying a few ways to statically compile the
examples
package in this repo and I can't seem to get something to work.Results in:
So far the results have been the same regardless of what I provide to CGO_LDFLAGS, including
CGO_LDFLAGS="-L/usr/lib"
.I tried also on
alpine
withzig
and the results are a lot different.gives me a whole bunch of undefined symbols:
Any ideas what I'm doing wrong? :thinking: