Skip to content

Node 15.3.0 fails to build with shared-openssl with no-pskΒ #36464

@everett1992

Description

@everett1992
  • Version: 15.3.0
  • Platform: Compiling on Ubuntu 18.04 but I beleive issue affects all platforms
  • Subsystem: build / compile

What steps will reproduce the bug?

Compile openssl with no-psk, compile node with shared-openssl

#!/bin/bash -x
set -euo pipefail

OPENSSL='openssl-1.1.1g'
NODE_VERSION='v15.3.0'
NODE="node-$NODE_VERSION"

main() {
  [ -d "$OPENSSL" ] || curl -sS https://www.openssl.org/source/"$OPENSSL".tar.gz | tar xz
  [ -d "$NODE" ] || curl -sS https://nodejs.org/dist/"$NODE_VERSION"/"$NODE".tar.gz | tar xz

  configure_make_openssl
  configure_make_node
}

configure_make_openssl() (
  cd "$OPENSSL"
  ./config no-psk

  make
)

configure_make_node() (
  cd "$NODE"
  export LD_LIBRARY_PATH=$(readlink -f ../$OPENSSL)
  ./configure \
    --shared-openssl \
    --shared-openssl-includes "$(readlink -f ../"$OPENSSL"/include)" \
    --shared-openssl-libpath "$(readlink -f ../"$OPENSSL")"

  make
)

main "$@"

no-psk errors

/node-v15.3.0/out/Release/obj.target/libnode/src/crypto/crypto_tls.o: In function `node::crypto::TLSWrap::SelectSNIContextCallback(ssl_st*, int*, void*)':
crypto_tls.cc:(.text+0x487b): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)'
/node-v15.3.0/out/Release/obj.target/libnode/src/crypto/crypto_tls.o: In function `node::crypto::TLSWrap::CertCbDone(v8::FunctionCallbackInfo<v8::Value> const&)':
crypto_tls.cc:(.text+0x4c27): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)'
collect2: error: ld returned 1 exit status
embedtest.target.mk:200: recipe for target '/node-v15.3.0/out/Release/embedtest' failed
make[1]: *** [/node-v15.3.0/out/Release/embedtest] Error 1
make[1]: *** Waiting for unfinished jobs....
/node-v15.3.0/out/Release/obj.target/libnode/src/crypto/crypto_tls.o: In function `node::crypto::TLSWrap::SelectSNIContextCallback(ssl_st*, int*, void*)':
crypto_tls.cc:(.text+0x487b): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)'
/node-v15.3.0/out/Release/obj.target/libnode/src/crypto/crypto_tls.o: In function `node::crypto::TLSWrap::CertCbDone(v8::FunctionCallbackInfo<v8::Value> const&)':
crypto_tls.cc:(.text+0x4c27): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)'
collect2: error: ld returned 1 exit status
mkcodecache.target.mk:203: recipe for target '/node-v15.3.0/out/Release/mkcodecache' failed
make[1]: *** [/node-v15.3.0/out/Release/mkcodecache] Error 1
/node-v15.3.0/out/Release/obj.target/libnode/src/crypto/crypto_tls.o: In function `node::crypto::TLSWrap::SelectSNIContextCallback(ssl_st*, int*, void*)':
crypto_tls.cc:(.text+0x487b): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)'
/node-v15.3.0/out/Release/obj.target/libnode/src/crypto/crypto_tls.o: In function `node::crypto::TLSWrap::CertCbDone(v8::FunctionCallbackInfo<v8::Value> const&)':
crypto_tls.cc:(.text+0x4c27): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)'

Node seems to aim to be compatible with no-psk because it checks for the definition of OPENSSL_NO_PSK

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.

    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