Error in dockerized web build

Hi, and first of all thanks to all the development team of Urho3D for creating such a hidden jewel of an engine.

Yesterday I updated both the source code and the Docker images to build it.

When running a script/ web from the source directory, this is the output:

CMake Deprecation Warning at CMakeLists.txt:31 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- Check for working C compiler: /usr/lib/ccache/emcc
-- Check for working C compiler: /usr/lib/ccache/emcc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler


  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/sjenkinsc/Fuentes/Urho3D/build/web/CMakeFiles/CMakeTmp
    Run Build Command:"/usr/bin/make" "cmTC_d5df9/fast"
    /usr/bin/make -f CMakeFiles/cmTC_d5df9.dir/build.make CMakeFiles/cmTC_d5df9.dir/build
    make[1]: Entering directory '/home/sjenkinsc/Fuentes/Urho3D/build/web/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_d5df9.dir/testCCompiler.c.o
    /usr/lib/ccache/emcc --sysroot=/emscripten-sdk/emscripten/incoming/system    -o CMakeFiles/cmTC_d5df9.dir/testCCompiler.c.o   -c /home/sjenkinsc/Fuentes/Urho3D/build/web/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_d5df9.js
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d5df9.dir/link.txt --verbose=1
    /usr/lib/ccache/emcc --sysroot=/emscripten-sdk/emscripten/incoming/system      -rdynamic CMakeFiles/cmTC_d5df9.dir/testCCompiler.c.o  -o cmTC_d5df9.js 
    error: failure to process js library "library.js": Missing C define TIME_UTC! If you just added it to struct_info.json, you need to ./emcc --clear-cache,
    error: use -s VERBOSE to see more details
    Internal compiler error in src/compiler.js!
    Please create a bug report at with a log of the build and the input files used to run. Exception message: "Missing C define TIME_UTC! If you just added it to struct_info.json, you need to ./emcc --clear-cache" | undefined
    shared:ERROR: '/emscripten-sdk/node/8.9.1_64bit/bin/node /emscripten-sdk/emscripten/incoming/src/compiler.js /tmp/tmpwLPzUg.txt /emscripten-sdk/emscripten/incoming/src/library_pthread_stub.js' failed (1)
    CMakeFiles/cmTC_d5df9.dir/build.make:97: recipe for target 'cmTC_d5df9.js' failed
    make[1]: *** [cmTC_d5df9.js] Error 1
    make[1]: Leaving directory '/home/sjenkinsc/Fuentes/Urho3D/build/web/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_d5df9/fast' failed
    make: *** [cmTC_d5df9/fast] Error 2


  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:39 (project)

-- Configuring incomplete, errors occurred!
See also "/home/sjenkinsc/Fuentes/Urho3D/build/web/CMakeFiles/CMakeOutput.log".
See also "/home/sjenkinsc/Fuentes/Urho3D/build/web/CMakeFiles/CMakeError.log".

Thanks in advance.

Thing is in a flux recently as we are preparing a new image with the latest EMCC to do the CI build test against the upgrade-sdl (SDL 2.0.10 WIP) dev branch later. In order to build the current Urho3D master branch, you have to use a Web docker image with this tag “emcc1.38.4”, instead of the default “latest”. I believe the following command should do the trick.

$ DBE_TAG=:emcc1.38.4 script/ web

Thank you so much! It compiles now!.

The script can run Rake, however for some reason in a project generated by script/ web rake scaffolding dir=$(pwd)/Misc/Test01 project=Test01 the resulting project:

  • needs replacing of all symlinks by recursive copies for DBE web to run properly
  • fails to find URHO3D_HOME even if specified with: URHO3D_HOME=/home/sjenkinsc/Fuentes/Urho3D/build/web script/ web or script/ web rake cmake URHO3D_HOME=/home/sjenkinsc/Fuentes/Urho3D/build/web.

It should be possible. The CI build tests the scaffolding and building of newly scaffolded project each time and the CI uses DBE now. You don’t need to repeat the same steps as CI build of course. Just study the gist of it.

I also realize that defaulting to latest may not be ideal for unsuspecting DBE users. So, I will probably change it to default to master and create master tags at DockerHub later when I have time. Both the latest and master tags will be updated from time to time.

1 Like