Skip to content

Running emcc for first time #418

Closed
Closed

Description

@cranei

Using Windows 10 Home Premium installed latest Emscripten. When I run emmcc -V (or anything) I get error:

shared:ERROR: BINARYEN_ROOT is set to empty value in C:\Users\Jim/.emscripten

the .emscripten file contains the lines:

LLVM_ROOT = os.path.expanduser(os.getenv('LLVM', '/usr/bin')) # directory
BINARYEN_ROOT = os.path.expanduser(os.getenv('BINARYEN', '')) # directory

I am unable to progress and none of the other issues seem to show this. Your help would be appreciated.

Activity

  1. cranei commented on Dec 25, 2019

    @cranei
    Author

    Sorry to be a nuisance everyone....
    Got it working finally with the tot version - runs like a greyhound!
    Please cancel any problem I reported.

  2. seisvelas commented on Feb 27, 2020

    @seisvelas

    I'm having the same problem on MacOS. What is the 'tot' version and how do I get it so I can resolve this?

  3. sbc100 commented on Feb 27, 2020

    @sbc100
    Collaborator

    tot means tip-of-tree. It means the latest emsdk package to have been tests with no failures. Ever now and then we take the current tot verson promote it to an official release (after which it is then available via latest).

    You can use either tot or latest by using emsdk. e.g:

    emsdk install tot
    emsdk activate tot
    
  4. bradharms commented on May 11, 2020

    @bradharms

    I'm getting this as well on WSL (windows subsystem for linux). Installing tot does NOT help.

    What is BinaryEn?
    Why is it not set in the .emscripten file?

    EDIT: Resolved; see below

  5. sbc100 commented on May 11, 2020

    @sbc100
    Collaborator

    I'm not sure we have many WSL users, so there may be some issues there, although my understanding is that it would just work exactly like linux.

    Can you tell the commands you used to install emsdk.

    Can you include the full command lines and the full output?

  6. sbc100 commented on May 11, 2020

    @sbc100
    Collaborator

    binaryen is one of the dependencies of emscripten. Its a tool for manipulating the WebAssembly binary and text format. It should be packaged with the emsdk and setup for you when emsdk creates the config file for emscripten.

  7. bradharms commented on May 11, 2020

    @bradharms

    I resolved it, sort of. I had to install and activate "latest-upstream."

    ./emsdk install latest-upstream
    ./emsdk activate latest-upstream
    
  8. fmoel commented on May 16, 2020

    @fmoel

    Please use the emcmdprompt.bat in the emsdk root directory to start the command prompt. This will set up the command prompt correctly and emcc should work even with latest.

  9. bradharms commented on Jun 1, 2020

    @bradharms

    I can't use emcmdprompt.bat because my environment is linux-based.

  10. sbc100 commented on Jun 1, 2020

    @sbc100
    Collaborator

    On linux you should use source ./emsdk_env.sh.

  11. JCash commented on Jul 25, 2020

    @JCash

    I can confirm, that the tot-upstream didn't work (as suggested by the documentation), as it complained about BINARYEN.
    The latest-upstream worked though. Thx @bradharms !

  12. sbc100 commented on Jul 25, 2020

    @sbc100
    Collaborator

    Installing tot-upstream should certainly work. Before you install any tot builds you need to first run ./emsdk update-tags. Maybe you didn't do that? Also you don't need the -upstream... just tot is enough.

  13. Noah1989 commented on Dec 18, 2021

    @Noah1989

    This happens when you try to run emcc after ./emsdk install without activating the SDK through ./emsdk activate first. It will try to generate the .emscripten file automatically, and just leaves BINARYEN_ROOT empty.

  14. kenorb commented on Feb 3, 2022

    @kenorb

    On macOS, I've edited /usr/local/Cellar/emscripten/*/libexec/.emscripten file and replaced the line with BINARYEN_ROOT to BINARYEN_ROOT = '.' (as it was empty).

  15. twlite commented on Mar 8, 2022

    @twlite

    On macOS, I've edited /usr/local/Cellar/emscripten/*/libexec/.emscripten file and replaced the line with BINARYEN_ROOT to BINARYEN_ROOT = '.' (as it was empty).

    this worked on windows too

  16. denormative commented on Jun 7, 2025

    @denormative

    For future google-ers, I had this as well, and the solution was to delete my ~/.emscripten file and recreate it since it was last edited in 2019 and must have had some severely outdated config. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions