Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling without GDScript fails #31011

Closed
Teashrock opened this issue Aug 1, 2019 · 5 comments · Fixed by #35963
Closed

Compiling without GDScript fails #31011

Teashrock opened this issue Aug 1, 2019 · 5 comments · Fixed by #35963

Comments

@Teashrock
Copy link
Contributor

Teashrock commented Aug 1, 2019

Godot version:
a967ece

OS/device including version:
Linux Mint 19.1, Windows 10, (both x64)

Issue description:
Problem: in attempt of compiling without gdscript, got this:

main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `TestGDScript::_parser_expr(GDScriptParser::Node const*)':
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:140: undefined reference to `GDScriptFunctions::get_func_name(GDScriptFunctions::Function)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:294: undefined reference to `GDScriptParser::DataType::to_string() const'
main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `TestGDScript::_disassemble_addr(Ref<GDScript> const&, GDScriptFunction const&, int)':
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:503: undefined reference to `GDScript::debug_get_member_by_index(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:507: undefined reference to `GDScriptFunction::get_global_name(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:511: undefined reference to `GDScriptFunction::get_constant(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:529: undefined reference to `GDScriptFunction::get_global_name(int) const'
main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `TestGDScript::_disassemble_class(Ref<GDScript> const&, Vector<String> const&)':
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:541: undefined reference to `GDScript::debug_get_member_functions() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:546: undefined reference to `GDScriptFunction::get_code() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:547: undefined reference to `GDScriptFunction::get_code_size() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:549: undefined reference to `GDScriptFunction::get_default_argument_count() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:551: undefined reference to `GDScriptFunction::get_default_argument_count() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:555: undefined reference to `GDScriptFunction::get_default_argument_addr(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:559: undefined reference to `GDScriptFunction::get_max_stack_size() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:559: undefined reference to `GDScriptFunction::get_name() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:613: undefined reference to `GDScriptFunction::get_global_name(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:626: undefined reference to `GDScriptFunction::get_global_name(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:635: undefined reference to `GDScriptFunction::get_global_name(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:647: undefined reference to `GDScriptFunction::get_global_name(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:764: undefined reference to `GDScriptFunction::get_global_name(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:784: undefined reference to `GDScriptFunctions::get_func_name(GDScriptFunctions::Function)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:804: undefined reference to `GDScriptFunction::get_global_name(int) const'
main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `TestGDScript::test(TestGDScript::TestType)':
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:969: undefined reference to `GDScriptTokenizerText::set_code(String const&)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:971: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:974: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:975: undefined reference to `GDScriptTokenizerText::get_token_identifier(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:976: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:977: undefined reference to `GDScriptTokenizerText::get_token_constant(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:984: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:985: undefined reference to `GDScriptTokenizerText::get_token_error(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:986: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:987: undefined reference to `GDScriptTokenizerText::get_token_line_indent(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:987: undefined reference to `GDScriptTokenizerText::get_token_line(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:988: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:989: undefined reference to `GDScriptTokenizerText::get_token_built_in_func(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:989: undefined reference to `GDScriptFunctions::get_func_name(GDScriptFunctions::Function)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:991: undefined reference to `GDScriptTokenizerText::get_token(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:991: undefined reference to `GDScriptTokenizer::get_token_name(GDScriptTokenizer::Token)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:993: undefined reference to `GDScriptTokenizerText::get_token_line(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:995: undefined reference to `GDScriptTokenizerText::get_token_line(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1004: undefined reference to `GDScriptTokenizerText::get_token_column(int) const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1005: undefined reference to `GDScriptTokenizerText::advance(int)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1011: undefined reference to `GDScriptParser::GDScriptParser()'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1012: undefined reference to `GDScriptParser::parse(String const&, String const&, bool, String const&, bool, Set<int, Comparator<int>, DefaultAllocator>*, bool)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1014: undefined reference to `GDScriptParser::get_error() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1014: undefined reference to `GDScriptParser::get_error_column() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1014: undefined reference to `GDScriptParser::get_error_line() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1019: undefined reference to `GDScriptParser::get_parse_tree() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1023: undefined reference to `GDScriptParser::~GDScriptParser()'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1028: undefined reference to `GDScriptParser::GDScriptParser()'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1030: undefined reference to `GDScriptParser::parse(String const&, String const&, bool, String const&, bool, Set<int, Comparator<int>, DefaultAllocator>*, bool)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1032: undefined reference to `GDScriptParser::get_error() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1032: undefined reference to `GDScriptParser::get_error_column() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1032: undefined reference to `GDScriptParser::get_error_line() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1040: undefined reference to `GDScriptCompiler::GDScriptCompiler()'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1041: undefined reference to `GDScriptCompiler::compile(GDScriptParser const*, GDScript*, bool)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1044: undefined reference to `GDScriptCompiler::get_error() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1044: undefined reference to `GDScriptCompiler::get_error_column() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1044: undefined reference to `GDScriptCompiler::get_error_line() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1055: undefined reference to `GDScript::get_base() const'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1037: undefined reference to `GDScriptParser::~GDScriptParser()'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1060: undefined reference to `GDScriptTokenizerBuffer::parse_code_string(String const&)'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1011: undefined reference to `GDScriptParser::~GDScriptParser()'
/home/teashrock/Dev/C/godot/main/tests/test_gdscript.cpp:1028: undefined reference to `GDScriptParser::~GDScriptParser()'
main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `GDScriptTokenizerText::GDScriptTokenizerText()':
/home/teashrock/Dev/C/godot/./modules/gdscript/gdscript_tokenizer.h:182: undefined reference to `vtable for GDScriptTokenizerText'
main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `Ref<GDScript>::instance()':
/home/teashrock/Dev/C/godot/./core/reference.h:288: undefined reference to `GDScript::GDScript()'
main/tests/libtests.x11.tools.64.a(test_gdscript.x11.tools.64.o): In function `GDScriptTokenizerText::~GDScriptTokenizerText()':
/home/teashrock/Dev/C/godot/./modules/gdscript/gdscript_tokenizer.h:182: undefined reference to `vtable for GDScriptTokenizerText'
editor/libeditor.x11.tools.64.a(plugin_config_dialog.x11.tools.64.o): In function `PluginConfigDialog::_on_confirmed()':
/home/teashrock/Dev/C/godot/editor/plugin_config_dialog.cpp:78: undefined reference to `GDScript::GDScript()'
editor/libeditor.x11.tools.64.a(plugin_config_dialog.x11.tools.64.o): In function `GDScriptLanguage::get_singleton()':
/home/teashrock/Dev/C/godot/./modules/gdscript/gdscript.h:435: undefined reference to `GDScriptLanguage::singleton'
collect2: error: ld returned 1 exit status
scons: *** [bin/godot.x11.tools.64] Error 1
scons: building terminated because of errors.

Expected: Successful compilation, of course!

Steps to reproduce:

  1. Compile with scons -j<cores> platform=<whatever> tools=<yes/no> module_gdscript_enabled=no
  2. Get a linking error.
@Teashrock
Copy link
Contributor Author

With tools=no it's stiil the same.

@Zylann
Copy link
Contributor

Zylann commented Aug 1, 2019

Shouldn't tests be part of their module?

@Teashrock
Copy link
Contributor Author

@Zylann
What tests? What are you talking about?

@Calinou
Copy link
Member

Calinou commented Aug 1, 2019

@Teashrock main/tests/test_gdscript.cpp is a file that's used to test GDScript functionality. It should probably be moved to the module, so that it isn't compiled when the GDScript module is disabled.

@Teashrock
Copy link
Contributor Author

@Calinou
I'll try this.

@akien-mga akien-mga added this to the 4.0 milestone Feb 6, 2020
akien-mga added a commit to akien-mga/godot that referenced this issue Feb 7, 2020
- Fix build with gdscript module disabled. Fixes godotengine#31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.
akien-mga added a commit to akien-mga/godot that referenced this issue Jul 14, 2021
- Fix build with gdscript module disabled. Fixes godotengine#31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.

(cherry picked from commit f3726ee)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants