freeoriond installed with snap

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
User avatar
human2
Pupating Mass
Posts: 97
Joined: Tue Mar 10, 2020 3:22 am
Location: USA, Utah, Salt Lake City

freeoriond installed with snap

#1 Post by human2 »

I installed freeorion using `snap install freeorion`. It installed 0.4.9 2020-02-02.db53471 CMake. When I run freeoriond I get this error.

/snap/freeorion/67/bin/freeoriond: error while loading shared libraries: libfreeorioncommon.so: cannot open shared object file: No such file or directory

I know why this error is happening, but I am relatively new to Linux and I have no idea how to fix it on this platform. Can anyone help? If I install it with apt, it is an older version, 0.4.7.1. I don't really want to build it from source.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: freeoriond installed with snap

#2 Post by adrian_broher »

The snap package is not maintained by the FreeOrion team.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: freeoriond installed with snap

#3 Post by Oberlus »

Maybe Ophiuchus can help, he set up the snap IIRC.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#4 Post by Ophiuchus »

human2 wrote: Tue Mar 10, 2020 4:06 am I installed freeorion using `snap install freeorion`. It installed 0.4.9 2020-02-02.db53471 CMake. When I run freeoriond I get this error.

/snap/freeorion/67/bin/freeoriond: error while loading shared libraries: libfreeorioncommon.so: cannot open shared object file: No such file or directory

