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

Add tests building with emscripten target #2408

Open
wants to merge 3 commits into
base: pre-ll
Choose a base branch
from

Conversation

gridbugs
Copy link

Fixes #1695

Adds tests on linux which run cargo test --all using --target=asmjs-unknown-emscripten and --target=wasm32-unknown-emscripten.

The default installation of emscripten (as per https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) doesn't seem to work on travis. It fails with the error:
/home/travis/emsdk/clang/e1.38.12_64bit/llc: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.20' not found (required by /home/travis/emsdk/clang/e1.38.12_64bit/llc). I've experienced this problem offline and the solution was to build clang from source, but this takes too long on travis so instead the test uses the docker image recommended on emscripten's website (https://kripken.github.io/emscripten-site/docs/compiling/Travis.html).

Note that the build is currently failing with the error *** Error in '/emsdk_portable/llvm/clang/bin/llc': corrupted double-linked list: 0x0000000003148920 ***.

I've done some testing offline, attempting to build the triangle example. I've encountered the error above, and also the following:

  • corrupted size vs. prev_size
  • double free or corruption (!prev)

The error seems to be non deterministic. It also occasionally compiles without error and produces code which seems to work.

Tested on travis:
https://travis-ci.org/stevebob/gfx/jobs/429755777

PR checklist:

  • make succeeds (on *nix)
  • make reftests succeeds
  • tested examples with the following backends:
  • rustfmt run on changed code

@kvark
Copy link
Member

kvark commented Sep 18, 2018

Thank you for the PR and a detailed report!
Filed rust-lang/rust#54312 for an advice from Rust folks.

@semtexzv
Copy link

I believe this can be caused by the image library. I opened an issue here : image-rs/image#817

@kvark
Copy link
Member

kvark commented Jun 27, 2019

Is this still an issue? Please re-test. @stevebob

@gridbugs
Copy link
Author

I merged the latest changes in pre-ll into my branch and reran travis tests, and I still see corrupted double-linked list.
https://travis-ci.org/stevebob/gfx/jobs/551502252#L1373

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

Successfully merging this pull request may close these issues.

3 participants