Bug 258765 - www/node: fails to build
Summary: www/node: fails to build
Status: Closed DUPLICATE of bug 255277
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bradley T. Hughes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-28 16:59 UTC by Dmitry Marakasov
Modified: 2021-09-29 01:02 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (bhughes)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2021-09-28 16:59:57 UTC
When trying to build node-16.10.0, confirmed both on host and in poudriere with 13.0 amd64, the build fails in link.

  c++ -o /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/embedtest -pthread -rdynamic -m64 -Wl,--export-dynamic -Wl,-z,noexecstack -Wl,--whole-archive /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_snapshot.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now   -fstack-protector-strong  -Wl,--start-group /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/embedtest/src/node_snapshot_stub.o /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/embedtest/src/node_code_cache_stub.o /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/embedtest/test/embedding/embedtest.o /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/libnode.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/deps/histogram/libhistogram.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/deps/uvwasi/libuvwasi.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_snapshot.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libplatform.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/deps/llhttp/libllhttp.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_zlib.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_compiler.a /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers.a -lz -L/usr/local/lib -luv -lbrotlidec -lbrotlienc -lcares -lnghttp2 -lcrypto -lssl -licui18n -licuuc -licudata -lelf -lutil -lkvm -L/usr/local/lib -lexecinfo -Wl,--end-group
ld: error: undefined symbol: RSA_get0_pss_params
>>> referenced by crypto_rsa.cc
>>>               crypto_rsa.o:(node::crypto::GetRsaKeyDetail(node::Environment*, std::__1::shared_ptr<node::crypto::KeyObjectData>, v8::Local<v8::Object>)) in archive /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/obj.target/libnode.a
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [embedtest.target.mk:177: /wrkdirs/usr/ports/www/node/work/node-v16.10.0/out/Release/embedtest] Error 1
gmake[2]: *** Waiting for unfinished jobs....
rm 6239f396205f07d4e934527642009966092932b1.intermediate 7316b7e3c965de6f5a2e8a6cf372a88d4d7231af.intermediate b1f5c9a10151df22a1ee476acbf87de47e4769b9.intermediate 44884f2ec982f8b763d2cfdd7f6cc0de0289afc5.intermediate
gmake[1]: *** [Makefile:110: node] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/node/work/node-v16.10.0'
===> Compilation failed unexpectedly.
Comment 1 Dimitry Andric freebsd_committer 2021-09-28 21:56:05 UTC
Same here on 14-CURRENT as of ~2021-09-27. It seems to want to use RSA_get0_pss_params(), which should be in libcrypto, but isn't found for some reason.

jhb@ added this symbol to libcrypto's Version.map in https://cgit.freebsd.org/src/commit/?id=7ad70d22c667173586c04fc13dd315995d78fbbf, but for some reason I do not see it in libcrypto.so itself:

% nm -D /lib/libcrypto.so.111 | grep RSA_get
0000000000192f30 T RSA_get0_crt_params@@OPENSSL_1_1_0
0000000000193010 T RSA_get0_d@@OPENSSL_1_1_1
0000000000193040 T RSA_get0_dmp1@@OPENSSL_1_1_1
0000000000193050 T RSA_get0_dmq1@@OPENSSL_1_1_1
0000000000193000 T RSA_get0_e@@OPENSSL_1_1_1
00000000001930c0 T RSA_get0_engine@@OPENSSL_1_1_0
0000000000192e90 T RSA_get0_factors@@OPENSSL_1_1_0
0000000000193060 T RSA_get0_iqmp@@OPENSSL_1_1_1
0000000000192e60 T RSA_get0_key@@OPENSSL_1_1_0
0000000000192f60 T RSA_get0_multi_prime_crt_params@@OPENSSL_1_1_1
0000000000192ed0 T RSA_get0_multi_prime_factors@@OPENSSL_1_1_1
0000000000192ff0 T RSA_get0_n@@OPENSSL_1_1_1
0000000000193020 T RSA_get0_p@@OPENSSL_1_1_1
0000000000193030 T RSA_get0_q@@OPENSSL_1_1_1
000000000018efc0 T RSA_get_default_method@@OPENSSL_1_1_0
0000000000192a90 T RSA_get_ex_data@@OPENSSL_1_1_0
00000000001928f0 T RSA_get_method@@OPENSSL_1_1_0
0000000000192eb0 T RSA_get_multi_prime_extra_count@@OPENSSL_1_1_1
00000000001930b0 T RSA_get_version@@OPENSSL_1_1_1
Comment 2 Dimitry Andric freebsd_committer 2021-09-28 21:59:34 UTC
Oh, on stable/12 it got cherry-picked in https://cgit.freebsd.org/src/commit/?id=f29f5cc6f2d390b1ae4a6c526271e37233aafc70, on 2021-05-28. However, my userland on this box is from 2021-03-29...

I think this might also affect users of 12.4-R and/or 13.0-R ?
Comment 3 Dimitry Andric freebsd_committer 2021-09-28 22:02:40 UTC
(In reply to Dimitry Andric from comment #1)
> Same here on 14-CURRENT as of ~2021-09-27.

Sorry that was wrong, on 14-CURRENT the symbol *is* available:

% nm -D /lib/libcrypto.so.111|grep OPENSSL_1_1_1e
0000000000213cb0 T EVP_PKEY_meth_get_digestsign@@OPENSSL_1_1_1e
0000000000213cd0 T EVP_PKEY_meth_get_digestverify@@OPENSSL_1_1_1e
0000000000213a70 T EVP_PKEY_meth_set_digestsign@@OPENSSL_1_1_1e
0000000000213a80 T EVP_PKEY_meth_set_digestverify@@OPENSSL_1_1_1e
000000000024d600 T RSA_get0_pss_params@@OPENSSL_1_1_1e

I had another issue building node with clang 13, but it's totally unrelated to this...
Comment 4 John Baldwin freebsd_committer freebsd_triage 2021-09-29 01:02:53 UTC
12.2 and 13.0 were patched with the updated version map for libcrypto in the FreeBSD-EN-21:24.libcrypto errata notice on August 24, 2021.  You might need to update your 13.0 jail (I think poudriere can run freebsd-update for you?)

*** This bug has been marked as a duplicate of bug 255277 ***