Behaviour change when using "emsdk --embedded" in latest stable SDK?

18 views
Skip to first unread message

Floh

unread,
May 18, 2020, 3:34:02 PM5/18/20
to emscripten-discuss
Hi,

it seems my emscripten builds are breaking with the stable SDK since about 2 days ago because the .emscripten_cache directory can't be found (according to github CI the change must have been between 15-May and 16-May.

I'm installing the SDK with the --embedded option which should normally put the .emscripten_cache directory into the SDK root directory.

I'm running the compiler with the '--cache ...' option and the path where .emscripten_cache used to be.

emcc then fails with:

emcc: error: /Users/floh/projects/fips-sdks/emsdk/.emscripten_cache: No such file or directory ("/Users/floh/projects/fips-sdks/emsdk/.emscripten_cache" was expected to be an input file, based on the commandline arguments provided)

The two config-related flags to emcc are:

--em-config /Users/floh/projects/fips-sdks/emsdk/.emscripten --cache /Users/floh/projects/fips-sdks/emsdk/.emscripten_cache

The local .emscripten file exists (and has been created with the toolkit install), but there's no .emscripten_cache directory.

Any ideas?

Floh

unread,
May 18, 2020, 3:38:58 PM5/18/20
to emscripten-discuss
PS: removing the "--cache" option from the emcc command line seems to work just fine, but now I'm worried that .emscripten_cache might be polluted from different emscripten SDK versions installed side by side.

On the other hand, ~/.emscripten_cache is empty too apart from an old "is_vanilla.txt" file. So I'm wondering where those cached binaries are stored now...

Halp! :)

Sam Clegg

unread,
May 18, 2020, 4:18:09 PM5/18/20
to emscripte...@googlegroups.com
Sorry about that, I should have posted the mailing list regarding the recent cache directory changes.

We have made a number of changes over the last few weeks that affect the emscripten cache.  The biggest one being that the emscripten cache now lives inside the emscripten directory by default.  This means that it doesn't live in your $HOME and is not shared between emscripten installations.   This also means that `--embedded` flag to emsdk no longer affects the cache since the cache is always embedded.

We also started shipping all of the libraries prebuilt in the emsdk so most users should never see any "building library..." messages!

If the embedded cache doesn't work from some use cases (e.g. a readonly installation of emscripten) then we have the `CACHE` setting in the config file and the `EM_CACHE` environment variable that can override it.  I imagine that only distro packagers (where emscripten directory could be read-only and/shared be shared by multiple users) would need this option.

This is part of an overall plan for behave more like `--embedded` by default, and avoid touching your $HOME if possible: https://github.com/emscripten-core/emscripten/issues/9543

I'll announce any further changes here,

cheers,
sam


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/332ab182-a6c6-475b-b844-2088efdd2550%40googlegroups.com.

Floh

unread,
May 18, 2020, 5:50:35 PM5/18/20
to emscripten-discuss
> We also started shipping all of the libraries prebuilt in the emsdk so most users should never see any "building library..." messages!

Ah that explains why there isn't that pause anymore when running cmake for the first time after a new SDK version has been installed :)

Thanks for the explanation, I guess the only change I need to do is to remove the --cache command line option when running the compiler...

Cheers!
-Floh.
Reply all
Reply to author
Forward
0 new messages