Question about Linux binaries size (built and packaged)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Question about Linux binaries size (built and packaged)

Post by molul »

I downloaded LÖVE Linux binaries from https://bitbucket.org/rude/love/downloads/, and I'm a bit confused that they are like 9MB, but when I build LÖVE from source (the binaries are left in "src" directory), it's like 180MB.

What would be the extra step to shrink to the 9MB of the zip at repo downloads? I'm trying to cross-build LÖVE for an ARM device and I might have troubles making room for my whole project. 180MB would just be impossible to copy over to the device XD
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Question about Linux binaries size (built and packaged)

Post by bartbes »

180MB sounds excessive, I want to say my builds are usually about 50MB. Probably the first step is to only take the binaries you actually want, so run

Code: Select all

make DESTDIR=/path/to/output/dir install
Then you probably want most or all of the binaries in that folder, but to actually get them down to a sane size, you want to call 'strip -s' on them, to remove (mostly) debug information.
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Question about Linux binaries size (built and packaged)

Post by molul »

Sorry, I double posted
Last edited by molul on Sat Jun 09, 2018 10:23 am, edited 1 time in total.
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Question about Linux binaries size (built and packaged)

Post by molul »

Ok, so I used this command (make DESTDIR=/<my output path> install) and after building I have an "usr" directory, and then inside three directories: bin, lib and share.

I used strip -s on files in bin and lib and they seem to have a reasonable size now.

But I can't seem to run love. I went to the bin folder, type ./love <my .love project path> and get this error:

"./love: error while loading shared libraries: liblove-11.1.so: cannot open shared object file: No such file or directory"

liblove-11.1.so is inside "lib" folder. I tried copying all files inside bin and lib to the build rooth path and still get the same error.

It happens the same if I don't do the strip -s thing.

What am I doing wrong?
Attachments
buildPath.png
buildPath.png (57.23 KiB) Viewed 3955 times
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Question about Linux binaries size (built and packaged)

Post by bartbes »

The library isn't in the search path, so that's why it's not found. You can adjust LD_LIBRARY_PATH.

And again, don't double post.
User avatar
molul
Party member
Posts: 264
Joined: Sun Feb 05, 2012 6:51 pm
Location: Valencia, Spain
Contact:

Re: Question about Linux binaries size (built and packaged)

Post by molul »

bartbes wrote: Sat Jun 09, 2018 10:18 am The library isn't in the search path, so that's why it's not found. You can adjust LD_LIBRARY_PATH.

And again, don't double post.
Will try. And sorry again. I just got used to not editing second or third posts. I also wasn't myself yesterday. My apologies.

EDIT: LD_LIBRARY_PATH=. ./love <myLoveFileName>.love worked like a charm, and LÖVE binaries final size is 10.5MB.

Thank you very much, bartbes! :D
Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests