flathub / org.xonotic.Xonotic

https://flathub.org/apps/details/org.xonotic.Xonotic
6 stars 5 forks source link

crypto libraries not included and not getting a Client ID or Player Information page #4

Closed ReadWriteError closed 1 year ago

ReadWriteError commented 3 years ago

I was having the exact same issue as the one described here https://forums.xonotic.org/showthread.php?tid=7727 where even though I enabled statistics I still wasn't getting a client ID and Player Information page at https://stats.xonotic.org/players. This issue also prevented me from playing on servers that required a client ID.

I discovered that the flatpak doesn't generate .xonotic/key_0.d0si or .xonotic/key_0-public-fp.txt. The "crypto_keys" command is also not available from the in game console. None of these issues exist when using the official zip from https://www.xonotic.org/.

AsciiWolf commented 3 years ago

Thanks for reporting this issue! To be honest, I am not sure how to fix this. I see that a crypto lib dir is defined in the Makefile, however I am not sure whether there is any external dependency required for the crypto to work properly.

By the way, I am using the official zip to build this Flatpak, just not using the prebuilt binaries.

jjardon commented 2 years ago

@AsciiWolf suggestion from @valentindavid about this:

It seems that rule all-zip-source in the main Makefile builds d0_blind_id in static. That means that it should not be loaded with dlopen. But the the Makefile in source/darkplaces with default to using dlopen. And of course it will fail. So in the calls to make for source/darkplaces, I would try to add "DP_LINK_CRYPT=shared DP_LINK_CRYPT_RIJNDAEL=shared" Or the alternative would be to change the configure line for for d0_blind_id to --disable-static --enable-shared, and then install the .so.1 library in /app/lib. Tell me if that works. You can see in source/darkplaces/crypto.c in Crypto_Init how it initialize crypto, and see that it will try to load the library, unless it was linked in. Also do not get confused by "DP_LINK_CRYPT=shared". "shared" here actually means to link to it at link time rather than loading with dlopen. So it can stay static. But the value the makefile expects is "shared".