FS#57913 - [node-gyp] uses incorrect OpenSSL headers

Attached to Project: Community Packages
Opened by Akihiko Odaki (nekomanma) - Wednesday, 21 March 2018, 15:34 GMT
Last edited by Toolybird (Toolybird) - Sunday, 14 May 2023, 23:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
node-gyp fetches headers including OpenSSL to build Node.js C++ addons. However, the fetched OpenSSL headers is of 1.0.2,
while OpenSSL provided by Arch Linux is 1.1.0. This results in failure when loading an addon built with node-gyp.

Additional info:
* package version(s)

npm 5.7.1-1
openssl 1.1.0.g-1

* config and/or log files etc

See the below.

Steps to reproduce:

$ npm i uws

> uws@9.14.0 install /home/aki/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0

npm WARN saveError ENOENT: no such file or directory, open '/home/aki/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/aki/package.json'
npm WARN aki No description
npm WARN aki No repository field.
npm WARN aki No README data
npm WARN aki No license field.

+ uws@9.14.0
added 1 package from 1 contributor in 13.565s
$ objdump -T node_modules/uws/build/Release/uws.node | grep SSL_library_init
0000000000000000 D *UND* 0000000000000000 SSL_library_init

uws is a NPM package with a C++ addon which uses OpenSSL. SSL_library_init is a function provided until 1.0.x. It is not availble for 1.1.0.

A patch is attached.
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 14 May 2023, 23:04 GMT
Reason for closing:  No response
Comment by Akihiko Odaki (nekomanma) - Friday, 30 November 2018, 05:17 GMT
  • Field changed: Percent Complete (100% → 0%)
 FS#57863  resolved the problem for nodejs package, but not for nodejs-lts-carbon. I believe this is the best way to address the issue.

Note that OpenSSL 1.1.0 is supported by LTS Carbon:
https://github.com/nodejs/node/pull/18622

The change suggested in this issue is the one proposed by an upstream node-gyp maintainer:
https://github.com/nodejs/node-gyp/pull/1395#issuecomment-385954232

Thank you for efforts to address the problem. I hope this issue is the last one remaining.
Comment by Eli Schwartz (eschwartz) - Friday, 30 November 2018, 05:22 GMT
So I'm not sure how this is supposed to do its thing. e.g. the openssl-1.0 headers are installed to /usr/include/openssl-1.0, but this is the version anyways fetched at runtime by nodejs-lts-carbon. And the current headers for nodejs itself are *supposed* to be openssl 1.1

What is the use case of this patch, and how does it detect the actual correct location of the needed openssl headers? It seems like something that node-gyp would need to detect by detecting the actual version needed.
Comment by Toolybird (Toolybird) - Saturday, 15 April 2023, 01:19 GMT
This seems pretty old and stale. Is it still a problem with current pkgs?

Loading...