Skip to content

Unable to statically link PDFium WASM module #122

Description

@sungaila

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions