Skip to content

Curl tries to generate shell completions even when --without-*-functions-dir is given #13027

Description

@av223119

I did this

After the commit 89733e2, curl tries to generate completions even when --without-*-functions-dir. This is bad when curl is built against the libraries residing in non-standard places:

./configure  --with-openssl=...   --without-zsh-functions-dir --without-fish-functions-dir

after the successful build, completion generation fails, as the linker couldn't find the libraries

make[1]: Entering directory 'curl/scripts'
if test -z "/usr/bin/perl"; then echo "No perl: can't install completion script"; else \
/usr/bin/perl ./completion.pl --curl ../src/curl --shell zsh > _curl ; fi
curl/src/.libs/curl: error while loading shared libraries: libssl.so.81.1.1: cannot open shared object file: No such file or directory

I expected the following

No response

curl/libcurl version

Curl 8.6.0 - 89733e2

operating system

Ubuntu Linux

Activity

  1. dfandrich commented on Mar 1, 2024

    @dfandrich
    Contributor

    The --without-* flags still generate the completion files, but they're simply not installed in that case. curl is run using the normal libtool wrapper in src/curl so I don't know why it's not finding these libs. Are you able to run the test suite in this build configuration? Maybe it's broken all around.

    It's probably safest to simply skip altogether the completion generation script step if the scripts have been disabled instead.

  2. self-assigned this
    on Mar 1, 2024
  3. added a commit that references this issue on Mar 2, 2024
    c4695f6
  4. added a commit that references this issue on Mar 3, 2024
    ab173d1
  5. av223119 commented on Mar 4, 2024

    @av223119
    Author

    Thanks.
    To answer your question, albeit a little to late, for interoperability testing I build and run many instances of curl built with different feature sets. Since the libraries the concrete curl depends on might or might not be present on the target system, curl is built to be deployed into /opt/curl_$featureset/bin and looks for its libraries in /opt/curl_$featureset/lib

    ./configure
    LDFLAGS="-Wl,-rpath,/opt/curl_${featureset}/lib" \
    ${with_vars}
    

    So it does work when deployed from the package built, and does not work when invoked from the build location.

  6. BrianInglis commented on Mar 30, 2024

    @BrianInglis
    Contributor

    Build no longer seems to default to build shell completions but requires explicit --with-fish-functions-dir and --with-zsh-functions-dir configure options specified!
    Was this the intent of the patch?

  7. dfandrich commented on Apr 2, 2024

    @dfandrich
    Contributor

    The old code didn't build shell completions by default, either, at least with configure;make;make install. What were you running that caused them to be built?

  8. BrianInglis commented on Apr 2, 2024

    @BrianInglis
    Contributor

    The previous maintainer started installing shell completions in 2016-01 curl 7.47.0 without any config changes:
    https://cygwin.com/cgit/cygwin-packages/curl/commit/curl.cygport?id=ae7f8b46f2e6b74933da77e70df79be53c2523b3
    but in 2016-05 curl 7.49.0 he added make -C scripts install aka cyginstall -C scripts:
    https://cygwin.com/cgit/cygwin-packages/curl/commit/curl.cygport?id=0735de76153a2ec09e2ef77c289c82e10cac79f3
    and we added other minor tweaks over the years, but it only broke in 8.7.0/1 - we skipped the former!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions