emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.67k stars 3.29k forks source link

Using -s "USE_LIBJPEG=1" as part of emcc command line, I get error: "emcc: error: Unexpected hash: <include hash here>" #14760

Open mrmessagewriter opened 3 years ago

mrmessagewriter commented 3 years ago

When using either the SDL2 (with JPEG option turned on) library as part of a build, or trying to to use the -s "USE_LIBJPEG=1" option, I get the error:
system_libs:INFO: retrieving port: libjpeg from https://dl.bintray.com/homebrew/mirror/jpeg-9c.tar.gz emcc: error: Unexpected hash: 4e5568cf1d284bee9a993d160a4fa1caeefe20e7ad8289891aaf74ea9b44865324059b682d861e0e0e8c21ccd6d9e8b2c7b3e6bdd9608f52d315c835a8dd63e8 If you are updating the port, please update the hash in the port module.

This is being used with the emcc command on Windows 10.

How do I clear the hash, or reset it?

sbc100 commented 3 years ago

The problem I think is that the file on dl.bintray.com went away so we switched to a different URL a while back. See #13869 and #13878.

If you update to a more recent version the problem should be fixed.

mrmessagewriter commented 3 years ago

Totally spot on. I didn't realize that the URLs were tied into the ports code. I assumed they were in an indirect table. Thanks!

albjeremias commented 2 years ago

i'm using a docker image.. to build a system that needs an older version of emscripten.. is there any workaround for that case?! i'm trying to build: https://github.com/webarkit/jsartoolkit5/ :) u can check the issue im having here: https://github.com/webarkit/jsartoolkit5/issues/14

sbc100 commented 2 years ago

As a workout you could make a new docker image, based on the one you are using and apply the patches from #13869 and #13878, then save that new docker image and use that for you builds.

albjeremias commented 2 years ago

well how do I do that?! I can also build it locally.. but right now the image uses the same as me locally: ./emsdk install version-fastcomp ....... Me goes into documentation: https://emscripten.org/docs/building_from_source/index.html ......

Also I think that emscripten-fastcomp should be patched, so that this would be much more simpler..

sbc100 commented 2 years ago

We are not releasing any more fastcomp version of emscripten, so we can't release patch for those old versions.

To patch the docker image you would need to learn the basics of using docker commands to log into an image, make changes and then save the resulting image for future use. In this case you would log into the image and go to the location where emscirpten is (i think that is /emsdk/upstream/emscripten/..) and make the necessary changes to the files there, and then save the resulting image.

Obviously it would be better all around if you could avoid depending on the old fastcomp version of emsdk and instead switch the latest where the problem has been fixed already.