Skip to content

mac: deps/openssl compiled, even with --shared-openssl #40958

Closed
@minrk

Description

@minrk

Version

17.1.0

Platform

Darwin hostname 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64

Subsystem

node.gyp

What steps will reproduce the bug?

build with

./configure \
    --ninja \
    --prefix=${PREFIX} \
    --without-node-snapshot \
    --shared \
    --shared-libuv \
    --shared-openssl \
    --shared-zlib \
    --with-intl=system-icu 

though I believe only --shared-openssl is relevant.

How often does it reproduce? Is there a required condition?

on anny mac build with --shared-openssl, as far as I can tell.

What is the expected behavior?

deps/openssl is not compiled when --shared-openssl is given.

What do you see instead?

deps/openssl is compiled (and fails!). This should just be wasted build time, compiling openssl that isn't going to be used, but the fact that it happens to fail means it's blocking progress. I don't know if the build failure is relevant, but the fact is it shouldn't be built at all (and isn't on linux with the same input)

Additional information

I believe it is caused by test_crypto_engine (added in #40481) depending on deps/openssl/openssl.gyp:openssl when OS=="mac" and node_use_openssl=="true".

The simplest patch is to change the condition to node_use_openssl=="true" and node_shared_openssl=="false" because the content appears to assume that deps/openssl is used, but I'm not sure if the test should still be built with shared openssl. If so, it should at least properly link/include shared openssl, instead of deps/openssl. That, I don't know how to patch. The linux builds succeed, but the fact that it unconditionally includes from deps/openssl/include suggests it might do something wrong, depending on the version of the shared openssl.

This is seen updating nodejs on conda-forge:

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.opensslIssues and PRs related to the OpenSSL dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions