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

linking curl fails with ../lib/.libs/libcurl.so: undefined reference to Curl_base64_encode #5937

Closed
michaelolbrich opened this issue Sep 8, 2020 · 6 comments
Assignees
Labels

Comments

@michaelolbrich
Copy link

I tried to compile curl with --disable-http-auth --disable-ldap --disable-doh and all ssl and ssh related options disabled. Basically all options to ensure that the #if ... at the beginning of lib/base64.c is false.

No building fails with ../lib/.libs/libcurl.so: undefined reference to Curl_base64_encode because Curl_base64_encode is not built but it is still used in lib/vauth/oauth2.c and lib/vauth/cleartext.c.

I'm not quite sure what the correct solution is, but I think Curl_base64_encode is always used in lib/vauth/cleartext.c so it should probably build unconditionally. But I'm not sure if I understand the build-system correctly.

@bagder bagder added the build label Sep 8, 2020
@bagder
Copy link
Member

bagder commented Sep 8, 2020

This would be easier for us if you could tell us the exact command line you used with configure so that we can try to reproduce it!

@bagder
Copy link
Member

bagder commented Sep 8, 2020

Also, you didn't mention which curl version or what platform.

@bagder bagder self-assigned this Sep 8, 2020
@michaelolbrich
Copy link
Author

michaelolbrich commented Sep 8, 2020

Right, I forgot about the version. I had the problem originally with 7.66.0. I then tested with 7.72.0 with the following configure command-line:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --build=x86_64-host-linux-gnu --host=arm-v7a-linux-gnueabihf --disable-debug --enable-optimize --disable-warnings --disable-werror --disable-curldebug --enable-symbol-hiding --enable-hidden-symbols --enable-ares --enable-rt --disable-esni --disable-code-coverage --enable-largefile --disable-http --disable-ftp --enable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --enable-tftp --disable-pop3 --disable-imap --disable-smb --enable-smtp --disable-gopher --disable-mqtt --disable-manual --enable-libcurl-option --disable-libgcc --disable-ipv6 --enable-openssl-auto-load-config --disable-versioned-symbols --disable-threaded-resolver --enable-pthreads --enable-verbose --disable-sspi --disable-crypto-auth --disable-ntlm-wb --enable-tls-srp --enable-unix-sockets --disable-cookies --disable-http-auth --disable-doh --disable-mime --enable-dateparse --enable-netrc --enable-progress-meter --disable-dnsshuffle --disable-alt-svc --without-brotli --without-zstd --without-gssapi --with-default-ssl-backend=no --without-winssl --without-schannel --without-darwinssl --without-secure-transport --without-amissl --with-ssl=no --with-random=/dev/urandom --without-gnutls --without-mbedtls --without-wolfssl --without-mesalink --without-bearssl --without-nss --with-ca-bundle="no" --with-ca-path="no" --without-ca-fallback --without-libpsl --without-libmetalink --without-libssh2 --without-libssh --without-wolfssh --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-zsh-functions-dir --without-fish-functions-dir

Note that I'm cross-compiling here, so you'll still need to modify this.

I looked at master but I didn't see any relevant changes, so I didn't test that.

bagder added a commit that referenced this issue Sep 8, 2020
The oauth2 support is used with SMTP and it uses base64 functions.

Reported-by: Michael Olbrich
Fixes #5937
@bagder
Copy link
Member

bagder commented Sep 8, 2020

The fix in #5938 made the build succeed for me.

@bagder bagder closed this as completed in 20417a1 Sep 9, 2020
@michaelolbrich
Copy link
Author

Still fails with:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --build=x86_64-host-linux-gnu --host=arm-v7a-linux-gnueabihf --disable-debug --enable-optimize --disable-warnings --disable-werror --disable-curldebug --enable-symbol-hiding --enable-hidden-symbols --enable-ares --enable-rt --disable-esni --disable-code-coverage --enable-largefile --disable-http --disable-ftp --enable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --enable-tftp --enable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-mqtt --disable-manual --enable-libcurl-option --disable-libgcc --disable-ipv6 --enable-openssl-auto-load-config --disable-versioned-symbols --disable-threaded-resolver --enable-pthreads --enable-verbose --disable-sspi --disable-crypto-auth --disable-ntlm-wb --enable-tls-srp --enable-unix-sockets --disable-cookies --disable-http-auth --disable-doh --disable-mime --enable-dateparse --enable-netrc --enable-progress-meter --disable-dnsshuffle --disable-alt-svc --without-brotli --without-zstd --without-gssapi --with-default-ssl-backend=no --without-winssl --without-schannel --without-darwinssl --without-secure-transport --without-amissl --with-ssl=no --with-random=/dev/urandom --without-gnutls --without-mbedtls --without-wolfssl --without-mesalink --without-bearssl --without-nss --with-ca-bundle="no" --with-ca-path="no" --without-ca-fallback --without-libpsl --without-libmetalink --without-libssh2 --without-libssh --without-wolfssh --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-zsh-functions-dir --without-fish-functions-dir

or

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --build=x86_64-host-linux-gnu --host=arm-v7a-linux-gnueabihf --disable-debug --enable-optimize --disable-warnings --disable-werror --disable-curldebug --enable-symbol-hiding --enable-hidden-symbols --enable-ares --enable-rt --disable-esni --disable-code-coverage --enable-largefile --disable-http --disable-ftp --enable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --enable-tftp --disable-pop3 --enable-imap --disable-smb --disable-smtp --disable-gopher --disable-mqtt --disable-manual --enable-libcurl-option --disable-libgcc --disable-ipv6 --enable-openssl-auto-load-config --disable-versioned-symbols --disable-threaded-resolver --enable-pthreads --enable-verbose --disable-sspi --disable-crypto-auth --disable-ntlm-wb --enable-tls-srp --enable-unix-sockets --disable-cookies --disable-http-auth --disable-doh --disable-mime --enable-dateparse --enable-netrc --enable-progress-meter --disable-dnsshuffle --disable-alt-svc --without-brotli --without-zstd --without-gssapi --with-default-ssl-backend=no --without-winssl --without-schannel --without-darwinssl --without-secure-transport --without-amissl --with-ssl=no --with-random=/dev/urandom --without-gnutls --without-mbedtls --without-wolfssl --without-mesalink --without-bearssl --without-nss --with-ca-bundle="no" --with-ca-path="no" --without-ca-fallback --without-libpsl --without-libmetalink --without-libssh2 --without-libssh --without-wolfssh --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-zsh-functions-dir --without-fish-functions-dir

This is mostly the same as above but with --disable-smtp and --enable-pop3 and --enable-imap respectively.

So I guess something like this should be added as well:

  !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \

@bagder
Copy link
Member

bagder commented Sep 9, 2020

It's not still when you changed the condition. You found another glitch it seems. Rare build combinations...

bagder added a commit that referenced this issue Sep 9, 2020
Follow-up to the fix in 20417a1

Reported-by: Michael Olbrich
Fixes #5937
bagder added a commit that referenced this issue Sep 10, 2020
Follow-up to the fix in 20417a1

Reported-by: Michael Olbrich
Fixes #5937
Closes #5948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants