Skip to content

Tutorial contains error #6079

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

Closed
zwhitchcox opened this issue Jan 14, 2018 · 7 comments
Closed

Tutorial contains error #6079

zwhitchcox opened this issue Jan 14, 2018 · 7 comments
Labels

Comments

@zwhitchcox
Copy link

So, the tutorial contains an error when I first run emscripten (1.37.28), it gives the error

stdio streams had content in them that was not flushed. you should set NO_EXIT_RUNTIME to 0 (see the FAQ), or make sure to emit a newline when you printf etc.

It didn't say anything about the error in the tutorial, so it doesn't seem like that was intended, but if so, I can see where I can build with the -s flag, but that seems like a lot for "hello, world", so just wanted to be sure.

@zwhitchcox
Copy link
Author

Note: it did work when I compiled with -s NO_EXIT_RUNTIME=0

@curiousdannii
Copy link
Contributor

The default was recently changed: #5878.

The docs need an update, and maybe the tutorial code should be tested as is to prevent this kind of thing in the future?

@kripken
Copy link
Member

kripken commented Jan 16, 2018

@zwhitchcox Which part of the tutorial caused this? It seems like the printfs do have newlines in them, so I'm not sure how that could happen. Although the files example does use putchar, was it there?

@curiousdannii Good idea about testing, hopefully there's a way.

@zwhitchcox
Copy link
Author

zwhitchcox commented Jan 22, 2018

For me it happened with printf, even with the new lines

Idk, might just be my machine though...running galliumOS (a chromebook version of linux)

@kripken
Copy link
Member

kripken commented Jan 22, 2018

Very strange, printf with a newline should work, and we do test that heavily. So maybe it is something on your local system. What node.js version was used? (or was it another shell?)

@zwhitchcox
Copy link
Author

I didn't know you could use node.js for that. I was just using em++

@stale
Copy link

stale bot commented Sep 19, 2019

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Sep 19, 2019
@stale stale bot closed this as completed Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants