Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed: Failed to find the # of uses of var: $0 #18

Closed
axiomsofchoice opened this issue Jun 5, 2011 · 6 comments
Closed

Assertion failed: Failed to find the # of uses of var: $0 #18

axiomsofchoice opened this issue Jun 5, 2011 · 6 comments

Comments

@axiomsofchoice
Copy link

I was compiling the cubescript example directly via the command line and encountered this:

Assertion failed: Failed to find the # of uses of var: $0
Stack: Error
at assertTrue (utility.js:60:23)
at analyzer.js:271:13
at Array.forEach (native)
at analyzer.js:260:20
at Array.forEach (native)
at Object.processItem (analyzer.js:238:22)
at Object.process (framework.js:155:26)
at framework.js:104:25
at Array.forEach (native)
at Object.solve (framework.js:92:27)
utility.js:61: Assertion failed: Failed to find the # of uses of var: $0
throw msg;
^

@kripken
Copy link
Member

kripken commented Jun 5, 2011

Can you attach the .ll file that was generated? And, what OS are you on?

@axiomsofchoice
Copy link
Author

Yes, sure. The box I'm runing on is:

Linux maclane 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux

I've uploaded the .ll file here:

https://gist.github.com/1008855

@kripken
Copy link
Member

kripken commented Jun 5, 2011

Thanks, and what specific command did you run to compile it?

@axiomsofchoice
Copy link
Author

According to my bash history:

llvm-gcc -O3 --emit-llvm command.cpp -c -o command
llvm-dis command

Please note that the -show-annotations flag doesn't appear to work with my version of llvm-dis as it gives the following error:

llvm-dis: Unknown command line argument '-show-annotations'. Try: 'llvm-dis -help'

The version I'm using is the following:

$ llvm-dis --version
Low Level Virtual Machine (http://llvm.org/):
llvm version 2.7 ( 2.7-0ubuntu1)
Optimized build.
Built Apr 28 2010 (14:19:53).
Host: x86_64-pc-linux-gnu
Host CPU: core2

Registered Targets:
(none)

@axiomsofchoice
Copy link
Author

Just spotted what might be going on: the version of llvm I've been using is 2.7 and not the 2.9 version required here: https://github.com/kripken/emscripten/wiki/Getting-started

@kripken
Copy link
Member

kripken commented Jun 5, 2011

Ah yeah, I should have asked about the LLVM version. That is probably the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants