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

Preserve compiled libs #8

Open
trzecieu opened this issue Aug 3, 2017 · 11 comments
Open

Preserve compiled libs #8

trzecieu opened this issue Aug 3, 2017 · 11 comments

Comments

@trzecieu
Copy link
Owner

trzecieu commented Aug 3, 2017

ATM emscripten image compiles all ports, but do not preserve output (due a size ~1GB), this might be done as a separated image emscripten-full

@remram44
Copy link

remram44 commented Feb 3, 2018

I'm also running into the issue that libclang.so is missing, which makes eg Rust builds fail.

@trzecieu
Copy link
Owner Author

trzecieu commented Feb 3, 2018

Hi @remram44,
libclang is a part of https://packages.debian.org/stretch/libclang-3.9-dev
Can you try to run: sudo apt install libclang-3.9-dev before running the compilation?

I can complete the emscripten image with the missing dependency.

@remram44
Copy link

remram44 commented Feb 3, 2018

I'm getting:

/emsdk_portable/sdk/system/include/emscripten/emscripten.h:135:71: error: 'deprecated' attribute takes no more than 1 argument, err: true

if I install libclang-dev from apt first.

@trzecieu
Copy link
Owner Author

trzecieu commented Feb 3, 2018

Interesting,
https://github.com/kripken/emscripten/blob/incoming/system/include/emscripten/emscripten.h#L135
It looks that this doesn't help at all to install the libclang, some of clang tools is used in compilation (from version 3.9 what has different signature for deprecated method).

I'll look if we can compile / preserve libclang from emscripten compilation step.

@trzecieu
Copy link
Owner Author

trzecieu commented Feb 3, 2018

@remram44 I found it, it can be preserved. Do you have some minimal test case what I can run to verify if my patch works?

Alternatively you can extract llvm_clang_lib.tar.gz (from compiling latest version of Emscripten) to /emsdk_portable/llvm/clang/lib and see if this will just work.

--
After it I'll merge #25

trzecieu added a commit that referenced this issue Feb 3, 2018
@remram44
Copy link

remram44 commented Feb 3, 2018

I'm happy to test this. I can try to make a smaller Rust example.

@remram44
Copy link

remram44 commented Feb 3, 2018

Here's my minified example: https://github.com/remram44/test-rust-emscripten

@remram44
Copy link

remram44 commented Feb 3, 2018

Seems to work with the libs, and not without it. I'll let you know if my full project compiles, seems to be taking a while (would it be building the SDL2 port behind the scenes?)

@trzecieu
Copy link
Owner Author

trzecieu commented Feb 3, 2018

Yes, none of ports are baked into the image.
I was able to reproduce error and test a hack fix. I'll test the branch from and once it works fine I'll update sdk-incoming.

Thank you for reporting

@remram44
Copy link

remram44 commented Feb 3, 2018

I can't seem to build the port, emcc ends up spawning more processes endlessly until my system runs out of memory (827 python /emsdk_portable/sdk/emcc processes right now); But I might be doing something wrong? (just ran emcc -s USE_SDL=2 helloworld.c)

@remram44
Copy link

remram44 commented Feb 4, 2018

Turns out setting EMMAKEN_CFLAGS='-s USE_SDL=2' causes the port build to recurse indefinitely. Looks like an upstream bug. Got everything working now, thanks for your very quick help!

trzecieu added a commit that referenced this issue Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants