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

Warnings when statically linking #330

Open
proofrock opened this issue Dec 11, 2024 · 0 comments
Open

Warnings when statically linking #330

proofrock opened this issue Dec 11, 2024 · 0 comments

Comments

@proofrock
Copy link

Hi,
sorry but I cannot find references to this problem. I am building a project of mine statically:

go build -trimpath -a -tags="netgo osusergo sqlite_omit_load_extension" -ldflags='-w -extldflags "-static"'

But it complains (I will put the whole output later, this is the gist of it):
warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

My project also use mattn's sqlite, and it had the same problem; I solved it by disabling the extensions with the sqlite_omit_load_extension that you can see above. Is there a similar path in duckdb?

Best regards, and thank you,

 G.

/usr/bin/ld: /home/mano/go/pkg/mod/github.com/marcboeker/go-duckdb@v1.8.3/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb::ExtensionHelper::TryInitialLoad(duckdb::DatabaseInstance&, duckdb::FileSystem&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, duckdb::ExtensionInitResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
ub_duckdb_main_extension.cpp:(.text+0x5f07): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/mano/go/pkg/mod/github.com/marcboeker/go-duckdb@v1.8.3/deps/linux_amd64/libduckdb.a(ub_duckdb_main_extension.cpp.o): in function `duckdb_httplib::detail::create_client_socket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<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}::operator()(int, addrinfo&) const':
ub_duckdb_main_extension.cpp:(.text._ZZN14duckdb_httplib6detail20create_client_socketERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iibSt8functionIFviEEllllllS8_RNS_5ErrorEENKUliR8addrinfoE_clEiSF_[_ZZN14duckdb_httplib6detail20create_client_socketERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iibSt8functionIFviEEllllllS8_RNS_5ErrorEENKUliR8addrinfoE_clEiSF_]+0x27a): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/mano/go/pkg/mod/github.com/marcboeker/go-duckdb@v1.8.3/deps/linux_amd64/libduckdb.a(ub_duckdb_common.cpp.o): in function `duckdb::LocalFileSystem::OpenFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, duckdb::FileOpenFlags, duckdb::optional_ptr<duckdb::FileOpener, true>)':
ub_duckdb_common.cpp:(.text+0x49eb5): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
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

1 participant