Bug 39643 - [EasyHack] Remove --disable-strip-solver configure option and default to never strip, when copying to solver
Summary: [EasyHack] Remove --disable-strip-solver configure option and default to neve...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: target:3.6.0
Keywords: difficultyBeginner, easyHack, skillScript
Depends on:
Reported: 2011-07-28 10:14 UTC by Björn Michaelsen
Modified: 2015-12-16 00:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2011-07-28 10:14:48 UTC
=== Improve build with/without symbols ===

'''Background:''' By default, the LibreOffice build strips symbols during the build process. This is not wanted when you want to debug your build; and as a consequence you want to build the developer builds with --enable-symbols. But people usually do not want it, and anyway, we could strip the symbols later, during packaging - which is this easy task about.

So - when we ./configure on a platform where LibreOffice is built with gcc without any --enable-symbols and --disable-symbols, we want to default to producing symbols (equivalent of --enable-symbols), and strip them at the very last stage when making the final .rpms/.debs when using the epm packing mode.

'''Skills:''' build, autoconf, Perl
Comment 1 enrico.weigelt 2012-03-17 08:03:32 UTC
Wouldn't it be easier to completely drop that switch and move stripping entirely to packaging stage ? (eg. some install-strip make target)
Comment 2 Björn Michaelsen 2012-04-04 05:43:28 UTC
adding Petr, Michael: Coudl you reply to the question? I assume one of you was the original author/mentor of this one.
Comment 3 Petr Mladek 2012-04-05 01:54:50 UTC
I am not author of the stripping. I only fixed it to do not strip if you use --disable-strip-solver. We needed it for producing debuginfo packages.

IMHO, the problem is the solver. It includes one more copy of the binaries in compare with other software projects.

The binaries are huge:

+ build with -g and non-stripped solver:

        2.8G    solver
        8.4G    workdir

+ build without -g and non-stripped solver

        690M    solver
        2.5G    workdir

+ build without -g and stripped solver

        561M    solver.strip
        2.5G    workdir

=> you safe 8GB if you build without -g
   and about 130MB if you strip binaries in solver

To be honest, I am not sure if the 130MBs are worth the --disable-strip-solver switch. I just think that we need some optimization here.

I add Lubos into CC. He is interested into optimizing the linking time. The problem is that the huge binaries are not in memory and linking is slow.

BTW: I am a bit mixed by the original comment and the sentence: "But
people usually do not want it". What people do not want? Build with --enable-symbols by default? Strip solver by default? Or?
Comment 4 Luboš Luňák 2012-04-05 02:22:08 UTC
I do not understand this task at all. Developers want debug builds and they should use --enable-debug --enable-dbgutil, or --enable-symbols at the very least. Packagers want optimized build, and if they want debuginfo packages too, they use --enable-symbols. I do not get the point of building with symbols and then stripping them at the very last moment, thus wasting all the overhead.

IMO this task should be either clarified or dropped.
Comment 5 Björn Michaelsen 2012-04-05 02:43:50 UTC
Removing EasyHack status for now.

@llunak, pmladek: So I think we agree that we should just remove the --disable-strip-solver switch and never strip when copying to solver. IIRC gbuild doesnt strip when copying to solver anyway. For those where disc space is critical, gb_Deliver_HARDLINK is an option to save a lot more than could be saved by copying and then stripping.

So do we agree that this EasyHack should be "Remove the disable-strip-solver option completely and never strip when copying to solver"?

a historic note: IIRC this stripping while copying to solver madness was a hack for the old OOo crashreporter for which you needed both the stripped version (to deliver as a product) and the unstripped version (to resolve symbols) around. That never was a good reason.
Comment 6 Luboš Luňák 2012-04-05 03:18:27 UTC
(In reply to comment #5)
> For those where disc space
> is critical, gb_Deliver_HARDLINK is an option to save a lot more than could be
> saved by copying and then stripping.

 Is there any special reason why this is not the default? This is not only about disk space - copying around several gigs of data needlessly takes some time too. Unless there is a serious problem with it, it would be very nice to have this documented in some place such as the build wiki page.

> So do we agree that this EasyHack should be "Remove the disable-strip-solver
> option completely and never strip when copying to solver"?

 Makes sense.
Comment 7 Björn Michaelsen 2012-04-05 03:59:00 UTC
"Is there any special reason why this is not the default?"

Hasnt been widely tested (although it is now: Ubuntu does release builds with it.). Apart from that: Doesnt work on Windows obviously, and add the requirement to have WORKDIR and OUTDIR on the same filesystem. All not blockers, but would need to be documented.

As we seem to agree: EasyHackify and update title.
Comment 8 Not Assigned 2012-04-26 03:47:25 UTC
David Ostrovsky committed a patch related to this issue.
It has been pushed to "master":


fdo#39643: Remove --disable-strip-solver configure option
Comment 9 Petr Mladek 2012-04-27 04:54:27 UTC
the bug is fixed in master:
    + we do not strip binaries in solver
    + "make install" does not strip binaries as well to be compatible with 
       other software projects
    + "make install-strip" is a new target to get smaller stripped installation
      (it it easier to send to others)
    + installation sets created in instsettoo_native are stripped because they
      are intended for official release and it should be minimal for download
Comment 10 Robinson Tryon (qubit) 2015-12-16 00:18:30 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript )