Closed aW4KeNiNG closed 1 year ago
Looks like the Emscripten patches have not been applied, especially commit https://github.com/kleisauke/emscripten/commit/8268dafaf5f5f55191fcd0ebdec97ded1eec0d3e. https://github.com/kleisauke/wasm-vips/blob/e1cc2ddaecff889d1d9f2b8fb12e53fab51ccfad/Dockerfile#L38-L41
Did you run npm run build
? Issue #6 reported something similar, but I was never able to reproduce that.
Note that you might need to clean up existing cache with:
$ rm -rf build/{cargo-cache,ccache,deps,emcache,target}
This ensures that all dependencies are rebuilt.
Thanks for the help.
I have updated to the latest git version, remove the current cache and rebuild it again with the same issue.
I'm not sure if it can help, but here is the docker build and the compilation log:
https://www.dropbox.com/s/wj0rwp0e7h1kke4/docker-build-log.txt?dl=0
https://www.dropbox.com/s/xhkmvdg9m9rnazr/wasmvips-build-log.txt?dl=0
I'm using Windows, so the command I'm using is (disabling svg and jxl):
docker build -t wasm-vips . && docker run -it --rm -v %cd%:/src wasm-vips ./build.sh --disable-svg --disable-jxl
Thanks in advance.
Looking at those build logs, it seems that it uses the default sysroot location (/emsdk/upstream/emscripten/cache/sysroot
), rather than the one specified in the EM_CACHE
env var.
https://github.com/kleisauke/wasm-vips/blob/bb0b71b80d6ca886a76fc06371174dcba45c7687/Dockerfile#L11-L12
I get the same build failure when passing -e EM_CACHE=
to the docker run
command.
Perhaps it's unable to access the mounted /src/build/emcache
volume within the Docker container? You can check this with:
$ docker run -it --rm -v %cd%:/src wasm-vips bash -c "printenv EM_CACHE && emcc --clear-cache"
/src/build/emcache
emcc:INFO: clearing cache as requested by --clear-cache: `/src/build/emcache`
shared:INFO: (Emscripten: Running sanity checks)
Thank you! I identified the problem with your assistance. On Windows, I couldn't execute build.sh directly in a single command with Docker. After the git clone operation, it was necessary to use the sed command to remove the \r characters from the file. Otherwise, the script wouldn't function properly. The issue was occurring when executing the Docker command and then the build.sh script separately. It worked correctly when combined into a single command after removing the \r characters in advance.
I'm glad it's working now! It sounds like you have core.autocrlf = true
in your git configuration, commit 678ffd667a3ccef4bb575fe3df2b1552d7da688b should prevent this line ending mangling for shell scripts.
Perhaps we should also remove this line from the official emsdk Docker image: https://github.com/emscripten-core/emsdk/blob/e8b64774ff1a3ddb6a013203ced27a34e70c2d8b/docker/Dockerfile#L82
Since it causes the existing EM_CACHE
and EMSDK_NODE
environment variables to be cleared when running in a interactive shell:
$ docker run -it --rm -v %cd%:/src wasm-vips
...
Clearing existing environment variable: EM_CACHE
Clearing existing environment variable: EMSDK_NODE
Perhaps we should also remove this line from the official emsdk Docker image: https://github.com/emscripten-core/emsdk/blob/e8b64774ff1a3ddb6a013203ced27a34e70c2d8b/docker/Dockerfile#L82
I just opened PR https://github.com/emscripten-core/emsdk/pull/1220 for this.
Hi.
I'm trying to compile the library using the docker file but I get the next error:
Do you know what the issue could be?
Thanks in advance.