• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Linux Why Linux export doesn't include linked libraries?

D

Dani

Guest
Hello!

I'm using the latest GMS 2 version and runtime. When exporting to Linux (Ubuntu) YYC, the generated files don't include a "run.sh" script nor a "lib" folder containing all linked libraries (which are mandatory and necessary in order to run the game on any computer). Is there a reason why the exporter isn't working this way? Why do we need to do all of these steps manually?

Thanks.
 

Bruchpilot

Member
Pure speculation here, but I guess "Ubuntu" really means Ubuntu and not "all Linux distros". Should be the other way round, if it was me, but alas..

There is a way to avoid a wrapper script that sets LD_LIBRARY_PATH. You can patch the binary and modify its RPATH (that's the thingie the linker put there to specifiy the lib path). A tool to do this would be, for example PatchELF (there are others, too). Some people prefer the wrapper method though, for various reasons.
 
D

Dani

Guest
Yes, I was referring to give support to different Ubuntu versions, not all computers, sorry.

What I mean is: why is GMS 2 not creating the run.sh and the lib folder (containing all required libraries) automatically? Why we have to do it manually?

It would be more handy if the exporter could create an application that could run out of the box in any Ubuntu system. Right now, the end user must install all required libs in order to play. Or the developer must provide the libs (what libs? where are they documented?) and a custom run script.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I assume that the lib folder is not being auto-filled plainly to avoid redundancy - IIRC all dependencies
libc6-dev-i386
libstdc++6:i386
libopenal1:i386
libxxf86vm1:i386
libglu1:i386
libcurl3:i386
libxrandr2:i386
were adding up to something like 40MB while the runner has 3MB base size.

This is somewhat akin to DirectX situation on Windows - you can include the complete DX installer but you shouldn't (with few exceptions like physical distribution).

That said, distribution platforms sometimes have a separate option to specify dependencies, and you can do a small .sh file that auto-installs them if distributing standalone.

On run.sh, GMS1 did generate one. Could be that there's some issue in recent versions - I'd suggest to investigate a bit if this depends on specific factors and file a bug report.
 

Bruchpilot

Member
YellowAfterlife:

the 64bit-runner has *a lot* more dependencies than those (this changed). Your list looks like the one from the old runner.
 
D

Dani

Guest
Yes, I'm talking about GMS 2 Linux YYC export, which creates a 64-bit application with many more dependencies. And it doesn't create a "run.sh" script by default, I had to do it manually and include some missing libraries in order to make the game playable when launched from Steam.

I mean, when I export for Windows YYC, I get an executable that works out of the box if players have DirectX 11 installed on their system. I can tell them "Install DirectX 11 and it will work".

But what libraries do people need to install on Ubuntu in order to play GMS 2 YYC Linux applications out of the box? There is no section in the help website that says: "players need to install the following libraries in order to play Linux games out of the box". I cannot tell Linux players "install X and it will work". That's not documented anywhere.

One can obviously make it work manually, but that's not the ideal solution.
 

Bruchpilot

Member
Dani:

By the way (not sure if you are aware of it): When you need to find out all the dependencies of a linux executable (or shared objects and libs, sometimes libs also have dependencies) you can use the following command:

Code:
ldd /path/to/executable
(With path to executable being your binary, obviously). This also helps debugging the situation where a user has the lib, but it still doesn't work, because it's the wrong version (libs often change their interfaces between versions, and break compatibility), because it shows which system library is being used for the one requested.
 
D

Dani

Guest
Thanks, @Bruchpilot !

Yes, I found that command and another one in a website:

Code:
ldd /path/to/program
objdump -p /path/to/program | grep NEEDED
But I'm having a lot of problems trying to make the game launch for all players.
 
Top