Comments (12)
To be clear, this issue also occurs if emscripten and the project are on the same drive right?
You mentioned on the mailing list that the source map contained a path that looked like: myArea/myApp/C:/Users/myName/emsdk/upstream/emscripten
.
It seems like that both is simply broken, regardless of which drive emsdk is on. Or is it the cast that these bad paths are not generated when emsdk is on the same drive as the project?
from emscripten.
If emscripten and the project are on the same drive, the source will contain relative paths to the emscripten files:
{"version":3,"sources":["test.c","../Users/diete/emsdk/upstream/emscripten/system/lib/libc/emscripten_get_heap_size.c","...
So it looks as if the bad paths are only generated when emsdk and project reside on different drives.
from emscripten.
What does that emscripten_get_heap_size.c
line looks like in the broken source map?
from emscripten.
{"version":3,"sources":["test.c","C:/Users/diete/emsdk/upstream/emscripten/system/lib/libc/emscripten_get_heap_size.c","C:/Users/diete/emsdk...
from emscripten.
That looks correct to me. Do you know where the bad path (myArea/myApp/C:/Users/myName/emsdk/upstream/emscripten
) path in your original report comes from?
from emscripten.
C:/Users/myName/emsdk/upstream/emscripten
is the correct installation path on my computer. The map file has of course been generated by emsdk.
The issue may be that localhost can not manage any references across local drives. So localhost (or any other server) can only find the emsdk files if they are in the same "myArea" tree as the source files I think.
from emscripten.
I'm not sure what you mean by "localhost" here. Are you referring to the http server you are using to serve your source files? If its asked to serve C:/Users/myName/emsdk/upstream/emscripten
what can't it do that? Is there some fundamental reason? Is there any other solution you can imagine other than fixing the server here?
from emscripten.
sorry for the confusion.
For testing purposes I have Internet Information Server running on my computer. If I launch the project in a browser the URL will be http://localhost/myArea/myApp
, because the default directory is set to D:\myArea
.
emsdk produces the sourcemap with relative paths for my source files, which is correct. The paths to emsdk files can't be relative (and could never be unless emsdk is installed on the same drive), so it uses the local file path, which can't work.
So either it is a prerequisite to keep emsdk and all projects on the same drive, or another way must be found so that the browser can find the emsdk files. For local testing as in my use case the local file path may suffice if the browser is able to use it.
from emscripten.
so it uses the local file path, which can't work.
Why do you say it cannot work? Its seems like a limitation of the server "Internet Information Server"? Perhaps it is configurable or perhaps you could try a different server that does support absolute paths somehow?
It seems like either you need to find or configure as server that allows absolute paths, or you need to put emsdk in a place where it can be found using a relative path. I'm not sure this is something that can be fixed on the emscripten side.
from emscripten.
Thanks for the suggestion, I will have a look at that.
Chrome turns the absolute path in the map into
file:myArea/myApp/C:/Users/diete/emsdk/upstream/emscripten
So perhaps the issue is there. I will examine this further.
Thanks for your attention!
from emscripten.
Thanks for the suggestion, I will have a look at that. Chrome turns the absolute path in the map into
file:myArea/myApp/C:/Users/diete/emsdk/upstream/emscripten
Oh I see.. that does seem wrong. So in that case no request is actually being sent to the server? That seems pretty strange.
from emscripten.
I just ran the project in Firefox. It seems to sort out the absolute path correctly, however, when accessing the source file I see an error:
unsupported protocol for sourcemap request c:/Users/diete/emsdk/upstream/emscripten/system/lib/dlmalloc.c
from emscripten.
Related Issues (20)
- Error while compiling static library with emscripten HOT 1
- How to directly get context of WebGL2 from canvas when building with "-sOFFSCREENCANVAS_SUPPORT=1 -sOFFSCREEN_FRAMEBUFFER=1" flags?
- ASYNCIFY and INCOMING_MODULE_JS_API HOT 3
- thread wasm64 HOT 2
- Multithreading worker issue HOT 3
- Improve support for keyboard input on mobile browsers HOT 4
- emcc/wasm-ld fails autoconf sanity check HOT 3
- Error after setting GL_UNPACK_ROW_LENGTH HOT 10
- emconfigure sets both, CROSS_COMPILE and CC to absolute path, which seems to fail with man projects HOT 2
- Dynamic linking broken in 3.1.57
- `alignof(long double) == 8` even though `sizeof(long double) == 16`—why? HOT 2
- `FS.stat` has inconsistent `[a/m/c]time` values in WasmFS HOT 4
- pthread workers fail to run when ENVIRONMENT=worker only HOT 7
- Component model support in Emscripten HOT 1
- --emit-tsd does not output function argument names HOT 2
- Can't preload files/shared libs in service worker due to lack of XHR [PR OPEN]
- isinf() can return -1 HOT 4
- missing FE_xx defines HOT 7
- Building failure after switching from 3.1.47 to 3.1.57 HOT 5
- Passing array of arrays to emscripten HOT 1
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.