Skip to content

Build fails with precision=double #1955

@van800

Description

@van800

Godot version

4.5

godot-cpp version

4.5

System information

all OS

Issue description

in the godot-cpp branch 4.5
gdextension/extension_api.json
contains
"precision": "single"
which prevents compiling gdextension with precision=double

I am getting:
Cannot do a precision=double build using 'godot-cpp/gdextension/extension_api.json' which was generated by Godot built with precision=single
in https://github.com/JetBrains/godot-support/actions/runs/23481943723/job/68327711213

Full error message

Run scons target=editor platform=macos arch=universal precision=double
scons: Reading SConscript files ...
Auto-detected 3 CPU cores available for build parallelism. Using 3 cores by default. You can override it with the -j argument.
Building for architecture universal on platform macos
scons: done reading SConscript files.
scons: Building targets ...
Generating godot-cpp/gen/include/godot_cpp/core/ext_wrappers.gen.inc ...
Compiling godot-cpp/src/core/memory.cpp ...
scons: *** [godot-cpp/gen/include/godot_cpp/core/ext_wrappers.gen.inc] Exception : Cannot do a precision=double build using 'godot-cpp/gdextension/extension_api.json' which was generated by Godot built with precision=single
Compiling shared src/rider_path_locator_common.cpp ...
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/SCons/Action.py", line 1318, in execute
    result = self.execfunction(target=target, source=rsources, env=env)
  File "/Users/runner/work/godot-support/godot-support/godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/tools/godotcpp.py", line 162, in scons_generate_bindings
    _generate_bindings(
    ~~~~~~~~~~~~~~~~~~^
        api,
        ^^^^
    ...<4 lines>...
        env["godot_cpp_gen_dir"],
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/runner/work/godot-support/godot-support/godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/binding_generator.py", line 289, in _generate_bindings
    raise Exception(
        f"Cannot do a precision={precision} build using '{api_filepath}' which was generated by Godot built with precision={api['header']['precision']}"
    )
Exception: Cannot do a precision=double build using 'godot-cpp/gdextension/extension_api.json' which was generated by Godot built with precision=single
scons: building terminated because of errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions