Code Monkey home page Code Monkey logo

Comments (6)

kleisauke avatar kleisauke commented on July 30, 2024 1

I'm glad it's working now! It sounds like you have core.autocrlf = true in your git configuration, commit 678ffd6 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

from wasm-vips.

kleisauke avatar kleisauke commented on July 30, 2024 1

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 emscripten-core/emsdk#1220 for this.

from wasm-vips.

kleisauke avatar kleisauke commented on July 30, 2024

Looks like the Emscripten patches have not been applied, especially commit kleisauke/emscripten@8268daf.

wasm-vips/Dockerfile

Lines 38 to 41 in e1cc2dd

# Emscripten patches
RUN \
curl -Ls https://github.com/emscripten-core/emscripten/compare/3.1.38...kleisauke:wasm-vips-3.1.38.patch | patch -p1 -d $EMSDK/upstream/emscripten && \
emcc --clear-cache && embuilder build sysroot --force

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.

from wasm-vips.

aW4KeNiNG avatar aW4KeNiNG commented on July 30, 2024

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.

from wasm-vips.

kleisauke avatar kleisauke commented on July 30, 2024

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.

wasm-vips/Dockerfile

Lines 11 to 12 in bb0b71b

# Enable Emscripten sysroot cache
EM_CACHE="/src/build/emcache" \

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)

from wasm-vips.

aW4KeNiNG avatar aW4KeNiNG commented on July 30, 2024

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.

from wasm-vips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.