Skip to content

Node v17.1.0 does not build with --shared-opensslΒ #40783

Description

@debohman

Version

v17.1.0

Platform

Darwin hostname 16.7.0 Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018; root:xnu-3789.73.11~1/RELEASE_X86_64 x86_64

Subsystem

No response

What steps will reproduce the bug?

./configure --ninja --with-intl=system-icu --without-dtrace --without-npm --shared-openssl --shared-zlib

make

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

100%

What is the expected behavior?

I expected node to build.

What do you see instead?

% make
ninja -C out/Release 
ninja: Entering directory `out/Release'
[1/2645] CC obj/deps/v8/third_party/zlib/v8_zlib.cpu_features.o
../../deps/v8/third_party/zlib/cpu_features.c:56:13: warning: unused function '_cpu_check_features' [-Wunused-function]
static void _cpu_check_features(void);
            ^
1 warning generated.
[16/2645] CC obj/deps/v8/third_party/zlib/v8_zlib.deflate.o
../../deps/v8/third_party/zlib/deflate.c:2066:31: warning: comparison of integers of different signs: 'IPos' (aka 'unsigned int') and 'int' [-Wsign-compare]
            if (s->prev_match == -1) {
                ~~~~~~~~~~~~~ ^  ~~
1 warning generated.
[291/2645] CC obj/deps/openssl/openssl/crypto/bio/openssl.bss_dgram.o
../../deps/openssl/openssl/crypto/bio/bss_dgram.c:402:9: warning: variable 'sockopt_val' set but not used [-Wunused-but-set-variable]
    int sockopt_val = 0;
        ^
1 warning generated.
[385/2645] CC obj/deps/openssl/openssl/crypto/ct/openssl.ct_log.o
FAILED: obj/deps/openssl/openssl/crypto/ct/openssl.ct_log.o 
cc -MMD -MF obj/deps/openssl/openssl/crypto/ct/openssl.ct_log.o.d -DV8_DEPRECATION_WARNINGS -DV8_IMMINENT_DEPRECATION_WARNINGS -D_GLIBCXX_USE_CXX11_ABI=1 -D_DARWIN_USE_64_BIT_INODE=1 -DOPENSSL_NO_HW -DOPENSSL_API_COMPAT=0x10100001L -DSTATIC_LEGACY -DNDEBUG -DL_ENDIAN -DOPENSSL_BUILDING_OPENSSL -DAES_ASM -DBSAES_ASM -DCMLL_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DPADLOCK_ASM -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DX25519_ASM -DOPENSSL_PIC '-DENGINESDIR="/dev/null"' -I/usr/local/include -I../../deps/openssl/openssl -I../../deps/openssl/openssl/include -I../../deps/openssl/openssl/crypto -I../../deps/openssl/openssl/crypto/include -I../../deps/openssl/openssl/crypto/modes -I../../deps/openssl/openssl/crypto/ec/curve448 -I../../deps/openssl/openssl/crypto/ec/curve448/arch_32 -I../../deps/openssl/openssl/providers/common/include -I../../deps/openssl/openssl/providers/implementations/include -I../../deps/openssl/config -I../../deps/openssl/config/archs/darwin64-x86_64-cc/asm_avx2 -I../../deps/openssl/config/archs/darwin64-x86_64-cc/asm_avx2/include -I../../deps/openssl/config/archs/darwin64-x86_64-cc/asm_avx2/crypto -I../../deps/openssl/config/archs/darwin64-x86_64-cc/asm_avx2/crypto/include/internal -I../../deps/openssl/config/archs/darwin64-x86_64-cc/asm_avx2/providers/common/include -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing  -c ../../deps/openssl/openssl/crypto/ct/ct_log.c -o obj/deps/openssl/openssl/crypto/ct/openssl.ct_log.o
../../deps/openssl/openssl/crypto/ct/ct_log.c:173:15: error: expected ';' after expression
      fpath = CTLOG_FILE;
              ^
../../deps/openssl/openssl/include/internal/cryptlib.h:71:46: note: expanded from macro 'CTLOG_FILE'
#  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
                                             ^
../../deps/openssl/openssl/crypto/ct/ct_log.c:173:15: error: use of undeclared identifier 'OPENSSLDIR'; did you mean 'OPENSSL_die'?
../../deps/openssl/openssl/include/internal/cryptlib.h:71:35: note: expanded from macro 'CTLOG_FILE'
#  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
                                  ^
../../deps/openssl/config/./archs/darwin64-x86_64-cc/asm/include/openssl/crypto.h:413:20: note: 'OPENSSL_die' declared here
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
                   ^
2 errors generated.
[410/2645] CXX obj/deps/v8/src/torque/torque_base.implementation-visitor.o
ninja: build stopped: subcommand failed.
make: *** [Makefile:124: node] Error 1
% 

Additional information

I think that the problem is that it should not be trying to build openssl when configured with --shared-openssl. I hacked the build.ninja to not include openssl in the build dependencies, and it built correctly.

Regression:

Version v17.0.1 built correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.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