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

Minimal Godot build fails to compile due navigation module problems #80401

Closed
qarmin opened this issue Aug 8, 2023 · 1 comment · Fixed by #80408
Closed

Minimal Godot build fails to compile due navigation module problems #80401

qarmin opened this issue Aug 8, 2023 · 1 comment · Fixed by #80408

Comments

@qarmin
Copy link
Contributor

qarmin commented Aug 8, 2023

Godot version

4.2.dev f2acfb1

System information

Ubuntu 22.04 CI

Issue description

https://github.com/qarmin/GodotBuilds/actions/runs/5790813978/job/15694543373#step:7:679

Command

scons dev_build=yes CCFLAGS="-fpie" LINKFLAGS="-no-pie" module_basis_universal_enabled=no module_bmp_enabled=no module_camera_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_denoise_enabled=no module_enet_enabled=no module_etcpak_enabled=no module_glslang_enabled=no module_gltf_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_jsonrpc_enabled=no module_lightmapper_rd_enabled=no module_mbedtls_enabled=no module_meshoptimizer_enabled=no module_minimp3_enabled=no module_mobile_vr_enabled=no module_multiplayer_enabled=no module_noise_enabled=no module_ogg_enabled=no module_openxr_enabled=no module_raycast_enabled=no module_regex_enabled=no module_squish_enabled=no module_tga_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_vhacd_enabled=no module_vorbis_enabled=no module_webp_enabled=no module_webrtc_enabled=no module_websocket_enabled=no module_webxr_enabled=no module_xatlas_unwrap_enabled=no target=editor -j2

produce such errors

In file included from modules/navigation/nav_mesh_generator_3d.cpp:33:
modules/navigation/nav_mesh_generator_3d.h:40:7: note: forward declaration of 'class NavigationMesh'
   40 | class NavigationMesh;
      |       ^~~~~~~~~~~~~~
modules/navigation/nav_mesh_generator_3d.cpp:704:42: error: invalid use of incomplete type 'class NavigationMesh'
  704 |                         p_navigation_mesh->add_polygon(nav_indices);
      |                                          ^~
In file included from modules/navigation/nav_mesh_generator_3d.cpp:33:
modules/navigation/nav_mesh_generator_3d.h:40:7: note: forward declaration of 'class NavigationMesh'
   40 | class NavigationMesh;
      |       ^~~~~~~~~~~~~~
In file included from ./core/io/resource_uid.h:34,
                 from ./core/io/resource.h:34,
                 from ./core/input/input_event.h:35,
                 from ./core/os/main_loop.h:34,
                 from ./scene/main/scene_tree.h:34,
                 from ./scene/main/node.h:37,
                 from ./scene/3d/node_3d.h:34,
                 from ./scene/3d/visual_instance_3d.h:34,
                 from ./scene/3d/mesh_instance_3d.h:35,
                 from modules/navigation/nav_mesh_generator_3d.cpp:37:
./core/object/ref_counted.h: In instantiation of 'void Ref<T>::ref(const Ref<T>&) [with T = NavigationMesh]':
./core/object/ref_counted.h:166:3:   required from 'Ref<T>::Ref(const Ref<T>&) [with T = NavigationMesh]'
modules/navigation/nav_mesh_generator_3d.cpp:118:42:   required from here
./core/object/ref_counted.h:69:36: error: invalid use of incomplete type 'class NavigationMesh'
   69 |                         reference->reference();
      |                         ~~~~~~~~~~~^~~~~~~~~
In file included from modules/navigation/nav_mesh_generator_3d.cpp:33:
modules/navigation/nav_mesh_generator_3d.h:40:7: note: forward declaration of 'class NavigationMesh'
   40 | class NavigationMesh;
      |       ^~~~~~~~~~~~~~
In file included from ./core/io/resource_uid.h:34,
                 from ./core/io/resource.h:34,
                 from ./core/input/input_event.h:35,
                 from ./core/os/main_loop.h:34,
                 from ./scene/main/scene_tree.h:34,
                 from ./scene/main/node.h:37,
                 from ./scene/3d/node_3d.h:34,
                 from ./scene/3d/visual_instance_3d.h:34,
                 from ./scene/3d/mesh_instance_3d.h:35,
                 from modules/navigation/nav_mesh_generator_3d.cpp:37:
./core/object/ref_counted.h: In instantiation of 'void Ref<T>::unref() [with T = NavigationMesh]':
./core/object/ref_counted.h:222:3:   required from 'Ref<T>::~Ref() [with T = NavigationMesh]'
modules/navigation/nav_mesh_generator_3d.cpp:118:42:   required from here
./core/object/ref_counted.h:209:45: error: invalid use of incomplete type 'class NavigationMesh'
  209 |                 if (reference && reference->unreference()) {
      |                                  ~~~~~~~~~~~^~~~~~~~~~~
In file included from modules/navigation/nav_mesh_generator_3d.cpp:33:
modules/navigation/nav_mesh_generator_3d.h:40:7: note: forward declaration of 'class NavigationMesh'
   40 | class NavigationMesh;
      |       ^~~~~~~~~~~~~~
scons: *** [modules/navigation/nav_mesh_generator_3d.linuxbsd.editor.dev.x86_64.o] Error 1
scons: building terminated because of errors.

this is 1 day old regression, probably caused by 7eb047a

@AThousandShips
Copy link
Member

AThousandShips commented Aug 8, 2023

Caused by the fact that nav_mesh_generator_3d only has access to this class via gridmap, should include it directly instead

It's a long and convoluted include chain tbh, we need to get better at not relying on them

Making a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants