massive increase of the size of the library

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

massive increase of the size of the library

Paul Zimmermann
       Hi,

some user reported us that the size of the MPFR library did increase a lot
between 4.0.2 and 4.1.0. I notice a similar fact for the GNU libc, between
2.28 and 2.29, both for libc.a and libc.so (the same holds for libm.a and
libm.so):

-rw-r--r-- 1 zimmerma caramba  5121680 May 20 10:49 /localdisk/zimmerma/glibc-2.28/build/libc.a
-rw-r--r-- 1 zimmerma caramba 45919382 Mar  6 07:58 /localdisk/zimmerma/glibc-2.29/build/libc.a

-rwxr-xr-x 1 zimmerma caramba  2092096 May 20 11:07 /localdisk/zimmerma/glibc-2.28/build/libc.so
-rwxr-xr-x 1 zimmerma caramba 18769880 Mar  6 07:58 /localdisk/zimmerma/glibc-2.29/build/libc.so

We see an increase in size by a factor of almost 10!

2.28 was configured with --without-selinux, but if I configure 2.29 with
--without-selinux, I get similar figures as the 2.29 ones above. Also 2.28 was
compiled with gcc 9.3.0, whereas 2.29 was compiled with gcc 9.2.1, but
compiling 2.29 with gcc 9.3.0 does not change much too.

Does anybody know the reason of that massive increase?

Paul

Reply | Threaded
Open this post in threaded view
|

Re: massive increase of the size of the library

Sourceware - libc-alpha mailing list
* Paul Zimmermann:

> some user reported us that the size of the MPFR library did increase a lot
> between 4.0.2 and 4.1.0. I notice a similar fact for the GNU libc, between
> 2.28 and 2.29, both for libc.a and libc.so (the same holds for libm.a and
> libm.so):
>
> -rw-r--r-- 1 zimmerma caramba  5121680 May 20 10:49 /localdisk/zimmerma/glibc-2.28/build/libc.a
> -rw-r--r-- 1 zimmerma caramba 45919382 Mar  6 07:58 /localdisk/zimmerma/glibc-2.29/build/libc.a
>
> -rwxr-xr-x 1 zimmerma caramba  2092096 May 20 11:07 /localdisk/zimmerma/glibc-2.28/build/libc.so
> -rwxr-xr-x 1 zimmerma caramba 18769880 Mar  6 07:58 /localdisk/zimmerma/glibc-2.29/build/libc.so
>
> We see an increase in size by a factor of almost 10!

Can you put the file somewhere?  My first guess would be that it's
debugging information.  The “size” tool from binutils shows numbers
without debugging information.

Thanks,
Florian

Reply | Threaded
Open this post in threaded view
|

Re: massive increase of the size of the library

Paul Zimmermann
       Dear Florian,

> From: Florian Weimer <[hidden email]>
> Cc: [hidden email],  [hidden email]
> Date: Tue, 21 Jul 2020 10:26:04 +0200
> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
>
> * Paul Zimmermann:
>
> > some user reported us that the size of the MPFR library did increase a lot
> > between 4.0.2 and 4.1.0. I notice a similar fact for the GNU libc, between
> > 2.28 and 2.29, both for libc.a and libc.so (the same holds for libm.a and
> > libm.so):
> >
> > -rw-r--r-- 1 zimmerma caramba  5121680 May 20 10:49 /localdisk/zimmerma/glibc-2.28/build/libc.a
> > -rw-r--r-- 1 zimmerma caramba 45919382 Mar  6 07:58 /localdisk/zimmerma/glibc-2.29/build/libc.a
> >
> > -rwxr-xr-x 1 zimmerma caramba  2092096 May 20 11:07 /localdisk/zimmerma/glibc-2.28/build/libc.so
> > -rwxr-xr-x 1 zimmerma caramba 18769880 Mar  6 07:58 /localdisk/zimmerma/glibc-2.29/build/libc.so
> >
> > We see an increase in size by a factor of almost 10!
>
> Can you put the file somewhere?  My first guess would be that it's
> debugging information.  The “size” tool from binutils shows numbers
> without debugging information.
>
> Thanks,
> Florian

sure, the files are here:

https://members.loria.fr/PZimmermann/libc-2.28.a
https://members.loria.fr/PZimmermann/libc-2.28.so
https://members.loria.fr/PZimmermann/libc-2.29.a
https://members.loria.fr/PZimmermann/libc-2.29.so

Paul
Reply | Threaded
Open this post in threaded view
|

Re: massive increase of the size of the library

Sourceware - libc-alpha mailing list
* Paul Zimmermann:

> sure, the files are here:
>
> https://members.loria.fr/PZimmermann/libc-2.28.a
> https://members.loria.fr/PZimmermann/libc-2.28.so
> https://members.loria.fr/PZimmermann/libc-2.29.a
> https://members.loria.fr/PZimmermann/libc-2.29.so

   text   data    bss    dec    hex filename
1753624  20968  16408 1791000 1b5418 libc-2.28.so
1758304  20968  16408 1795680 1b6660 libc-2.29.so

So the actual code is of the same size.

The difference seems to be that the second file contains debugging
information:

$ strip libc-2.2?.so
$ ls -l libc-2.2?.so
-rw-rw-r--. 1 fweimer fweimer 1791400 Jul 21 10:39 libc-2.28.so
-rw-rw-r--. 1 fweimer fweimer 1791400 Jul 21 10:39 libc-2.29.so

So it must be a difference in your build environment.

Thanks,
Florian

Reply | Threaded
Open this post in threaded view
|

Re: massive increase of the size of the library

Andreas Schwab-2
In reply to this post by Paul Zimmermann
On Jul 21 2020, Paul Zimmermann wrote:

> https://members.loria.fr/PZimmermann/libc-2.28.a
> https://members.loria.fr/PZimmermann/libc-2.28.so
> https://members.loria.fr/PZimmermann/libc-2.29.a
> https://members.loria.fr/PZimmermann/libc-2.29.so

You are comparing apples (stripped) with oranges (unstripped).

Andreas.

--
Andreas Schwab, [hidden email]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Reply | Threaded
Open this post in threaded view
|

Re: massive increase of the size of the library

Paul Zimmermann
In reply to this post by Sourceware - libc-alpha mailing list
> From: Florian Weimer <[hidden email]>
> Date: Tue, 21 Jul 2020 10:40:13 +0200
>
> * Paul Zimmermann:
>
> > sure, the files are here:
> >
> > https://members.loria.fr/PZimmermann/libc-2.28.a
> > https://members.loria.fr/PZimmermann/libc-2.28.so
> > https://members.loria.fr/PZimmermann/libc-2.29.a
> > https://members.loria.fr/PZimmermann/libc-2.29.so
>
>    text   data    bss    dec    hex filename
> 1753624  20968  16408 1791000 1b5418 libc-2.28.so
> 1758304  20968  16408 1795680 1b6660 libc-2.29.so
>
> So the actual code is of the same size.
>
> The difference seems to be that the second file contains debugging
> information:
>
> $ strip libc-2.2?.so
> $ ls -l libc-2.2?.so
> -rw-rw-r--. 1 fweimer fweimer 1791400 Jul 21 10:39 libc-2.28.so
> -rw-rw-r--. 1 fweimer fweimer 1791400 Jul 21 10:39 libc-2.29.so
>
> So it must be a difference in your build environment.
>
> Thanks,
> Florian

thanks Florian. Indeed I had to compile 2.28 with CFLAGS="-O2 -Wno-error"
since with -Werror it does not compile with gcc 9.3.0. If I add -g then
I get a similar size than with 2.29 (where CFLAGS="-O2 -g" by default).

Paul
Reply | Threaded
Open this post in threaded view
|

Re: massive increase of the size of the library

Joseph Myers
On Tue, 21 Jul 2020, Paul Zimmermann wrote:

> thanks Florian. Indeed I had to compile 2.28 with CFLAGS="-O2 -Wno-error"
> since with -Werror it does not compile with gcc 9.3.0. If I add -g then

The way to disable -Werror is the --disable-werror configure option.  
(There's also the option of identifying the commits that fixed the build
with newer GCC and cherry-picking them to the older release branch.)

--
Joseph S. Myers
[hidden email]