Emacs 25 size and static linking

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Emacs 25 size and static linking

Robert Thorpe-2
I use Emacs 25 on MS Windows.

I've noticed that the executable for Emacs 25 is much larger than the
executable was for Emacs 24.  It's nearly 10 times larger.

I presume this is because some libraries have been statically linked
into Emacs.  I expect that means that the MS Windows user doesn't have
to install those libraries separately?

Is this correct?

If so, which libraries have been put in and which no longer need
separate installation?

BR,
Robert Thorpe


Reply | Threaded
Open this post in threaded view
|

Re: Emacs 25 size and static linking

Eli Zaretskii
> From: Robert Thorpe <[hidden email]>
> Date: Wed, 10 Jan 2018 01:06:52 +0000
>
> I use Emacs 25 on MS Windows.
>
> I've noticed that the executable for Emacs 25 is much larger than the
> executable was for Emacs 24.  It's nearly 10 times larger.
>
> I presume this is because some libraries have been statically linked
> into Emacs.  I expect that means that the MS Windows user doesn't have
> to install those libraries separately?
>
> Is this correct?

No, I think the Emacs 24 binary you were using was stripped.  What is
its size, and what is the size of the Emacs 25 binary?

Reply | Threaded
Open this post in threaded view
|

Re: Emacs 25 size and static linking

Tomas Nordin-2
Eli Zaretskii <[hidden email]> writes:

>> From: Robert Thorpe <[hidden email]>
>> Date: Wed, 10 Jan 2018 01:06:52 +0000
>>
>> I use Emacs 25 on MS Windows.
>>
>> I've noticed that the executable for Emacs 25 is much larger than the
>> executable was for Emacs 24.  It's nearly 10 times larger.

I see something similar, see below.

>> I presume this is because some libraries have been statically linked
>>  into Emacs. I expect that means that the MS Windows user doesn't
>> have to install those libraries separately?
>>
>> Is this correct?
>
> No, I think the Emacs 24 binary you were using was stripped.  What is
> its size, and what is the size of the Emacs 25 binary?

Here is the listings of the emacs bin directory for respective version
on the windows machine I use

$ ls -hl emacs-24.5/bin
total 26M
-rwxr-xr-x 1 username 1049089 577K Oct 26  2016 addpm.exe*
-rwxr-xr-x 1 username 1049089 956K Oct 26  2016 ctags.exe*
-rwxr-xr-x 1 username 1049089 713K Oct 26  2016 ebrowse.exe*
-rwxr-xr-x 1 username 1049089 8.8M Oct 26  2016 emacs.exe*
-rwxr-xr-x 1 username 1049089 8.8M Oct 26  2016 emacs-24.5.exe*
-rwxr-xr-x 1 username 1049089 997K Oct 26  2016 emacsclient.exe*
-rwxr-xr-x 1 username 1049089 652K Oct 26  2016 emacsclientw.exe*
-rwxr-xr-x 1 username 1049089 953K Oct 26  2016 etags.exe*
-rwxr-xr-x 1 username 1049089 7.0K Oct 26  2016 grep-changelog*
-rwxr-xr-x 1 username 1049089 1.1M Jan 31  2017 libiconv-2.dll*
-rwxr-xr-x 1 username 1049089 1.1M Jan 31  2017 libxml2-2.dll*
-rwxr-xr-x 1 username 1049089 520K Oct 26  2016 libXpm.dll*
-rwxr-xr-x 1 username 1049089 483K Oct 26  2016 runemacs.exe*
-rwxr-xr-x 1 username 1049089  71K Jan 31  2017 zlib1.dll*
$ ls -hl emacs-25.3_1/bin
total 205M
-rwxr-xr-x 1 username 1049089 2.3M Jan  4 11:54 addpm.exe*
-rwxr-xr-x 1 username 1049089 2.5M Jan  4 11:54 ctags.exe*
-rwxr-xr-x 1 username 1049089 1.9M Jan  4 11:54 ebrowse.exe*
-rwxr-xr-x 1 username 1049089  95M Jan  4 11:54 emacs.exe*
-rwxr-xr-x 1 username 1049089  95M Jan  4 11:54 emacs-25.3.exe*
-rwxr-xr-x 1 username 1049089 2.5M Jan  4 11:54 emacsclient.exe*
-rwxr-xr-x 1 username 1049089 1.9M Jan  4 11:54 emacsclientw.exe*
-rwxr-xr-x 1 username 1049089 2.5M Jan  4 11:54 etags.exe*
-rwxr-xr-x 1 username 1049089  76K Jan  4 11:54 libXpm-noX4.dll*
-rwxr-xr-x 1 username 1049089 1.7M Jan  4 11:54 runemacs.exe*



Reply | Threaded
Open this post in threaded view
|

Re: Emacs 25 size and static linking

Eli Zaretskii
> From: Tomas Nordin <[hidden email]>
> Date: Wed, 10 Jan 2018 22:21:51 +0100
>
> > No, I think the Emacs 24 binary you were using was stripped.  What is
> > its size, and what is the size of the Emacs 25 binary?
>
> Here is the listings of the emacs bin directory for respective version
> on the windows machine I use
>
> $ ls -hl emacs-24.5/bin
> total 26M
> -rwxr-xr-x 1 username 1049089 577K Oct 26  2016 addpm.exe*
> -rwxr-xr-x 1 username 1049089 956K Oct 26  2016 ctags.exe*
> -rwxr-xr-x 1 username 1049089 713K Oct 26  2016 ebrowse.exe*
> -rwxr-xr-x 1 username 1049089 8.8M Oct 26  2016 emacs.exe*

This is a normal size for a stripped binary.

> $ ls -hl emacs-25.3_1/bin
> total 205M
> -rwxr-xr-x 1 username 1049089 2.3M Jan  4 11:54 addpm.exe*
> -rwxr-xr-x 1 username 1049089 2.5M Jan  4 11:54 ctags.exe*
> -rwxr-xr-x 1 username 1049089 1.9M Jan  4 11:54 ebrowse.exe*
> -rwxr-xr-x 1 username 1049089  95M Jan  4 11:54 emacs.exe*

And this is a normal size for an unstripped binary with full debug
info.

So my hypothesis seems correct, and you have nothing to worry about.
It's not a bug or some other problem, that's intended.

Reply | Threaded
Open this post in threaded view
|

Re: Emacs 25 size and static linking

Robert Thorpe-2
Eli Zaretskii <[hidden email]> writes:

>> From: Tomas Nordin <[hidden email]>
>> Date: Wed, 10 Jan 2018 22:21:51 +0100
>>
>> > No, I think the Emacs 24 binary you were using was stripped.  What is
>> > its size, and what is the size of the Emacs 25 binary?
>>
>> Here is the listings of the emacs bin directory for respective version
>> on the windows machine I use
...

>> -rwxr-xr-x 1 username 1049089 2.3M Jan  4 11:54 addpm.exe*
>> -rwxr-xr-x 1 username 1049089 2.5M Jan  4 11:54 ctags.exe*
>> -rwxr-xr-x 1 username 1049089 1.9M Jan  4 11:54 ebrowse.exe*
>> -rwxr-xr-x 1 username 1049089  95M Jan  4 11:54 emacs.exe*
>
> And this is a normal size for an unstripped binary with full debug
> info.
>
> So my hypothesis seems correct, and you have nothing to worry about.
> It's not a bug or some other problem, that's intended.

I see, that explains it.  Thank you Eli and Tomas.

Does this mean that Emacs 25 needs all the same libraries as Emacs 24.5
if you want all the features?

So, libxml2, libiconv, the image libraries, etc.

BR,
Robert Thorpe



Reply | Threaded
Open this post in threaded view
|

Re: Emacs 25 size and static linking

Eli Zaretskii
> From: Robert Thorpe <[hidden email]>
> Cc: [hidden email]
> Date: Fri, 12 Jan 2018 23:48:04 +0000
>
> Does this mean that Emacs 25 needs all the same libraries as Emacs 24.5
> if you want all the features?
>
> So, libxml2, libiconv, the image libraries, etc.

Yes.  But you may wish to refresh those libraries, as some of them
might have released new versions, and Emacs 25 could have more
functionality with the newer versions.