Comments (10)
Have you tried sdk-tag-1.38.43-64bit
?
from emscripten-docker.
I initially tried latest
, which appears to be sdk-tag-1.38.43-64bit
currently. That's where I first encountered this error.
from emscripten-docker.
I've found a similar issue in the main project: emscripten-core/emscripten#9205 Can you check if this is something that you can try?
from emscripten-docker.
Yes that's the same issue I linked to, this comment on particular is the one that looks like it might be also related to the llvm version: emscripten-core/emscripten#9205 (comment)
After that point of discussion they move onto a different issue.
Fwiw I'm currently building successfully with .41 which I'm happy to stick with for now, it's basically just for demonstration use at this stage.
In case you're interested, CI build script:
https://gitlab.com/alelec/micropython_ci/blob/master/ports/javascript/.gitlab-ci.yml
Building micropython in the browser:
https://alelec.gitlab.io/micropython_ci/javascript.html
from emscripten-docker.
It should be easy to debug this using emcc -v
, which will print out the include paths. Then you can see if bits/alltypes.h
is present in one of those.
Note that emscripten used to have a symlink for that, but removed it since it didn't work on windows. I'm not aware of any bugs atm in upstream. Perhaps the docker image is missing some of the necessary files?
from emscripten-docker.
Sorry @andrewleech, I missed that you've posted this issue in the main topic.
I've tried to reproduce this issue locally without success so far.
Sample
#include <stdio.h>
#include <bits/alltypes.h>
int main(int argc, char** argv) {
printf("Test Test: %d\n", argc);
fflush(stdout);
return 0;
}
1.38.41
➜ docker run --rm -it -v `pwd`:/src trzeci/emscripten:sdk-tag-1.38.41-64bit find /emsdk_portable/ -name alltypes.h
/emsdk_portable/emscripten/tag-1.38.41/system/lib/libc/musl/arch/emscripten/bits/alltypes.h
➜ docker run --rm -it -v `pwd`:/src trzeci/emscripten:sdk-tag-1.38.41-64bit emcc -v test.c
/emsdk_portable/emscripten/tag-1.38.41/system/include/libcxx
/emsdk_portable/emscripten/tag-1.38.41/system/lib/libcxxabi/include
/emsdk_portable/emscripten/tag-1.38.41/system/include/compat
/emsdk_portable/emscripten/tag-1.38.41/system/include
/emsdk_portable/emscripten/tag-1.38.41/system/include/libc
/emsdk_portable/emscripten/tag-1.38.41/system/lib/libc/musl/arch/emscripten
/emsdk_portable/emscripten/tag-1.38.41/system/local/include
/emsdk_portable/emscripten/tag-1.38.41/system/include/SDL
/emsdk_portable/clang/tag-e1.38.41/build_tag-e1.38.41_64/lib/clang/6.0.1/include
1.38.43
➜ docker run --rm -it -v `pwd`:/src trzeci/emscripten:sdk-tag-1.38.43-64bit find /emsdk_portable/ -name alltypes.h
/emsdk_portable/emscripten/tag-1.38.43/system/lib/libc/musl/arch/emscripten/bits/alltypes.h
➜ docker run --rm -it -v `pwd`:/src trzeci/emscripten:sdk-tag-1.38.43-64bit emcc -v test.c
...
/emsdk_portable/emscripten/tag-1.38.43/system/include/libcxx
/emsdk_portable/emscripten/tag-1.38.43/system/lib/libcxxabi/include
/emsdk_portable/emscripten/tag-1.38.43/system/include/compat
/emsdk_portable/emscripten/tag-1.38.43/system/include
/emsdk_portable/emscripten/tag-1.38.43/system/include/libc
/emsdk_portable/emscripten/tag-1.38.43/system/lib/libc/musl/arch/emscripten
/emsdk_portable/emscripten/tag-1.38.43/system/local/include
/emsdk_portable/emscripten/tag-1.38.43/system/include/SDL
/emsdk_portable/clang/tag-e1.38.43/build_tag-e1.38.43_64/lib/clang/6.0.1/include
latest
➜ docker run --rm -it -v `pwd`:/src trzeci/emscripten:latest find /emsdk_portable/ -name alltypes.h
/emsdk_portable/emscripten/tag-1.38.43/system/lib/libc/musl/arch/emscripten/bits/alltypes.
➜ docker run --rm -it -v `pwd`:/src trzeci/emscripten:latest emcc -v test.c
...
/emsdk_portable/emscripten/tag-1.38.43/system/include/libcxx
/emsdk_portable/emscripten/tag-1.38.43/system/lib/libcxxabi/include
/emsdk_portable/emscripten/tag-1.38.43/system/include/compat
/emsdk_portable/emscripten/tag-1.38.43/system/include
/emsdk_portable/emscripten/tag-1.38.43/system/include/libc
/emsdk_portable/emscripten/tag-1.38.43/system/lib/libc/musl/arch/emscripten
/emsdk_portable/emscripten/tag-1.38.43/system/local/include
/emsdk_portable/emscripten/tag-1.38.43/system/include/SDL
Tried also upstream just in case and looks that it works just fine. At least there is no sign that it shouldn't.
Do you thin that you can change ci script and check with emcc -v
to see what we have there?
from emscripten-docker.
@andrewleech
I was able to reproduce this issue with your repository, and indeed it's something changed in 1.38.42+
I've found:
ifdef EMSCRIPTEN
CPP += -isystem $(EMSCRIPTEN)/system/include/libc -cxx-isystem $(EMSCRIPTEN)/system/include/libcxx
endif
In your make file, this looks incompatible with emscripten-core/emscripten#9197
Simple changing it to:
ifdef EMSCRIPTEN
CPP += -isystem $(EMSCRIPTEN)/system/include/libc
CPP += -isystem $(EMSCRIPTEN)/system/lib/libc/musl/arch/emscripten
CPP += -cxx-isystem $(EMSCRIPTEN)/system/include/libcxx
endif
Fixed the problem with compilation
from emscripten-docker.
I was just testing it myself and it appears to be somewhat of a false alarm; the first stage of building is using clang to pre-process a bunch of stuff.
It's clang that can't find the header, not emcc.
Yes, your change looks good and makes sense based on my findings, I'll submit a patch for that to the micropython project upstream.
Thanks so much for your help!
from emscripten-docker.
Happy to help!
Cheers,
from emscripten-docker.
Thank you. I fix the same problem according to your way. Then I get another error that can't find wasi/api.h. I add
"CPP += -isystem $(EMSCRIPTEN)/system/include/" to fix it too.
BTW. @andrewleech I use upy 1.11 release. Is your submit realeased in upy 1.12?
But my questions are:
1 Why the same micropython project get different when use different emscripten version?
2 Why $EMSCRIPTEN env var was geted rid of after emscripten 1.38.29. I am not sure the exact version. I just know 1.38.29 has $EMSCRIPTEN. But when I use 1.38.33, I must set the env var handly to meet the micropython ports/javascript/makefile.
from emscripten-docker.
Related Issues (20)
- Current docker image doesn't support llvm upstream HOT 9
- None
- emscripten-upstream exception problems HOT 5
- jenkins.trzeci.eu appears to be down HOT 4
- Building error of 1.39.1 HOT 3
- Has the pwd changed? HOT 6
- Missing emscripten:sdk-incoming-64bit
- Clean up README
- 1.39.4 is failing to build HOT 2
- Alpine Linux base image HOT 2
- No setup/usage instruction for Windows User HOT 6
- ETA for latest Emscripten builds HOT 2
- Make it easier to use emscripten tools HOT 1
- Use upstream by default? HOT 3
- Add precached LTO variants of libraries HOT 7
- latest tag HOT 6
- Advertise the official emscripten image
- Include cpack in Emscripten docker image
- Using -llibstdc++ works in fastcomp but not in upstream. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emscripten-docker.