Skip to content

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

Description

@xiedeacc

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

Activity

  1. vszakats commented on Aug 3, 2024

    @vszakats
    Member

    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

  2. xiedeacc commented on Aug 3, 2024

    @xiedeacc
    Author

    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.

    👍

  3. bagder commented on Aug 3, 2024

    @bagder
    Member

    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.

  4. vszakats commented on Aug 4, 2024

    @vszakats
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions