On May 20, 2020, at 12:28, Floh <flo...@gmail.com> wrote:PS: I'm depending on the --em-config option (because I'm installing the emsdk with --embedded),but I'm passing in a regular string, not some sort of python expression).
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.
--
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/e48aea72-28ad-4121-bc8c-d3414dccf1b1%40googlegroups.com.
--
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/CAL_va28seE50BNe4BKJ4cFzoQNNZPE6xbFFwDvXQSdWfiF2WAA%40mail.gmail.com.
Halide uses the EM_CONFIG variable in its build script.The reason for this is that we need to ensure that LLVM_ROOT points to the specific version of LLVM being used by the rest of Halide. (Having these out of sync can cause amusingly bad things to happen.) We slurp in the default ~/.emscripten config file and make an altered version (with LLVM_ROOT pointing to the LLVM we are using), so that we can always build with the 'correct' version (ie the one that the rest of Halide is using).Requiring that ~/.emscripten be edited is problematic as Halide supports multiple versions of LLVM at any one time (currently, v9, v10, and v11/trunk), so this file would need to edited in lockstep with other things in Halide to keep things in step.
--On Tue, May 19, 2020 at 11:46 AM 'Sam Clegg' via emscripten-discuss <emscripte...@googlegroups.com> wrote:emscripten has a feature where you can avoid using a config file--completely and instead pass a python literal in the EM_CONFIGenvironment variable or `--em-config` command line.e.g. `emcc --em-config="<python code>`As part of routine cleanup I'm hoping to be able to remove thisfeature and allow the code to depend on the existence of a configfile on disk.I'm not imagining there are any users of this feature, and we canmake it into warning a few releases to confirm this.Does anyone know of any users of this feature?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/CAL_va28seE50BNe4BKJ4cFzoQNNZPE6xbFFwDvXQSdWfiF2WAA%40mail.gmail.com.
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/CAM%3DdnveGTKtEqGWue_qyUMjdyLdGXZbXEm8m4fhPjreRgd4tGQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va29xtsd5emac0nfmvUys84xaBdx-xMes515U1sATFPJe1w%40mail.gmail.com.
I did not know that. That sounds like a much better approach anyway :-)
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAM%3Ddnvf79x%3DXt_CLym76VCoTeJBmpu0pw9%2BWWR0CH6ixTcjptg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_CFGdXYRhbB2Vx3Cim8qo0Z1NuErepc-GapsAmDWNBLQ%40mail.gmail.com.
> I really want to stop people from trying to do this. I'd much rather the PATH was way one finds emscripten. e.g. `which emcc`. Failing that an environment variable.What about having several emsdk installations side by side though, without any of them being the "default version".
But if I understand your other posts right, that won't be an issue in the future (e.g. if all the tools in the SDK can figure out the location of "their" SDK without external hints like the --em-config or --cache command line args). Ideally this should work without having the PATH or setting "global" environment variables.
--
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/706fb54f-f3bb-4a3e-8cc0-d3c28d438a08%40googlegroups.com.
--
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/51289c8c-f3ac-43ce-a68f-3ddfc1479c41%40googlegroups.com.
It will be next week at the earliest -- I am currently elbow-deep in work on the Halide build/test setup (and, as it turns out, the emcc testing hasn't been enabled for our public repo recently, so it might have broken for other reasons).
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAM%3DdnvcWFdmoiG-1-z2yhPqgEHdSXs5aRHJpc%2BTtQXL26Z0pGA%40mail.gmail.com.
I guess this was released in 2.0.17 yesterday (according to the release notes at least)? Happy to report that nothing broke on my side ;)(I'm extracting the EMSCRIPTEN_ROOT value for use in a cmake toolchain file by evaluating the .emscripten config file, and this still seems to work, I'm still setting an EM_CONFIG environment variable before running the .emscripten file through python, but I guess this isn't needed anymore now, but it doesn't hurt either).
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/185eae5b-2ee6-462d-8719-1210204d4f5cn%40googlegroups.com.
Yeah, I never used python literals in EM_CONFIG, misunderstanding on my part :)About the other thing:> a) Use `which emcc` to find where emscripten isIn my case, emcc is not in the path because this is a local installation (via "emsdk activate --embedded") without any traces in the environment (I'm setting EM_CONFIG only temporary in the "python environment" before evaluating .emscripten as a workaround.
> b) Have emsdk set `EMSCRIPTEN_ROOT` directly in the environment rather than in the config file....this also isn't an option for the same reason as above, there is no "global emscripten installation" at all, and there may be multiple installations of the emscripten SDK with different versions side by side.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/2653d96f-9437-449b-a0dd-7938d0fdd7e9n%40googlegroups.com.
> Is there some reason you don't want to add the emscripten directory to you PATH? Is that somehow worse than setting EM_CONFIG and then parsing it?Because there isn't a single "emscripten directory", but one emscripten directory per "workspace directory". I might cd to a different workspace with its own embedded emscripten SDK installation at any time in the same terminal session. With my current setup, the correct emscripten SDK is automatically selected depending on the directory the user is currently in (and then when running cmake to generate the build scripts, cmake will "bake" the absolute paths into the generated build scripts based on a cmake option which points to EMSCRIPTEN_ROOT (which however doesn't exist as environment variable)).> You say you are setting `EM_CONFIG` in your environment [...] Is there some reason you couldn't alternatively set `EMSCRIPTEN_ROOT`?EM_CONFIG is not set persistently in the user environment, it's only set temporary inside a python script (as "os.environ['EM_CONFIG'] = ...") before the .emscripten file is evaluated, and only because of this one line in the .emscripten file:emsdk_path = os.path.dirname(os.environ.get('EM_CONFIG')).replace('\\', '/')The EM_CONFIG environment variable doesn't survive execution of this python script however.> to point to emscripten directly via `EMSCRIPTEN_ROOT` ...Isn't this a chicken-egg problem? The EMSCRIPTEN_ROOT variable isn't set anywhere on my machine, except after running the platform-specific emsdk_env.xxx scripts (which I don't usually do, except when I need emcc in the path for some reason). I'd need to run this script (or 'emsdk construct_env') of a specific emscripten SDK installation from inside python. But running emsdk from within Python which sets environment variables doesn't pass this new environment up to the Python process where the environment variables would be needed for invoking cmake (AFAIK environment variables can only be inherited from parent to child processes, but not the other way around).All in all, the way the current Emscripten SDK works when activated as "--embedded" is pretty much perfect because everything already works without anything in the PATH or in environment variables. The only wonky part is how to get from the SDK installation directory (where 'emsdk' is located - which is under my control) to the 'compiler toolchain directory' which is needed by cmake (e.g. "[emsdk_dir]/upstream/emscripten"). I consider the current way to evaluate .emscripten inside python a hack, but it's a reasonably simple hack that works ;)Any alternative should be simpler then that though ("emsdk construct_env" does a lot more things then just setting up 'EMSCRIPTEN_ROOT', and as I described above, doesn't really work for my use case because the modified environment is "lost" in a child process).
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/6be4ea24-59cd-4a96-9c75-644a1c18e395n%40googlegroups.com.