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

emcc: error: --memory-init-file is no longer supported #4

Open
TamaraFinogina opened this issue Jul 29, 2024 · 6 comments
Open

emcc: error: --memory-init-file is no longer supported #4

TamaraFinogina opened this issue Jul 29, 2024 · 6 comments

Comments

@TamaraFinogina
Copy link

Hi! I'm trying to do the build on macOS 14.5 with emscripten: stable 3.1.64 (bottled). However, I'm getting the following:
emcc: error: --memory-init-file is no longer supported

Is there anything I can do?

@Mikescops
Copy link

Hello,

Can you try to remove this option, it appears twice in the Makefile:

--memory-init-file 0 \

@TamaraFinogina
Copy link
Author

TamaraFinogina commented Jul 30, 2024

Hi,

I have tried it. It leads to another error, which is easily fixable:
emcc: error: attempt to set ``INVOKE_RUN`` to ``false``; use 1/0 to set boolean settings

However, after fixing that, I'm getting another error, which I don't know how to fix:

node_modules/webpack/types.d.ts:7283:5 - error TS2315: Type 'ServerOptions' is not generic.

7283   | ServerOptionsImport<typeof IncomingMessage>
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/webpack/types.d.ts:13046:41 - error TS2315: Type 'ServerOptions' is not generic.

13046 > = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/webpack/types.d.ts:7283 

I'm trying to downgrade emscripten and build again. So far it's not working.

@Mikescops
Copy link

Mikescops commented Jul 30, 2024

I took a Sonoma 14.5 to make a working branch for you.
Also used the brew emscripten.
https://github.com/Dashlane/pqc.js/tree/alternative/macos-arm-ready
The issues were mostly due to sed working differently on mac and some webpack configuration that has changed.
Seed changes: b97040d

Let me know if that works for you.

@TamaraFinogina
Copy link
Author

Hi,

Thank you so much!

It's getting closer, but make kem-kyber512 still runs into errors:

ERROR in ./dist/kem.asm.js 12:59-75
Module not found: Error: Can't resolve 'module' in '<path>/pqc.js/dist'
 @ ./dist/kem.js 2:0-51 17:24-47 27:28-51

ERROR in ./dist/kem.asm.js 24:59-89
Module not found: Error: Can't resolve './' in '<path>/pqc.js/dist'
 @ ./dist/kem.js 2:0-51 17:24-47 27:28-51

ERROR in ./dist/kem.wasm.js 12:59-75
Module not found: Error: Can't resolve 'module' in '<path>/pqc.js/dist'
 @ ./dist/kem.js 1:0-54 22:28-53

ERROR in ./dist/kem.wasm.js 27:59-89
Module not found: Error: Can't resolve './' in '<path>/pqc.js/dist'
 @ ./dist/kem.js 1:0-54 22:28-53

4 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.93.0 compiled with 4 errors in 838 ms
make: *** [kem-kyber512] Error 1

P.S. Btw, I think PQClean removed many of the schemes make all tries to build.

@Mikescops
Copy link

@TamaraFinogina Sorry I forgot to push some files, here you are and I updated the supported algorithms as you suggested!

@TamaraFinogina
Copy link
Author

Hi,

Thank you! It works now. I had to install few extra npm packages, but it works!!! Thanks again!

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

No branches or pull requests

2 participants