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

Not working (no output) #2

Open
4ntoine opened this issue Sep 18, 2014 · 28 comments
Open

Not working (no output) #2

4ntoine opened this issue Sep 18, 2014 · 28 comments

Comments

@4ntoine
Copy link

4ntoine commented Sep 18, 2014

I've cloned repository, opened demo.html and clicked "compile and run" button without changing the source code and i see green field with no any output. On demo page (http://kripken.github.io/llvm.js/demo.html) i can see "hello, world" green output. So what's wrong? What is LLVM.js project status?

@4ntoine 4ntoine changed the title Not working (no ouput) Not working (no output) Sep 18, 2014
@4ntoine
Copy link
Author

4ntoine commented Sep 18, 2014

If i made an error in .ll code it shows me red error, so bitcode is processed. If i fix an error, output field becomes green but previous error text is not cleared

@4ntoine
Copy link
Author

4ntoine commented Sep 18, 2014

tested on chrome, mac osx maverics

@kripken
Copy link
Owner

kripken commented Sep 18, 2014

The project is not active from my perspective, sorry - i have no time to spend on it.

@4ntoine
Copy link
Author

4ntoine commented Sep 19, 2014

No problem. Can you explain in brief, how can i compile *.js files from LLVM/Clang sources? I believe it's not just like git clone LLVM/Clang sources and run ./emconfigure ./emmake, right?

@kripken
Copy link
Owner

kripken commented Sep 19, 2014

yes, basically just like porting any other project using emscripten. but, you will need to handle tblgen which is built and run natively. need a parallel native build, and to take the executables from that. i think i mentioned that in the readme

@4ntoine
Copy link
Author

4ntoine commented Sep 23, 2014

ok i have finished emmake make (fixed all the "all-target" issues). i can't see any .bc files produced. what should i do after i finished emmake?

@kripken
Copy link
Owner

kripken commented Sep 23, 2014

it should emit bitcode files. could have suffix .o or .so or .a

On Tue, Sep 23, 2014 at 9:14 AM, Anton Smirnov [email protected]
wrote:

ok i have finished emmake make (fixed all the "all-target" issues). i
can't see any .bc files produced. what should i do after i finished emmake?


Reply to this email directly or view it on GitHub
#2 (comment).

@4ntoine
Copy link
Author

4ntoine commented Sep 24, 2014

yes, i can see a lot if .o files in Release+Asserts. But in common build .o files are packed in lib*.a (using ar) and how to get according llvm static libs for JS?

@4ntoine
Copy link
Author

4ntoine commented Sep 24, 2014

Libs

oh, i can see also ./Release+Asserts/lib/lib*.a files which are not ar files - probably they are expected files. Since they are not common ar files (

MBA-Anton:build_local asmirnov$ lipo -info ../build_emscripten/Release+Asserts/lib/libclang.a
Segmentation fault: 11

) are they llvm bitcode archive?

Should they be renamed to .bc (as in projects build guide http://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html)?

Executables

Also in ./Release+Asserts/bin i can see files (f.e. lli, llc) which are not marked as executables. Are they llvm bitcode too? in common build they are interpreter and compiler accordingly

Final steps

I can't see "llvm" file in ./Release+Asserts/bin to be renamed to llvm.bc (https://github.com/kripken/llvm.js/blob/master/llvm.bc).

Thanks for helping me do it finally! I will publish my "update to LLVM 3.5 instructions" after all.

@piranna
Copy link

piranna commented Oct 2, 2014

Great work @4ntoine! :-) Did you be able to compile clang? This would help to have toolchain on NodeOS! :-)

@4ntoine
Copy link
Author

4ntoine commented Oct 2, 2014

No, unfortunately

2014-10-02 16:15 GMT+06:00 Jesús Leganés Combarro [email protected]
:

Great work @4ntoine https://github.com/4ntoine! :-) Did you be able to
compile clang? This would help to have toolchain on NodeOS! :-)


Reply to this email directly or view it on GitHub
#2 (comment).

@piranna
Copy link

piranna commented Oct 2, 2014

It's a shame, it would be really useful... :-(

@4ntoine
Copy link
Author

4ntoine commented Oct 2, 2014

Probably i will be able to do it if having answers to my questions

@piranna
Copy link

piranna commented Oct 2, 2014

Let's wait, then :-)

@UplinkCoder
Copy link

I just got emscripten-fastcomp compiled with emscripten-fastcomp.
I'll commit a pull that updates to llvm3.4 soon :)

@piranna
Copy link

piranna commented Jun 20, 2015

I've revised the code and tha latest commits and seems it's hosted the generated code, isn't it? How could it be done from the original source code? This way maybe it would be easy to maintain and have updated

@UplinkCoder
Copy link

The ir2js component is too old

@piranna
Copy link

piranna commented Jun 20, 2015

So we only have to work with what's on this repo? :-/

@UplinkCoder
Copy link

Ahm we would have to compile fastcomp to js.
and use that.
It's super huge though...

@UplinkCoder
Copy link

note: it is possible to comiple emscripten-fastcomp with emscripten fastcomp.
But I guess we'd have to clean the result up pretty good. to run it in a browser reasonably.

@piranna
Copy link

piranna commented Jun 20, 2015

I'm not interested on running it on the browser but on Node.js instead.

By the way, later it could be generated for the browser with browserify... :-)

@UplinkCoder
Copy link

that should be easier...
let me see if I can get llc to run on node.js
I remember that I got it to work with minor changes

@piranna
Copy link

piranna commented Jun 20, 2015

👍 :-)

@piranna
Copy link

piranna commented Jun 20, 2015

I don't use IRC, but my email is in my profile :-)

@UplinkCoder
Copy link

okay.
I'll send you a mail with my patches if I can find them

@piranna
Copy link

piranna commented Jun 20, 2015

Ok, thank you :-) I've seen that there are some commits of yours on your fork, could them be? Also I'm interested on using it on NodeOS, maybe I could make a fork and you can send the pull-request there and we can work there with them (publish as a npm package, add support for clang and so...), what do you think? :-)

@UplinkCoder
Copy link

Sure. I want to work on "selfhosting" emscripten again

@benatkin
Copy link

https://github.com/jprendes/emception - this currently only works on Firefox but it works

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

5 participants