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

WASM pdfium.js file missing emscripten_memcpy_biig declaration #121

Open
synoet opened this issue Aug 10, 2024 · 1 comment
Open

WASM pdfium.js file missing emscripten_memcpy_biig declaration #121

synoet opened this issue Aug 10, 2024 · 1 comment

Comments

@synoet
Copy link

synoet commented Aug 10, 2024

Describe the bug
Trying to load the most recent wasm release, fails to link due to missing emscripten_memcpy_big declaration in pdfium.js

pdfium-release.js:8 wasm streaming compile failed: LinkError: WebAssembly.instantiate(): Import #8 "env" "emscripten_memcpy_big": function import requires a callable

To Reproduce

  • Load PdfiumModule in most recent wasm release

System (please complete the following information):

  • OS: MacOS Sanoma 14.2.1 & Rolling Arch Linux
  • Version: 6276
  • Target: WASM

Additional context

Manually defining emscripten_memcpy_big in the generated pdfium.js file fixes this issue and loads correctly

var _emscripten_memcpy_big = (dest, src, num) => {
    HEAPU8.copyWithin(dest, src, src + num);
  }
...
emscripten_memcpy_big: _emscripten_memcpy_big
@paulocoutinhox
Copy link
Owner

Hi,

Project was updated to latest version.

If your problem was solved, can you close the issue pls?

Thanks.

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