Gradle sync failed: Could not GET 'http://.../cr-destsol-4.0.0.pom' 502 Bad Gateway
jozefcifre opened this issue · 12 comments
What you were trying to do
I was trying to import the project in IntelliJ as suggested in the README.md.
What actually happened
Could not GET 'http://artifactory.terasology.org/artifactory/virtual-repo-live/org/terasology/crashreporter/cr-destsol/4.0.0/cr-destsol-4.0.0.pom'. Received status code 502 from server: Bad Gateway
How to reproduce
No response
Game version
2.1.0
Log details
Build file home user DestinationSol.txt
Operating System
Linux
Additional Info
No response
Does it work if you apply the changes from #692? Essentially, try replacing all the instances of http://artifactory.terasology.org
with https://artifactory.terasology.io
.
Recently we moved over to using a newer artifactory instance for hosting libraries. Destination Sol has been a little bit undermaintained on my part though and I hadn't merged the artifactory URL changes in yet. If you can confirm the change works for you then I'll likely just go ahead and merge #692 into develop
.
Received status code 502 from server: Bad Gateway
is because the older artifactory instance is down, most likely. It's not an infrequent occurence these days, unfortunately. The newer one seems to be much more reliable going forward.
Done, it crashes.
ERROR [main] (SolDesktop.java:179) - This exception was not caught:
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-box2d64.so' for target: Linux, 64-bit
at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:120)
at com.badlogic.gdx.physics.box2d.Box2D.init(Box2D.java:32)
at org.destinationsol.SolApplication.<init>(SolApplication.java:132)
at org.destinationsol.desktop.SolDesktop.main(SolDesktop.java:135)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError: /tmp/libgdxjvucq/2571c5e8/libgdx-box2d64.so: libstdc++.so.6: cannot open shared object file: No such file or directory
at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:316)
at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:116)
... 3 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdxjvucq/2571c5e8/libgdx-box2d64.so: libstdc++.so.6: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:322)
at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:291)
... 4 more
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdxjvucq/2571c5e8/libgdx-box2d64.so: libstdc++.so.6: cannot open shared object file: No such file or directory
That does not seem like a normal error at all. libstdc++.so.6
is a fairly key system library. Could you provide a bit more information about your set-up to help narrow things down?
- Ubuntu Version (e.g. Ubuntu 20.04)
- System Architecture (e.g. x86, x86_64, armhf, arm64/aarch64 etc.)
If you don't know it, you should be able to to obtain the Ubuntu version using the lsb_release -a
command. The system architecture can be found using uname -m
.
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdxjvucq/2571c5e8/libgdx-box2d64.so: libstdc++.so.6: cannot open shared object file: No such file or directory
That does not seem like a normal error at all.
libstdc++.so.6
is a fairly key system library. Could you provide a bit more information about your set-up to help narrow things down?* Ubuntu Version (e.g. Ubuntu 20.04) * System Architecture (e.g. x86, x86_64, armhf, arm64/aarch64 etc.)
If you don't know it, you should be able to to obtain the Ubuntu version using the
lsb_release -a
command. The system architecture can be found usinguname -m
.
- NixOS 23.05
- x86_64
I may need to install libstdcxx5
.
I may need to install
libstdcxx5
.
It didn't work.
NixOS appears to use a very different way of working that I'm not familiar with. I assumed Ubuntu from window theme in the screenshot but I now know that I was incorrect (I am aware that there are many, many linux distributions out there). I may not be able to be much help with NixOS due to quite how differently it operates. About all I could find with a cursory search is https://nixos.wiki/wiki/Packaging/Quirks_and_Caveats#ImportError:_libstdc.2B.2B.so.6:_cannot_open_shared_object_file:_No_such_file.
The issue here is one with libGDX, which is the underlying framework the game uses. At a guess, it might have something to do with libstdc++.so.6
being located in a non-standard location, which a change to LD_LIBRARY_PATH
would compensate for.
I couldn't figure it out, but I am not giving up, so I think, maybe another distro will meet the required dependencies in their standard location. What distro works out-of-the-box to build DS?
It should work in any distro that supports a JDK. NixOS is just a very untypical distribution. I played around with a NixOS live CD just now and I think I got it working. Your initial problem was immediately reproducable there.
@jozefcifre
To get it working, I did the following:
- Create a new file in the called
shell.nix
with the following contents:
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.05";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShell {
packages = with pkgs; [
git
temurin-bin-11
libglvnd
];
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.libglvnd}/lib";
}
- Run
nix-shell
to enter the development shell defined byshell.nix
. - Build and run the game with
./gradlew run
In terms of what linux distribution I test the game with myself, it's usually tested on Ubuntu because that's what I have around. Anything debian-derived is likely to work the same. I'd like to support as many distributions as I can but I can't guarentee that it will run on all of them seamlessly. There's just too many of them out there.
You are right, there are too many distros to support.
let nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.05"; pkgs = import nixpkgs { config = {}; overlays = []; }; in pkgs.mkShell { packages = with pkgs; [ git temurin-bin-11 libglvnd ]; LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.libglvnd}/lib"; }
Ty, it worked.