TextureMapper::create ERROR: To use dlopen, you need to use Emscripten's linking support
I fixed *.so liking errors replacing $ar with emcc
// see https://github.com/derofim/webkitjs-bugtest/search?q=solink_js&unscoped_q=solink_js
self.ninja.variable('ar', 'emcc')
self.ninja.variable('cc', 'emcc')
self.ninja.variable('cxx', 'em++')
self.ninja.variable('ld', 'emcc')
self.ninja.variable('ldxx', 'em++')
master_ninja.rule(
'solink_js',
description='SOLINK_JS $lib, POSTBUILDS',
restat=True,
command='$ld $ldflags $in $solibs -o $soname',
pool='link_pool')
Got error running in browser: To use dlopen, you need to use Emscripten's linking support
Replaced
m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
with
m_textureMapper = TextureMapper::create(TextureMapper::SoftwareMode);
To fix "To use dlopen, you need to use Emscripten's linking support"
Nothing showed after setHTML.
Has anyone managed to make webkit work with modern emscripten?
emcc --version
emcc (Emscripten gcc/clang-like replacement) 1.38.28 (commit 590e7bb23dc15ec32272363b5eb10bc3aabe0294)
fixed by changing all libs to static ('type': 'static_library') and setting MAIN_MODULE/SIDE_MODULE
'ldflags+':['-s MAIN_MODULE=1 -s ASSERTIONS=1 -s FULL_ES2=1 -s LINKABLE=1 -s ASM_JS=1 -s WASM=0 -s USE_SDL=2 -std=c++11 -s USE_ICU=1'],
'jsflags+':['-s MAIN_MODULE=1 -s ASSERTIONS=1 -s FULL_ES2=1 -s LINKABLE=1 -s ASM_JS=1 -s WASM=0 -s USE_SDL=2 -std=c++11 -s USE_ICU=1'],
also resolved duplicate symbols for RenderEmbeddedObject
and added -DHAVE_ICU=1 to cflags and 'dependencies'
got error after TextureMapperGL drawTexture Platform3DObject...
webkit.html:1 trap!
webkit.html:1 trap!
printErr @ webkit.html:1
abort @ webkit.js:48
_llvm_trap @ webkit.js:1
VFE @ webkit.js:32896
N0H @ webkit.js:3383
IoE @ webkit.js:31985
MME @ webkit.js:33298
DME @ webkit.js:33254
fME @ webkit.js:33230
bUE @ webkit.js:33658
UNA @ webkit.js:38123
CMA @ webkit.js:38116
b1H @ webkit.js:4287
pZA @ webkit.js:38866
gZA @ webkit.js:38856
VYA @ webkit.js:38836
VaB @ webkit.js:39665
OaB @ webkit.js:39724
ftCall_viiiiiidi @ webkit.js:1
m1H @ webkit.js:36057
EaB @ webkit.js:39678
h1H @ webkit.js:39249
G2A @ webkit.js:39247
d1H @ webkit.js:39326
L7A @ webkit.js:39514
g1H @ webkit.js:37408
yDC @ webkit.js:81060
FDC @ webkit.js:81046
oDC @ webkit.js:81043
jDC @ webkit.js:81037
FDC @ webkit.js:81046
oDC @ webkit.js:81043
jDC @ webkit.js:81037
hDC @ webkit.js:33816
gWE @ webkit.js:33812
eWE @ webkit.js:33809
dWE @ webkit.js:33808
cWE @ webkit.js:33807
ftCall_vi @ webkit.js:1
dynCall @ webkit.js:1
dynCall_wrapper @ webkit.js:1
wrapper @ webkit.js:1
(anonymous) @ webkit.js:1
setTimeout (async)
safeSetTimeout @ webkit.js:1
_emscripten_async_call @ webkit.js:1
bWE @ webkit.js:33779
wWE @ webkit.js:33822
a8E @ webkit.js:14703
EN @ webkit.js:14664
fN @ webkit.js:14636
UM @ webkit.js:14597
WO @ webkit.js:14756
YO @ webkit.js:14759
asm._main @ webkit.js:48
callMain @ webkit.js:48
doRun @ webkit.js:48
(anonymous) @ webkit.js:48
setTimeout (async)
run @ webkit.js:48
runCaller @ webkit.js:48
removeRunDependency @ webkit.js:1
applyMemoryInitializer @ webkit.js:48
useRequest @ webkit.js:48
setTimeout (async)
(anonymous) @ webkit.js:48
webkit.js:48 Uncaught abort("trap!") at Error
at jsStackTrace (http://localhost:8081/Release/webkit.js:1:1086547)
at stackTrace (http://localhost:8081/Release/webkit.js:1:1086718)
at abort (http://localhost:8081/Release/webkit.js:48:2148861)
at _llvm_trap (http://localhost:8081/Release/webkit.js:1:1460613)
at VFE (http://localhost:8081/Release/webkit.js:21:707875)
at N0H (http://localhost:8081/Release/webkit.js:41:106351)
at IoE (http://localhost:8081/Release/webkit.js:21:383605)
at MME (http://localhost:8081/Release/webkit.js:22:20180)
at DME (http://localhost:8081/Release/webkit.js:22:19570)
at fME (http://localhost:8081/Release/webkit.js:22:14641)
abort @ webkit.js:48
_llvm_trap @ webkit.js:1
VFE @ webkit.js:32896
N0H @ webkit.js:3383
IoE @ webkit.js:31985
MME @ webkit.js:33298
DME @ webkit.js:33254
fME @ webkit.js:33230
bUE @ webkit.js:33658
UNA @ webkit.js:38123
CMA @ webkit.js:38116
b1H @ webkit.js:4287
pZA @ webkit.js:38866
gZA @ webkit.js:38856
VYA @ webkit.js:38836
VaB @ webkit.js:39665
OaB @ webkit.js:39724
ftCall_viiiiiidi @ webkit.js:1
m1H @ webkit.js:36057
EaB @ webkit.js:39678
h1H @ webkit.js:39249
G2A @ webkit.js:39247
d1H @ webkit.js:39326
L7A @ webkit.js:39514
g1H @ webkit.js:37408
yDC @ webkit.js:81060
FDC @ webkit.js:81046
oDC @ webkit.js:81043
jDC @ webkit.js:81037
FDC @ webkit.js:81046
oDC @ webkit.js:81043
jDC @ webkit.js:81037
hDC @ webkit.js:33816
gWE @ webkit.js:33812
eWE @ webkit.js:33809
dWE @ webkit.js:33808
cWE @ webkit.js:33807
ftCall_vi @ webkit.js:1
dynCall @ webkit.js:1
dynCall_wrapper @ webkit.js:1
wrapper @ webkit.js:1
(anonymous) @ webkit.js:1
setTimeout (async)
safeSetTimeout @ webkit.js:1
_emscripten_async_call @ webkit.js:1
bWE @ webkit.js:33779
wWE @ webkit.js:33822
a8E @ webkit.js:14703
EN @ webkit.js:14664
fN @ webkit.js:14636
UM @ webkit.js:14597
WO @ webkit.js:14756
YO @ webkit.js:14759
asm._main @ webkit.js:48
callMain @ webkit.js:48
doRun @ webkit.js:48
(anonymous) @ webkit.js:48
setTimeout (async)
run @ webkit.js:48
runCaller @ webkit.js:48
removeRunDependency @ webkit.js:1
applyMemoryInitializer @ webkit.js:48
useRequest @ webkit.js:48
setTimeout (async)
(anonymous) @ webkit.js:48
webkit.js:1 [Violation] 'setTimeout' handler took 1335ms
[Violation] Forced reflow while executing JavaScript took 825ms
llvm trap in feature/v2 disappeared after adding some printf/compile features
https://github.com/derofim/webkitjs-bugtest/tree/feature/v2
egl says about invalid opengl es shader (sometimes prints another errors, behavior similar to data race).
gl works, webkit draws white screen. need to fix shader/data race
Hey, did you ever manage to make this work?
@vedantroy some branch from https://github.com/derofim/webkitjs-bugtest/branches showed image. But it was static due to hang somewhere in code. I think that issue may be due to bugged port of multi-threaded code (in builds with web workers enabled) or per-browser limitations in function execution time i.e. js functions must be async (in builds with web workers disabled)
I managed to port other browser to web, windows and linux: http://cobalt.foo/ (for education purposes), but without browser-like scrolling (see cobalt.foo README, it is not full browser), without video support, JS engine fully removed (all logic in C++) e.t.c. That way it can be used as cross-platfom GUI framework like QT (also it is possible output 'ordinary' HTML/CSS page that used WASM for logic, not only render it using OpenGL). Size overhead of resulting GUI framework found to be ~5mb for web or ~15mb for native, so i stopped development due to lack of free time (need a lot of time to optimize binary size).
Respond here if you are interested in web port of cobalt.foo (i can share code, docs etc.).
Used ubuntu, cmake and conan. Some libs were extracted from monolithic browser, so others can use them in any project (note chromium license requirements), see https://github.com/blockspacer/chromium_base_conan as example (look at chromium`s base library, it is awesome!).