Invalid file (bad magic number): Exec format error

Hi all,

just got myself the first script running for my prototype and after fixing the big batch of typos i made, i got the bellow error which is i believe more than a typo.

#!/bin/bash -eo pipefail
mkdir -p win64
./godot --export win64 project.godot "win64/test.exe"

invalid file (bad magic number): Exec format error

Exited with code exit status 1
CircleCI received exit code 1

And i hope you have some ideas on what may have be the culprit.

Bellow, the entire YML for your convenience.

version: 2
            enabled: true
            - checkout
            - run:
                name: Install dependencies
                command: |
                    sudo apt-get update
                    sudo apt-get -y install wget zip unzip
            - run:
                name: Download Godot 3.4.4
                command: |
                    wget -q
                    mv godot
                    chmod +x godot
            - run:
                name: Download Godot 3.4.4 Export Templates
                command: |
                    wget -q
                    mkdir -p ~/.local/share/godot/templates
                    unzip Godot_v3.4.4-stable_export_templates.tpz -d ~/.local/share/godot/templates
                    mv ~/.local/share/godot/templates/templates ~/.local/share/godot/templates/3.4.stable
            - run:
                name: Export win64 build
                command: |
                    mkdir -p win64
                    ./godot --export win64 project.godot "win64/test.exe"

Thank you all


The error is coming from the godot command In the “Export wind64 build” step and all circleci is doing reporting the resulting exit code.

The best place to start will be ‘win64’ part of the command as this should be a valid export preset file, but that is something you will have to check.

  • another idea

Define which machine type you want to work on. Just using ‘machine’ will result in a default image being used and is very dated (Ubuntu 14.04) - it may even be a 32-bit image and so as you are trying to deploy a 64-bit version of godot the error may be from the OS trying to run godot, rather than from an issue that godot finds with its config.

The default is due to be withdrawn at the end of the month anyway - more details here

Hi rit1010,

thank you for your shared insights, i’ll try the solutions asap,

Good day to you,

Best regard