-
Notifications
You must be signed in to change notification settings - Fork 208
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
Unable to statically link PDFium WASM module #122
Comments
@jerbob92, can you shed some light on this? |
@sungaila You might be able to link with In that case you should not need to make any changes to the emcc flags, just making a build and using the |
@jerbob92 Thank you so much! Using the @bblanchon I opened PR #123 to modify your GitHub workflow and nuspec files such that referencing bblanchon.PDFium.WebAssembly will work automagically for my use case. |
PR #123 merged! |
I tried to make use of the PDFium WASM module in my ASP.NET Core Blazor WebAssembly project following these steps. However, the static linking during the build fails with the message
pdfium.wasm: not a relocatable wasm file
(reported by wasm-ld, a WebAssembly lld port).Searching for a solution I found that
emcc
needs the compiler flag-s SIDE_MODULE=1
or-s RELOCATABLE=1
to build relocatable pdfium WASM binaries. But simply adding this in my fork was not enough.Now the workflow build fails with the message
relocation X cannot be used against symbol Y; recompile with -fPIC
.I have no knowledge in C++/WebAssembly linking and don't know how to proceed. Is this issue related to the standalone WASM builds #103?
The text was updated successfully, but these errors were encountered: