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 fails with undefined nghttp2 references when pkg-config is not installed #11186

Closed
correctmost opened this issue May 23, 2023 · 0 comments
Assignees

Comments

@correctmost
Copy link
Contributor

I did this

I tried to compile curl on Manjaro Linux and encountered linking failures because I didn't have pkg-config installed.

Steps to reproduce

  • Save the following Dockerfile
FROM archlinux:base-20230521.0.152478
USER root

# Note: pkg-config is *not* included
RUN pacman -Sy --noconfirm autoconf automake binutils gcc git libtool make

WORKDIR /root/
RUN git clone --depth 1 https://github.com/curl/curl.git

WORKDIR /root/curl
RUN autoreconf -fi && \
  ./configure --with-openssl && \
  make -j3
  • Run docker image build . -f Dockerfile -t curl:nghttp2-config-repro

Docker build results

#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_consume'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_pack_settings_payload'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_http2_strerror'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_submit_request'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_submit_rst_stream'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_priority_spec_init'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_get_stream_user_data'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_strerror'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_client_new2'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_on_data_chunk_recv_callback'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_get_stream_remote_window_size'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_set_stream_user_data'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_send'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_del'
#0 81.52 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_submit_ping'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_send_callback'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_option_set_no_auto_window_update'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_on_frame_recv_callback'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_option_new'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_get_remote_window_size'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_new'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_want_read'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_check_request_allowed'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_is_fatal'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_mem_recv'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_submit_priority'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_want_write'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_upgrade2'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_option_del'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_submit_settings'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_on_begin_headers_callback'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_error_callback'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_on_stream_close_callback'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_callbacks_set_on_header_callback'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_resume_data'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_set_local_window_size'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_get_remote_settings'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_version'
#0 81.53 /usr/sbin/ld: ../lib/.libs/libcurl.so: undefined reference to `nghttp2_session_del'
#0 81.53 collect2: error: ld returned 1 exit status
#0 81.54 make[2]: *** [Makefile:1018: curl] Error 1
#0 81.54 make[2]: Leaving directory '/root/curl/src'
#0 81.54 make[1]: *** [Makefile:1496: all-recursive] Error 1
#0 81.54 make[1]: Leaving directory '/root/curl/src'
#0 81.54 make: *** [Makefile:1267: all-recursive] Error 1

I expected the following

I would expect the configure script to fail if all dependencies are not met.

curl/libcurl version

2706bc0

Operating System

Linux [hostname] 6.1.29-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed May 17 14:00:55 UTC 2023 x86_64 GNU/Linux

Related changes:

@bagder bagder self-assigned this May 26, 2023
bagder added a commit that referenced this issue May 26, 2023
@bagder bagder closed this as completed in 814d3ff May 28, 2023
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants