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

Differences between the release and debug builds #68

Open
RafaDdS opened this issue Apr 18, 2024 · 1 comment
Open

Differences between the release and debug builds #68

RafaDdS opened this issue Apr 18, 2024 · 1 comment

Comments

@RafaDdS
Copy link

RafaDdS commented Apr 18, 2024

Hey, great project! But I have had problems running it.

Using:
Ubuntu 22.04
Godot 4.1 and 4.2

Info after the first part of the build:

Using CMake 3.29.0
-- Building GDExtensionTemplate for x86_64 on Linux
-- [GDExtensionTemplate] Treating warnings as errors
-- Using git: /usr/bin/git (git version 2.25.1)
-- GDExtensionTemplate version: 30d51b4
-- Install directory: /path on my computer/GDExtensionTemplate-install/GDExtensionTemplate/
-- Using ccache: /usr/bin/ccache (ccache version 3.7.7)
-- Configuring done (0.5s)
-- Generating done (0.2s)
-- Build files have been written to: /path on my computer/GDExtensionTemplate-build

After coping the template and following the setup and build steps I tried to open the template extension on Godot 4.1, since it's the master of the godot-cpp submodule and it fails to load.

I also tried to specify the 4.2 module on the .gitmodule and run it on Godot 4.2. In this case I ran an update on the submodule with (git submodule update --remote) It builds without any error, but when I install it in the bin folder of a new empty godot project I get the following error:

core/extension/gdextension.cpp:911 - No GDExtension library found for current OS and architecture (linux.x86_64) in configuration file: res://bin/GDExtensionTemplate/GDExtensionTemplate.gdextension
Failed loading resource: res://bin/GDExtensionTemplate/GDExtensionTemplate.gdextension. Make sure resources have been imported by opening the project in the editor at least once.

The .so file is in the right place according to the .gdextension. It also specify paths for windows and mac builds that are not being generated for the time.

I did make some small changes since the compiler is treating warnings as errors, mostly just removed semicolons the compiler judged not necessary.

Anyone has similar problems? I have been looking for a solution for the last two weeks.

@RafaDdS RafaDdS changed the title Template not working out of the box on Linux Differences between the release and debug builds Apr 19, 2024
@RafaDdS
Copy link
Author

RafaDdS commented Apr 19, 2024

Found the problem, the default build will only push the release path for the library. It would be nice if the process to build for debug was better documented.

If anyone has the same problem go to the .GDExtension in the templates.release duplicate the path lines and substitute the .release for .debug

There is probably a better solution to keep release and debug builds separated. If anyone could help pointing it out for anyone in the future it would be nice.

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

No branches or pull requests

1 participant