Godot: Can't compile godot, global_defaults.h: No such file or directory

Created on 20 Dec 2018  Â·  7Comments  Â·  Source: godotengine/godot

Godot version:
3.1 3bdd1ff

OS/device including version:
Ubuntu 18.04

Issue description:
When I trying to compile godot, then this error is shown

scons p=x11 -j7
scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
YASM is necessary for WebM SIMD optimizations.
WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported!
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[  2%] build_gles2_headers(["drivers/gles2/shaders/canvas.glsl.gen.h"], ["drivers/gles2/shaders/canvas.glsl"])
[  6%] Compiling ==> main/main.cpp
[ 53%] Compiling ==> editor/editor_about.cpp
[ 77%] Compiling ==> editor/project_manager.cpp
[ 93%] Compiling ==> core/engine.cpp
[ 93%] Compiling ==> core/global_defaults.gen.cpp
[ 93%] core/global_defaults.gen.cpp:2:10: fatal error: platform/android/globals/global_defaults.h: No such file or directory
 #include "platform/android/globals/global_defaults.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[ 93%] Compiling ==> core/project_settings.cpp
scons: *** [core/global_defaults.gen.x11.tools.64.o] Error 1
scons: building terminated because of errors.

Probably this is the cause #24500

archived

Most helpful comment

Just for reference, cleaning is done by:

git clean -x -f -q

All 7 comments

You should delete that .gen.cpp file, it's no longer needed.

Shouldn't git or scons do this automatically?

rm core/global_defaults.gen.cpp

if doesn't work:

scons -c platform=x11

Shouldn't git or scons do this automatically?

Git doesn't know about this file, as it's generated by Scons. And Scons no longer knows about it either, since we no longer generate it. So you need to clean up.

Just for reference, cleaning is done by:

git clean -x -f -q

Since I reported a duplicate of this (https://github.com/godotengine/godot/issues/25905) – maybe it's worth including the instructions in this ticket in a 'note' or 'warning' box with the build instructions in the docs?

This only happens rarely, in the master branch, when we decide to drop or rename one of the few code files that are generated by SCons. I don't feel that it's worth adding a warning box in the build instructions for each platform for this rare case.

Was this page helpful?
0 / 5 - 0 ratings