Skip to content

Instantly share code, notes, and snippets.

@chchwy
Created October 29, 2018 22:30
Show Gist options
  • Save chchwy/66e4c83b3d9cfbff572929cfc6deee77 to your computer and use it in GitHub Desktop.
Save chchwy/66e4c83b3d9cfbff572929cfc6deee77 to your computer and use it in GitHub Desktop.
Linking errors from compiling bgfx to asm.js
D:\emsdk>emsdk activate latest
Writing .emscripten configuration file to user home directory C:\Users\Matt/
The Emscripten configuration file C:\Users\Matt\.emscripten has been rewritten with the following contents:
import os
LLVM_ROOT='D:/emsdk/clang/e1.38.15_64bit'
EMSCRIPTEN_NATIVE_OPTIMIZER='D:/emsdk/clang/e1.38.15_64bit/optimizer.exe'
BINARYEN_ROOT='D:/emsdk/clang/e1.38.15_64bit/binaryen'
NODE_JS='D:/emsdk/node/8.9.1_64bit/bin/node.exe'
PYTHON='D:/emsdk/python/2.7.13.1_64bit/python-2.7.13.amd64/python.exe'
JAVA='D:/emsdk/java/8.152_64bit/bin/java.exe'
EMSCRIPTEN_ROOT='D:/emsdk/emscripten/1.38.15'
SPIDERMONKEY_ENGINE = ''
V8_ENGINE = ''
TEMP_DIR = 'c:/users/matt/appdata/local/temp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
Adding directories to PATH:
PATH += D:\emsdk
PATH += D:\emsdk\clang\e1.38.15_64bit
PATH += D:\emsdk\node\8.9.1_64bit\bin
PATH += D:\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64
PATH += D:\emsdk\java\8.152_64bit\bin
PATH += D:\emsdk\emscripten\1.38.15
Setting environment variables:
EMSDK = D:/emsdk
EM_CONFIG = C:\Users\Matt\.emscripten
LLVM_ROOT = D:\emsdk\clang\e1.38.15_64bit
EMSCRIPTEN_NATIVE_OPTIMIZER = D:\emsdk\clang\e1.38.15_64bit\optimizer.exe
BINARYEN_ROOT = D:\emsdk\clang\e1.38.15_64bit\binaryen
EMSDK_NODE = D:\emsdk\node\8.9.1_64bit\bin\node.exe
EMSDK_PYTHON = D:\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\python.exe
JAVA_HOME = D:\emsdk\java\8.152_64bit
EMSCRIPTEN = D:\emsdk\emscripten\1.38.15
Set the following tools as active:
clang-e1.38.15-64bit
node-8.9.1-64bit
python-2.7.13.1-64bit
java-8.152-64bit
emscripten-1.38.15
The changes made to environment variables only apply to the currently running shell instance. Use the 'emsdk_env.bat' to re-enter this environment later, or if you'd like to permanently register this environment globally to all users in Windows Registry, rerun this command with the option --global.
D:\emsdk>cd ..
D:\>cd Github
D:\Github>cd bgfx_proj
D:\Github\bgfx_proj>cd bgfx
D:\Github\bgfx_proj\bgfx>ls
3rdparty CONTRIBUTING.md LICENSE README.md examples include makefile scripts src tools
D:\Github\bgfx_proj\bgfx>make projgen asmjs
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib vs2015
Building configurations...
Running action 'vs2015'...
Done. Generated 0/55 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib vs2017
Building configurations...
Running action 'vs2017'...
Done. Generated 0/55 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --vs=winstore100 vs2017
Building configurations...
Running action 'vs2017'...
Done. Generated 0/50 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake
Set MINGW environment variable.
Building configurations...
Running action 'gmake'...
Done. Generated 0/19 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/19 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/19 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode8
Building configurations...
Running action 'xcode8'...
Done. Generated 0/39 projects.
../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode8
Building configurations...
Running action 'xcode8'...
Done. Generated 0/39 projects.
../bx/tools/bin/windows/genie --with-combined-examples --with-shared-lib --gcc=freebsd gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/10 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=android-arm gmake
Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=android-mips gmake
Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=android-x86 gmake
Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=asmjs gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=ios-arm gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=ios-arm64 gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=ios-simulator gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=ios-simulator64 gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
../bx/tools/bin/windows/genie --with-combined-examples --gcc=rpi gmake
Building configurations...
Running action 'gmake'...
Done. Generated 0/9 projects.
make -R -C .build/projects/gmake-asmjs config=debug
make[1]: Entering directory `/d/Github/bgfx_proj/bgfx/.build/projects/gmake-asmjs'
==== Building bx (debug) ====
allocator.cpp
INFO:root:generating system asset: is_vanilla.txt... (this will be cached in "C:\Users\Matt\.emscripten_cache\is_vanilla.txt" for subsequent builds)
INFO:root: - ok
INFO:root:(Emscripten: Running sanity checks)
bx.cpp
commandline.cpp
crtnone.cpp
debug.cpp
dtoa.cpp
easing.cpp
file.cpp
filepath.cpp
hash.cpp
math.cpp
mutex.cpp
os.cpp
process.cpp
semaphore.cpp
settings.cpp
sort.cpp
string.cpp
thread.cpp
timer.cpp
url.cpp
Archiving bx
==== Building bgfx (debug) ====
bgfx.cpp
debug_renderdoc.cpp
dxgi.cpp
glcontext_egl.cpp
../../../src/glcontext_egl.cpp:366:3: warning: 'emscripten_set_canvas_size' is deprecated: This variant does not allow
specifying the target canvas [-Wdeprecated-declarations]
emscripten_set_canvas_size(_width, _height);
^~~~~~~~~~~~~~~~~~~~~~~~~~
Use emscripten_set_canvas_element_size() instead
D:\emsdk\emscripten\1.38.15/system/include\emscripten/emscripten.h:142:71: note: 'emscripten_set_canvas_size' has been
explicitly marked deprecated here
void emscripten_set_canvas_size(int width, int height) __attribute__((deprecated("This variant does not allow sp...
^
1 warning generated.
glcontext_glx.cpp
glcontext_wgl.cpp
nvapi.cpp
renderer_d3d11.cpp
renderer_d3d12.cpp
renderer_d3d9.cpp
renderer_gl.cpp
renderer_gnm.cpp
renderer_noop.cpp
renderer_vk.cpp
shader.cpp
shader_dx9bc.cpp
shader_dxbc.cpp
shader_spirv.cpp
topology.cpp
vertexdecl.cpp
Archiving bgfx
==== Building bimg (debug) ====
image.cpp
image_gnf.cpp
Archiving bimg
==== Building bimg_decode (debug) ====
image_decode.cpp
Archiving bimg_decode
==== Building example-common (debug) ====
imgui.cpp
imgui_draw.cpp
imgui_widgets.cpp
bgfx_utils.cpp
bounds.cpp
camera.cpp
cube_atlas.cpp
debugdraw.cpp
cmd.cpp
entry.cpp
entry_android.cpp
entry_asmjs.cpp
entry_glfw.cpp
entry_noop.cpp
entry_sdl.cpp
entry_windows.cpp
entry_x11.cpp
input.cpp
font_manager.cpp
text_buffer_manager.cpp
text_metrics.cpp
imgui.cpp
nanovg.cpp
nanovg_bgfx.cpp
particle_system.cpp
Archiving example-common
==== Building example-glue (debug) ====
example-glue.cpp
Archiving example-glue
==== Building example-25-c99 (debug) ====
helloworld.c
Linking example-25-c99
Running post-build commands
Running asmjs finalize.
INFO:root:generating system library: libcxx_noexcept.a... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\libcxx_noexcept.a" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: libcxxabi.bc... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\libcxxabi.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: libc.bc... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\libc.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: compiler-rt.a... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\compiler-rt.a" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: wasm-libc.bc... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\wasm-libc.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: gl.bc... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\gl.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: dlmalloc.bc... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\dlmalloc.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: libc-extras.bc... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\libc-extras.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system asset: generated_struct_info.json... (this will be cached in "C:\Users\Matt\.emscripten_cache\asmjs\generated_struct_info.json" for subsequent builds)
INFO:root: - ok
==== Building examples (debug) ====
helloworld.cpp
cubes.cpp
metaballs.cpp
raymarch.cpp
mesh.cpp
instancing.cpp
bump.cpp
callback.cpp
update.cpp
hdr.cpp
font.cpp
fontsdf.cpp
lod.cpp
stencil.cpp
shadowvolumes.cpp
shadowmaps_simple.cpp
shadowmaps.cpp
drawstress.cpp
ibl.cpp
oit.cpp
nanovg.cpp
deferred.cpp
windows.cpp
main.cpp
vectordisplay.cpp
nbody.cpp
helloworld.c
occlusion.cpp
terrain.cpp
wireframe.cpp
debugdraw.cpp
picking.cpp
reflectiveshadowmap.cpp
particles.cpp
pom.cpp
mvs.cpp
dynamic.cpp
sky.cpp
gpudrivenrendering.cpp
bloom.cpp
Linking examples
Running post-build commands
Running asmjs finalize.
error: undefined symbol: _ZN2bx5Mutex4lockEv
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
error: undefined symbol: _ZN2bx5Mutex6unlockEv
error: undefined symbol: _ZN2bx5MutexC1Ev
error: undefined symbol: _ZN2bx6Thread3popEv
error: undefined symbol: _ZN2bx6Thread4initEPFiPS0_PvES2_jPKc
error: undefined symbol: _ZN2bx6Thread4pushEPv
error: undefined symbol: _ZN2bx6Thread8shutdownEv
error: undefined symbol: _ZN2bx6ThreadC1Ev
error: undefined symbol: _ZN2bx6ThreadD1Ev
error: undefined symbol: _ZN2bx9Semaphore4postEj
error: undefined symbol: _ZN2bx9Semaphore4waitEi
error: undefined symbol: _ZN2bx9SemaphoreC1Ev
error: undefined symbol: _ZN2bx9SemaphoreD1Ev
Error: Aborting compilation due to previous errors
ERROR:root:'D:/emsdk/node/8.9.1_64bit/bin/node.exe D:\emsdk\emscripten\1.38.15\src\compiler.js C:\Users\Matt\AppData\Local\Temp\tmpcanrjf.txt D:\emsdk\emscripten\1.38.15\src\library_pthread_stub.js' failed (1)
make[2]: *** [../../asmjs/bin/examplesDebug.bc] Error 1
make[1]: *** [examples] Error 2
make[1]: Leaving directory `/d/Github/bgfx_proj/bgfx/.build/projects/gmake-asmjs'
make: *** [asmjs-debug] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment