Repository navigation
Node v17.1.0 does not build with --shared-openssl #40783
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.opensslIssues and PRs related to the OpenSSL dependency.Issues and PRs related to the OpenSSL dependency.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.opensslIssues and PRs related to the OpenSSL dependency.Issues and PRs related to the OpenSSL dependency.
Activity
richardlau commentedon Nov 23, 2021
This is probably somehow linked to #40421, and possibly #40518 and could very well be specific to building with
ninja.debohman commentedon Nov 23, 2021
If I configure node without
--shared-openssl, it builds and runs with the embedded OpenSSL 3.0.carlocab commentedon Nov 26, 2021
We see this when building with
maketoo. See Homebrew/homebrew-core#89068.Bo98 commentedon Dec 1, 2021
This is linked with #40958 and now also affects 16.13.1.
debohman commentedon Feb 20, 2022
This appears to be fixed in the TOT of the master branch.
carlocab commentedon Feb 20, 2022
For reference, this was fixed in 5f348b4.
Bo98 commentedon Feb 20, 2022
Will it be backported to 16.x given it regressed in 16.13.1?
richardlau commentedon Feb 20, 2022
Yes, eventually. General policy is for changes to have been in a current release for two weeks before backporting to LTS: https://github.com/nodejs/Release#lts-staging-branches
#41830 has yet to be included in a current release but I would expect it to be in the one planned for 22 February 2022 (nodejs/Release#703).
Bo98 commentedon Feb 20, 2022
Sounds good, thanks!