godot: 3.0.3.stable Linux server version parses command line arguments incorrectly (regression)
Godot version:
3.0.3.stable Linux server
OS/device including version:
Alpine Linux v3.7 Intel® Core™ i7-6820HQ CPU @ 2.70GHz No GPU (it’s a Docker image for CI/CD)
Issue description:
Running godot --export "Linux/X11" game_name should produce game_name and game_name.pck, instead the build fails with the following output:
ERROR: initialize: AudioDriverManager: all drivers failed, falling back to dummy driver
At: servers/audio_server.cpp:165.
ERROR: _load: Method/Function Failed, returning: RES()
At: core/io/resource_loader.cpp:186.
ERROR: start: Condition ' !scene ' is true. returned: false
At: main/main.cpp:1689.
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:1989.
Running with the verbose flag -v provides additional details:
CORE API HASH: 0
EDITOR API HASH: 0
load resource: res://Linux/X11
ERROR: _load: Method/Function Failed, returning: RES()
At: core/io/resource_loader.cpp:186.
Looks like it’s interpreting the preset as a resource to load. Changing that to godot -v --export="Linux/X11" game_name (note the equals sign =) seems to get me past that, but now it fails on the export name:
load resource: res://game_name
ERROR: _load: Method/Function Failed, returning: RES()
Separating the export name with double dashes (--, with spaces on both sides) makes no difference.
3.0.2.stable Linux server works without a hitch (except for the complaining about missing audio drivers, which doesn’t appear to be a problem).
Steps to reproduce:
See above.
Minimal reproduction project:
Could be anything, but I’m attaching a very simple project I’ve tested on.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 34 (13 by maintainers)
So
tools=yeswould actually be wrong for ‘server’ which is why I didn’t immediately do that. For 3.0.6 the following will happen:Sorry it took a little bit to gain some consensus.
Ah ok, the issue is that @hpvb is building the server binary as
tools=nowhen it should betools=yes(the default).You should be able to run an exported project in headless mode by placing the exported PCK file in the same directory as the headless server binary. You can also specify its path using
--main-pack.As projects may have their own command-line arguments, this cannot be done unless we force project-specific arguments to be passed after
--(which is a common pattern in some applications). This could be done, but it would break compatibility, so it would have to wait for 3.1 or a later release.You can pass
--helpto any editor or export template binary 🙂This problem is still present in the latest 3.0.5 binary available at https://downloads.tuxfamily.org/godotengine/3.0.5/Godot_v3.0.5-stable_linux_server.64.zip. @hpvb could you fix the build config that is used for creating the release binaries? It should have
tools=yes(the default value) as @akien-mga noted.Those options only matters for the export template. The server binary is for your own use and won’t affect the exported binaries at all, so as long as it works for you, you can export any game just fine.
You can just compile your own server binary and keep using the official export templates for 3.0.4-stable. To build the server binary, checkout the
3.0.4-stabletag and usescons p=server(“debug” by default) orscons p=server target=release_debug(optimized).I can’t reproduce the issue in the master branch, so it’s a regression only in 3.0.3+. I confirm that
godot --export "Linux/X11" game_nameworks fine in 3.0.2 but no longer works in 3.0.3:It looks similar, but I don’t think it’s the same, since there’s no existing target file in my case, and 3.0.2 has worked predictably for me for several months.
Specifying a filename or wildcard for output both work for me in 3.0.2, eg
linux.ziporlinux/*, but I haven’t tested with an existing file or just the name of a directory.