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

can fix no version information available when build libcurl use cmake??? #14349

Closed
xiedeacc opened this issue Aug 2, 2024 · 4 comments
Closed

Comments

@xiedeacc
Copy link

xiedeacc commented Aug 2, 2024

I did this

I know we can use ./configure --enable-versioned-symbols l, but how to enable versioned symbols use cmake? can guys fix this?

I expected the following

No response

curl/libcurl version

curl 8.10.0-DEV (x86_64-pc-linux-gnu) libcurl/8.10.0-DEV OpenSSL/3.3.1 zlib/1.3.1.1-motley brotli/1.1.0 zstd/1.5.6
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli HSTS HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets zstd

operating system

ubuntu22.04

@vszakats
Copy link
Member

vszakats commented Aug 3, 2024

That's the commit implementing this feature for autotools, in case anyone is wondering what's it about:
7cc2e8b

It's ld/lld-specific and on a quick glance can be enabled with CMake by passing a custom linker option (via -DCMAKE_SHARED_LINKER_FLAGS=) with a custom control file.

The "version symbol flavour" value auto-generated by autotools looks somewhat accidental: no MultiSSL support, nor considering any other option besides TLS backend.

https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html
https://www.akkadia.org/drepper/dsohowto.pdf

@xiedeacc
Copy link
Author

xiedeacc commented Aug 3, 2024

That's the commit implementing this feature for autotools, in case anyone is wondering what's it about: 7cc2e8b

It's ld/ldd-specific and on a quick glance can be enabled with CMake by passing a custom linker option (via -DCMAKE_SHARED_LINKER_FLAGS=) with a custom control file.

The "version symbol flavour" value auto-generated by autotools looks somewhat accidental: no MultiSSL support, nor considering any other option besides TLS backend.

👍

@bagder
Copy link
Member

bagder commented Aug 3, 2024

The "version symbol flavour" value auto-generated by autotools looks somewhat accidental: no MultiSSL support, nor considering any other option besides TLS backend.

It was added years before MultiSSL was and I assume not a lot of people have bothered, understood nor given this much attention.

@vszakats
Copy link
Member

vszakats commented Aug 4, 2024

Couple of observations / questions:

  • Actually it has been updated for MultiSSL, getting the "flavour" string MULTISSL_. Thinking of a CMake implementation, perhaps a custom string would make better sense?
  • The _rest*, _save* (and __*?) function name masks in lib/libcurl.vers.in: What may be their purpose? There aren't such symbols in curl now, and weren't at the time of the commit. (Deleting these lines didn't change the output in my tests.)
  • How is this option supposed to interact with --enable-symbol-hiding/--disable-symbol-hiding?
  • Apple ld doesn't support this, neither does llvm's lld for macOS.
  • Current soversion (4) is just hard-coded into lib/libcurl.vers.in.

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.

3 participants