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 tries to generate shell completions even when --without-*-functions-dir is given #13027

av223119 opened this issue Mar 1, 2024 · 5 comments


Copy link

av223119 commented Mar 1, 2024

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 ./ --curl ../src/curl --shell zsh > _curl ; fi
curl/src/.libs/curl: error while loading shared libraries: 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

Copy link

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.

@dfandrich dfandrich self-assigned this Mar 1, 2024
dfandrich added a commit that referenced this issue Mar 2, 2024
With the recent changes to completion file building, the files were
built always and only installation was selectively disabled.  Now, when
they are disabled they aren't even built, avoiding a build-time error in
environments where it's not possible to run the curl binary that was
just created (e.g. if library paths were not set up correctly).

Follow-up to 0f7aba8

Reported-by: av223119 on github
Fixes #13027
Closes #13030
@dfandrich dfandrich added the build label Mar 2, 2024
Copy link

av223119 commented Mar 4, 2024

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

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

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

Copy link

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?

Copy link

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?

Copy link

BrianInglis commented Apr 2, 2024

The previous maintainer started installing shell completions in 2016-01 curl 7.47.0 without any config changes:
but in 2016-05 curl 7.49.0 he added make -C scripts install aka cyginstall -C scripts:
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

Successfully merging a pull request may close this issue.

3 participants