subsoap / defos

Extra native OS functions for games written using the Defold game engine
Creative Commons Zero v1.0 Universal
121 stars 16 forks source link

Library stops project from building on linux #125

Closed fuzzdistor closed 3 years ago

fuzzdistor commented 3 years ago

Any project that includes DefOS, including the example provided, does not launch a window when hitting Build with no error message from inside Defold, and it's unable to bundle for any platform with the following error message:

'<<Name of the target platform>>' could not be built. Sdk version: '6bfeea3b13d7b8920483ea2cba9c181a8650b84d'
Log: '<failed reading log>'

Running Defold from the terminal shows this error message when hitting Build:

java.net.MalformedURLException: no protocol: 
        at java.base/java.net.URL.<init>(URL.java:627)
        at java.base/java.net.URL.<init>(URL.java:523)
        at java.base/java.net.URL.<init>(URL.java:470)
        at util.http_client$split_url.invokeStatic(http_client.clj:60)
        at editor.engine.native_extensions$make_cache_request.invokeStatic(native_extensions.clj:185)
        at editor.engine.native_extensions$query_cached_files.invokeStatic(native_extensions.clj:205)
        at editor.engine.native_extensions$build_engine_archive.invokeStatic(native_extensions.clj:246)
        at editor.engine.native_extensions$get_engine_archive.invokeStatic(native_extensions.clj:311)
        at editor.engine$get_engine.invokeStatic(engine.clj:197)
        at editor.app_view$async_build_BANG_$fn__45968$fn__45974.invoke(app_view.clj:769)
        at editor.app_view$async_build_BANG_$fn__45968.invoke(app_view.clj:767)
        at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

... And this message when running Bundle for any supported system:

Build Remote Engine...
ERROR: unspecified:-1: 'com.dynamo.bob.CompileExceptionError: '<<Name of the target platform>>' could not be built. Sdk version: '6bfeea3b13d7b8920483ea2cba9c181a8650b84d'
Log: '<failed reading log>''

As soon as I remove the dependency from the game.project file and launch Fetch Libraries to remove it the project is able to build again.

I am using Defold Version 1.2.188

My system info:

Operating System: Manjaro Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 Kernel Version: 5.13.19-2-MANJARO (64-bit) Graphics Platform: X11 Processors: 6 × AMD FX(tm)-6300 Six-Core Processor Memory: 7,7 GiB of RAM Graphics Processor: AMD PITCAIRN

dapetcu21 commented 3 years ago

This honestly seems like a Defold bug. Maybe you should report it at https://github.com/defold/defold/issues

Nevertheless, how did you add the dependency? What URL did you use?

subsoap commented 3 years ago

Tested bundling master for Linux on a Windows 10 host and it worked.

Please preserve a copy of the project where this breaks. The Defold team may be interested in inspecting it to see why it breaks.

britzl commented 3 years ago

Please share the URL you used, or a copy of your project.

fuzzdistor commented 3 years ago

What URL did you use?

I used https://github.com/subsoap/defos/archive/v2.6.0.zip. Note that the example provided with DefOS also does not run and it just depends on the dirty larry library.

Any newly created empty project will not build if you add DefOS as a dependency.

Libraries like rendercam work with no issues.

The library works as intended if I switch to Windows and use the Windows build of Defold.

I'll report this issue to Defold's oficial repo if you guys think it's appropriate to do so.

britzl commented 3 years ago

It seems like the editor for some reason fails to download the dependencies. Have you for some reason prevented the editor from making network requests? Can you use wget or curl to manually download the dependency in a terminal?

What if you try bob.jar instead?

java -jar bob.jar --verbose --archive --platform=x86_64-linux  resolve build bundle
fuzzdistor commented 3 years ago

Bob does build (lol) correctly every project I've tried (The example and a couple of projects with the dependency and functions set up for testing). That is something! :)

Any directions on how should I go about fixing my Defold installation? I have tried re-downloading from the official page several times while troubleshooting and also installing the current AUR package (it's not the latest version of the engine) with the same failed results. I don't seem to find where is that Defold is leaving the config files like the recently opened projects list in order to perform a true clean reinstall.

I can move this question to the discord if you guys want as it is not really a problem related to the library in the end. Thanks for your awesome work!

fuzzdistor commented 3 years ago

I have fixed the issue by removing the prefs.xml file on ~.java/.userPrefs/defold/. Unfortunately I did not save a copy of the file before removing it. Sorry about that. I'll be sure to report it back to the Defold team if the issue returns in the future. Thanks again for your hard work!

britzl commented 3 years ago

I have fixed the issue by removing the prefs.xml file on ~.java/.userPrefs/defold/. Unfortunately I did not save a copy of the file before removing it. Sorry about that. I'll be sure to report it back to the Defold team if the issue returns in the future.

Oh, that's interesting. I wonder what you had in prefs.xml that was causing a problem for you?