I know why this error is happening, but I am relatively new to Linux and I have no idea how to fix it on this platform. Can anyone help? If I install it with apt, it is an older version, 0.4.7.1. I don't really want to build it from source.
Heja, that should simply work, you got the stable 0.4.9 version (rev 67). Too bad it doesnt :(

I provide the snaps exactly because the distributions (especially long-term) are usually quite outdated.

So lets try to solve this:

Which linux distribution are you on (name and version)? Is it a very old computer (32-bit processor architecture i386) or a "normal" one (64-bit, amd64)?

What is the output of the following if you put it in a terminal/console and hit enter/return?

Code: Select all

find /snap/freeorion/*/lib/ -iname "libfreeorioncommon.so"
it should look similar to this (on fedora, and your revision 67 instead of my 72/73):

Code: Select all

/snap/freeorion/72/lib/freeorion/libfreeorioncommon.so
/snap/freeorion/73/lib/freeorion/libfreeorioncommon.so
/snap/freeorion/current/lib/freeorion/libfreeorioncommon.so
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#5 Post by Ophiuchus »

adrian_broher wrote: Tue Mar 10, 2020 8:23 am The snap package is not maintained by the FreeOrion team.
Yes, I am not officially "team" :shock: :roll:
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: freeoriond installed with snap

#6 Post by adrian_broher »

Ophiuchus wrote: Tue Mar 10, 2020 10:30 am Yes, I am not officially "team" :shock: :roll:
The snap packages are not official distributions created by Vezzra. The snap package account is not maintained by the FreeOrion team, but arrr3 and you are not a member of the deleopers team on GitHub.

-> Of course the snaps are not maintained by the FreeOrion team.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#7 Post by Ophiuchus »

adrian_broher wrote: Tue Mar 10, 2020 11:25 am The snap packages are not official distributions created by Vezzra. The snap package account is not maintained by the FreeOrion team, but arrr3 and you are not a member of the deleopers team on GitHub.
Yes, I and agrrr3 (which is me) are just contributors :shock: :roll: .

In what kind of way was that information helpful to the OP (or anybody else)?

And now something very different, but very true and it seems you have missed it:

the freeorion snap channel is the "official" freeorion snap as i gave the team lead full access (cant remember if the freeorion account has access; vezzra and geoff at least have). The official channel only contains binaries from the freeorion/freeorion github project (rarely also from PRs, but only on temporary branch channels).

There is also a currently unused freeorion-agrrr3 snap which i used for unofficial builds/remixes from the agrrr3/freeorion github project (e.g. mixing in scripted Government).

Should i add that info somewhere?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: freeoriond installed with snap

#8 Post by Vezzra »

When Ophiuchus asked if we could provide FO snap releases, I told him that I don't have the capacities (neither time nor know-how) to do this myself. But if he wanted to take care of everything involved with that he should feel free to do so. If you want, you can see that as an official assignment, so to speak. Ophiuchus maintains the FO snap on behalf of the FO leads.

Of course, should he drop out at some point, there is (to my knowledge) no one who has the time and know-how to take over that task, so it solely depends on him (unless we find someone who could take over). Which means, when it comes to issues/questions/whatever concerning the FO snap, Ophiuchus is the one who has to handle it, all respective inquiries must be directed to him.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#9 Post by Ophiuchus »

Ophiuchus wrote: Tue Mar 10, 2020 10:29 am
human2 wrote: Tue Mar 10, 2020 4:06 am...
So lets try to solve this:

Which linux distribution are you on (name and version)? Is it a very old computer (32-bit processor architecture i386) or a "normal" one (64-bit, amd64)?

What is the output of the following if you put it in a terminal/console and hit enter/return?

Code: Select all

find /snap/freeorion/*/lib/ -iname "libfreeorioncommon.so"
it should look similar to this (on fedora, and your revision 67 instead of my 72/73):

Code: Select all

/snap/freeorion/72/lib/freeorion/libfreeorioncommon.so
/snap/freeorion/73/lib/freeorion/libfreeorioncommon.so
/snap/freeorion/current/lib/freeorion/libfreeorioncommon.so
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
human2
Pupating Mass
Posts: 97
Joined: Tue Mar 10, 2020 3:22 am
Location: USA, Utah, Salt Lake City

Re: freeoriond installed with snap

#10 Post by human2 »

Ophiuchus wrote: Tue Mar 10, 2020 10:29 am I provide the snaps exactly because the distributions (especially long-term) are usually quite outdated.

So lets try to solve this:

Which linux distribution are you on (name and version)? Is it a very old computer (32-bit processor architecture i386) or a "normal" one (64-bit, amd64)?

What is the output of the following if you put it in a terminal/console and hit enter/return?

Code: Select all

find /snap/freeorion/*/lib/ -iname "libfreeorioncommon.so"
it should look similar to this (on fedora, and your revision 67 instead of my 72/73):

Code: Select all

/snap/freeorion/72/lib/freeorion/libfreeorioncommon.so
/snap/freeorion/73/lib/freeorion/libfreeorioncommon.so
/snap/freeorion/current/lib/freeorion/libfreeorioncommon.so
Thank you for providing the snap version. I really don't want to compile from source, and it's nice to have an up-to-date version.

It's Ubuntu 18.04.4, running on 10-year-old 64-bit Xeon, Mac Pro.

I finally found the right web search and I was able to do this and it works. I don't know if this is the correct way to solve this problem on Linux.

Code: Select all

$ sudo echo /snap/freeorion/current/lib/freeorion/ > /etc/ld.so.conf.d/freeorion.conf
$ sudo ldconfig
$ /snap/freeorion/current/bin/freeoriond
On https://www.freeorion.org/index.php/Multiplayer it says to 'un-check "Binary Serialization"' when using Linux and Mac but I don't see that option. Is that still required or is it renamed or something?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#11 Post by Ophiuchus »

human2 wrote: Tue Mar 10, 2020 7:03 pm Thank you for providing the snap version. I really don't want to compile from source, and it's nice to have an up-to-date version.

It's Ubuntu 18.04.4, running on 10-year-old 64-bit Xeon, Mac Pro.

I finally found the right web search and I was able to do this and it works. I don't know if this is the correct way to solve this problem on Linux.

Code: Select all

$ sudo echo /snap/freeorion/current/lib/freeorion/ > /etc/ld.so.conf.d/freeorion.conf
$ sudo ldconfig
$ /snap/freeorion/current/bin/freeoriond
Great you found a workaround :)

So the libraries were there but not correctly linked. No idea how that happened. I had this running on amd64 ubuntu 18.04 . Next time somebody runs into the problem we try a reinstall. I guess you exposed your system to the freeorion libraries.
human2 wrote: Tue Mar 10, 2020 7:03 pm On https://www.freeorion.org/index.php/Multiplayer it says to 'un-check "Binary Serialization"' when using Linux and Mac but I don't see that option. Is that still required or is it renamed or something?
No, it is unchecked by default. In the options it is on the rightmost tab.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: freeoriond installed with snap

#12 Post by LienRag »

I too installed freeorion from snap (my installation is already a mess, it probably won't degrade it more) and I had no problem playing freeorion after that (well, except for RAM usage as explained here but that's probably not related to snap) so I tried to type freeoriond in a terminal to test both OP's problem and generally to see what would happen (I vaguely know there's a way to launch a freeorion server rather than lauching a combined server+client as with the freeorion command and inferred that freeoriond had something to do with that) and got only an error message (command not found).

Not that I really mind, but is that normal ?

Also, when I decided to try the last beta version with

Code: Select all

sudo snap install freeorion --channel=latest/beta
I had to first remove the stable version (before that it told me that I could not install since freeorion already existed). Is that intended too ?

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#13 Post by Ophiuchus »

LienRag wrote: Wed May 13, 2020 6:13 am I vaguely know there's a way to launch a freeorion server rather than lauching a combined server+client as with the freeorion command and inferred that freeoriond had something to do with that) and got only an error message (command not found).

Not that I really mind, but is that normal ?
AFAICR you have to start freeorion with certain parameters if you want the server to run headless, not freeoriond. And freeoriond is not added to the path via snap i think - that explains the command not found. You could also simply start a multiplayer game for the server and connect from somewhere else.
LienRag wrote: Wed May 13, 2020 6:13 am Also, when I decided to try the last beta version with

Code: Select all

sudo snap install freeorion --channel=latest/beta
I had to first remove the stable version (before that it told me that I could not install since freeorion already existed). Is that intended too ?
You can also install multiple versions of a snap in parallel, but it is an experimental feature. The main use case is that you can change channels by using snap refresh command.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
human2
Pupating Mass
Posts: 97
Joined: Tue Mar 10, 2020 3:22 am
Location: USA, Utah, Salt Lake City

Re: freeoriond installed with snap

#14 Post by human2 »

Sorry to resurrect an old thread but I still have this problem and I think I figured something out.

First, the workaround now is this.

Code: Select all

sudo -s
echo /snap/freeorion/current/lib/freeorion/ > /etc/ld.so.conf.d/freeorion.conf
echo /snap/freeorion/current/usr/lib/x86_64-linux-gnu/ >> /etc/ld.so.conf.d/freeorion.conf
ldconfig
Second, I was messing around with it and when I run

Code: Select all

which freeorion
it says /snap/bin/freeorion and it's symlinked to /usr/bin/snap. There isn't a freeoriond in there so I created one. When I ran it it complained:

Code: Select all

internal error, please report: running "freeoriond" failed: cannot find installed snap "freeoriond" at revision 128: missing file /var/lib/snapd/snaps/freeoriond_128.snap
'file /var/lib/snapd/snaps/freeorion_128.snap' said it was a SquashFS file so I ran unsquashfs on it and the extracted files contained /lib/freeorion/ and the other needed libraries.

So, basically when you run freeorion with snap, it knows where to find the library files (/var/lib/snapd/snaps/freeorion_128.snap). But when you run it directly (/snap/freeorion/current/bin/freeoriond) the libraries aren't found.

I kept symlinking everything I could but then it just complained (and I have no idea how to fix this):

Code: Select all

internal error, please report: running "freeoriond" failed: cannot find app "freeoriond" in "freeoriond"
Anyway, so a solution for freeoriond is to somehow set it up with snap too? I have no idea if that's possible.

[Edit: I am so dyslexic, I can't type snap for my life, always comes out as span...]

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: freeoriond installed with snap

#15 Post by Ophiuchus »

human2 wrote: Thu Feb 18, 2021 4:54 am Anyway, so a solution for freeoriond is to somehow set it up with snap too? I have no idea if that's possible.
Yes, I actually added an app for freeoriond to the freeorion snap (only on beta channel).

So the snap provides the following commands:
  • freeorion
  • freeorion.freeoriond
  • freeorion.freeoriond-dedicated
freeorion.freeoriond-dedicated is host-only and has the connected user settings (maybe you need some more parameters).

If you need this for the stable release, I probably can get around to adding that next week.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply