Skip to content
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

Error building tdweb (openssl) #3042

Open
andrewmed opened this issue Sep 7, 2024 · 3 comments
Open

Error building tdweb (openssl) #3042

andrewmed opened this issue Sep 7, 2024 · 3 comments

Comments

@andrewmed
Copy link

Hello.
I have problem building tdweb on debian 12, arm

EMSDK=/home/parallels/code/emsdk
EMSDK_NODE=/home/parallels/code/emsdk/node/18.20.3_64bit/bin/node
HOME=/home/parallels
PATH=/home/parallels/code/emsdk/upstream/emscripten:/home/parallels/code/emsdk/node/18.20.3_64bit/bin:/home/parallels/code/emsdk:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PWD=/home/parallels/code/td/example/web
> webpack --mode production

Browserslist: caniuse-lite is outdated. Please run next command `npm update`
node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/parallels/code/td/example/web/tdweb/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/parallels/code/td/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/parallels/code/td/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/parallels/code/td/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/parallels/code/td/example/web/tdweb/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/parallels/code/td/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/parallels/code/td/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/parallels/code/td/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/parallels/code/td/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/home/parallels/code/td/example/web/tdweb/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/parallels/code/td/example/web/tdweb/node_modules/babel-loader/lib/index.js:51:71
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.20.3

Looks like openssl error.

I using build scripts from web directory. When I was building tdlib I noticed this warn in the logs, but do not know how to fix it:

CMake Warning:
  Manually-specified variables were not used by the project:

    OPENSSL_ROOT_DIR
    OPENSSL_SSL_LIBRARY
    OPENSSL_VERSION
@levlam
Copy link
Contributor

levlam commented Sep 8, 2024

@andrewmed
Copy link
Author

I tried to do export NODE_OPTIONS=--openssl-legacy-provider as recommended but got hard fail like

Hash: ee92ef7c7f7c42079b0b
Version: webpack 4.44.1
Time: 840ms
Built at: 09/09/2024 5:07:31 PM
                                Asset      Size  Chunks                         Chunk Names
     1.84c77a55f4b214990dc4.worker.js   202 KiB          [emitted] [immutable]  
     2.84c77a55f4b214990dc4.worker.js  25.6 MiB          [emitted] [immutable]  
32470a4eed92f4403f3b103cbfc89c7c.wasm  9.16 MiB          [emitted]              
 57501aa75e9b072b1910451a58fd7f10.mem  1.28 MiB          [emitted]              
       84c77a55f4b214990dc4.worker.js   194 KiB          [emitted] [immutable]  
                             tdweb.js  92.1 KiB       0  [emitted]              main
Entrypoint main = tdweb.js
 [7] ./src/worker.js 113 bytes {0} [not cacheable] [built]
 [9] multi ./src/index.js 28 bytes {0} [built]
[14] ../../src/methods/node.js (ignored) 15 bytes {0} [built]
[17] ./src/index.js + 9 modules 56.6 KiB {0} [built]
     | ./src/index.js 31.6 KiB [built]
     | ./src/logger.js 1.87 KiB [built]
     |     + 8 hidden modules
    + 14 hidden modules
Child worker:
                                    Asset      Size  Chunks                         Chunk Names
         1.84c77a55f4b214990dc4.worker.js   202 KiB       1  [emitted] [immutable]  
         2.84c77a55f4b214990dc4.worker.js  25.6 MiB       2  [emitted] [immutable]  
    32470a4eed92f4403f3b103cbfc89c7c.wasm  9.16 MiB          [emitted]              
     57501aa75e9b072b1910451a58fd7f10.mem  1.28 MiB          [emitted]              
           84c77a55f4b214990dc4.worker.js   194 KiB       0  [emitted] [immutable]  main
    Entrypoint main = 84c77a55f4b214990dc4.worker.js
     [6] ./src/prebuilt/release/td_wasm.wasm 83 bytes {0} [built]
     [7] ./src/prebuilt/release/td_asmjs.js.mem 82 bytes {0} [built]
     [8] (webpack)/buildin/global.js 472 bytes {0} [built]
    [10] ./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js + 2 modules 70.2 KiB {0} [built]
         | ./node_modules/babel-loader/lib!./node_modules/eslint-loader!./src/worker.js 61.2 KiB [built]
         | ./src/logger.js 1.87 KiB [built]
         | ./src/wasm-utils.js 7.08 KiB [built]
    [18] ./src/prebuilt/release/td_wasm.js 134 KiB {1} [built]
    [19] ./src/prebuilt/release/td_asmjs.js 25.6 MiB {2} [built]
        + 14 hidden modules

There are no mention of a required version of node, I wonder if downgrading nodejs as mentioned by the link if the right solution

@levlam
Copy link
Contributor

levlam commented Sep 12, 2024

but got hard fail like

I see no errors in the provided build logs.

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