Skip to content

OpenSSL include issues #2576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
d3x0r opened this issue Dec 17, 2021 · 3 comments
Closed

OpenSSL include issues #2576

d3x0r opened this issue Dec 17, 2021 · 3 comments

Comments

@d3x0r
Copy link

d3x0r commented Dec 17, 2021

I recently updated my system, and have a new Node 17.1.0

I had already done some of the porting to the new SSL version in 17, so I have OPENSSL_MIN_API defined, previously =30000 was good, but now, I get an error

/home/d3x0r/.cache/node-gyp/17.1.0/include/node/openssl/macros.h:139:4: error: #error "The requested API level higher than the configured API compatibility level"

It looks like the headers should be configured with 30000, but the symbol for OPENSSL_CONFIGURED_API seems to be 0 (both in node-gyp and cmake-js).

this is the addon I'm trying to build https://github.com/d3x0r/sack.vfs

Is there some openssl.config.h I'm supposed to be including now that isn't otherwise just naturally included?

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/d3x0r/work/javascript/sack.vfs/build'
  CXX(target) Release/obj.target/sack_vfs/src/vfs_module.o
In file included from /home/d3x0r/.cache/node-gyp/17.1.0/include/node/openssl/././archs/linux-x86_64/asm/include/openssl/safestack.h:19,
                 from /home/d3x0r/.cache/node-gyp/17.1.0/include/node/openssl/./safestack_asm.h:11,
                 from /home/d3x0r/.cache/node-gyp/17.1.0/include/node/openssl/safestack.h:4,
                 from ../src/global.h:52,
                 from ../src/vfs_module.cc:6:

/home/d3x0r/.cache/node-gyp/17.1.0/include/node/openssl/macros.h:139:4: error: #error "The requested API level higher than the configured API compatibility level"  (for API > 10000 )

/home/d3x0r/.cache/node-gyp/17.1.0/include/node/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
  155 | #  error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
      |    ^~~~~  (for API=0)


cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning’ may have been intended to silence earlier diagnostics
make: *** [sack_vfs.target.mk:215: Release/obj.target/sack_vfs/src/vfs_module.o] Error 1
make: Leaving directory '/home/d3x0r/work/javascript/sack.vfs/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/d3x0r/.npm/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 5.15.6-arch2-1
gyp ERR! command "/usr/bin/node" "/home/d3x0r/.npm/bin/node-gyp" "build" "-D" "--version"
gyp ERR! cwd /home/d3x0r/work/javascript/sack.vfs
gyp ERR! node -v v17.1.0
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok

This system is Arch too ; is there maybe a incompatibilty between what they build and what you build for released openssl/* headers from node?

Once I worked around the above errors so it would build then the symbol SSL_get_peer_certificate is getting redefined to SSL_get1_peer_certificate, and this symbol does not exist, but there doesn't seem to be any other way to not get that symbol redefined with get1 in the headers distributed to compile against.

@d3x0r
Copy link
Author

d3x0r commented Dec 17, 2021

It doesn't really appear to be node-gyp at fault...

@d3x0r d3x0r closed this as completed Dec 17, 2021
@btakita
Copy link

btakita commented May 2, 2022

@d3x0r What was the issue & how did you fix it?

@d3x0r
Copy link
Author

d3x0r commented May 2, 2022

nodejs/node#40575 this was a similar issue that was in node...

nodejs/node#40575 (comment) this is the summary of the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants