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

curl does not pass a ldflag to brotli on Linux: clang-14: error: linker command failed with exit code 1 #115

Open
barracuda156 opened this issue Sep 4, 2024 · 5 comments

Comments

@barracuda156
Copy link
Contributor

/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/clang  -pipe -Os -Qunused-arguments -Werror-implicit-function-declaration    -L/opt/local/lib -Wl,--enable-new-dtags -Wl,-rpath,/opt/local/lib -L/opt/local/lib -L/opt/local/lib -L/opt/local/libexec/openssl3/lib -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -o curl slist_wc.o terminal.o tool_binmode.o tool_bname.o tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_soc.o tool_cb_wrt.o tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o tool_ipfs.o tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_setopt.o tool_sleep.o tool_stderr.o tool_strdup.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o tool_xattr.o var.o ../lib/base64.o ../lib/curl_multibyte.o ../lib/dynbuf.o ../lib/nonblock.o ../lib/strtoofft.o ../lib/timediff.o ../lib/version_win32.o ../lib/warnless.o   ../lib/libcurl.la -lssl -lcrypto -lz  
libtool: link: /usr/bin/clang -pipe -Os -Qunused-arguments -Werror-implicit-function-declaration -Wl,--enable-new-dtags -Wl,-rpath -Wl,/opt/local/lib -o .libs/curl slist_wc.o terminal.o tool_binmode.o tool_bname.o tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_soc.o tool_cb_wrt.o tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o tool_ipfs.o tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_setopt.o tool_sleep.o tool_stderr.o tool_strdup.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o tool_xattr.o var.o ../lib/base64.o ../lib/curl_multibyte.o ../lib/dynbuf.o ../lib/nonblock.o ../lib/strtoofft.o ../lib/timediff.o ../lib/version_win32.o ../lib/warnless.o  -L/opt/local/lib -L/opt/local/libexec/openssl3/lib ../lib/.libs/libcurl.so -lssl -lcrypto -lz -Wl,-rpath -Wl,/opt/local/lib
/usr/bin/riscv64-pine64-linux-ld: ../lib/.libs/libcurl.so: undefined reference to `BrotliDecoderCreateInstance'
/usr/bin/riscv64-pine64-linux-ld: ../lib/.libs/libcurl.so: undefined reference to `BrotliDecoderVersion'
/usr/bin/riscv64-pine64-linux-ld: ../lib/.libs/libcurl.so: undefined reference to `BrotliDecoderDestroyInstance'
/usr/bin/riscv64-pine64-linux-ld: ../lib/.libs/libcurl.so: undefined reference to `BrotliDecoderDecompressStream'
/usr/bin/riscv64-pine64-linux-ld: ../lib/.libs/libcurl.so: undefined reference to `BrotliDecoderGetErrorCode'
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:1016: curl] Error 1
make[1]: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_macstrop_net_curl/curl/work/curl-8.9.1/src'
make: *** [Makefile:1229: all-recursive] Error 1
make: Leaving directory '/opt/local/var/macports/build/_home_svacchanda_macstrop_net_curl/curl/work/curl-8.9.1'
Command failed:  cd "/opt/local/var/macports/build/_home_svacchanda_macstrop_net_curl/curl/work/curl-8.9.1" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build curl: command execution failed
@barracuda156
Copy link
Contributor Author

Without +brotli among default variants it builds:

sh-5.1# port -v installed curl
The following ports are currently installed:
  curl @8.9.1_1+http2+idn+psl+ssl (active) requested_variants='+http2+idn+psl+ssl' platform='linux 3' archs='riscv64' date='2024-09-04T19:13:11+0000'

@RJVB
Copy link
Owner

RJVB commented Sep 4, 2024 via email

@barracuda156
Copy link
Contributor Author

Initially I just tried to install whatever default curl had, without specifying variants. Defaults include brotli via standard.
Since I could not install it with brotli enabled, output from the command above does not include it. How should I check if brotli is correctly detected?

@barracuda156
Copy link
Contributor Author

sh-5.1# patchelf --print-needed /opt/local/lib/libcurl.so
libnghttp2.so.14
libidn2.so.0
libpsl.so.5
libssl.so.3
libcrypto.so.3
libz.so.1
libc.so.6

sh-5.1# port -v installed curl
The following ports are currently installed:
  curl @8.9.1_1+http2+idn+psl+ssl (active) requested_variants='+http2+idn+psl+ssl' platform='linux 3' archs='riscv64' date='2024-09-04T19:13:11+0000'

@RJVB
Copy link
Owner

RJVB commented Sep 4, 2024 via email

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

2 participants