Skip to content

OpenSSL in Ubuntu 26.04 requires zlib #596

@anarthal

Description

@anarthal

Since Ubuntu 26.04, libcrypto and libssl require zlib. According to the OpenSSL manual pages, OpenSSL may be built with or without zlib, depending on a config option. If built with zlib, zlib is required unconditionally. For the latest Ubuntu LTS'es, the following applies:

When a target links to /openssl//ssl and <link>shared is being used, everything works because the dynamic loader takes care of the transitive dependency. When using <link>static, however, the linker complains about undefined zlib symbols.

Adding /zlib//zlib is not an easy solution, because this would require the zlib headers, which are not installed in all CIs (and not really required, because the dependency is only at the binary level).

I'm encountering this problem when linking to /boost/corosio//boost_corosio_openssl, which links to /openssl//ssl (so using /openssl//ssl/<link>shared is not in my hands).

Since CMake's FindOpenSSL handles this, it looks like b2's module could handle this, too. Some solutions that come to my mind:

  • Let the user configure in user-config.jam if /openssl//ssl should always use the dynamic version of the library.
  • Conditionally add -lz to link lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions