Is it still possible to compile LibreOffice 24 for Linux 32-bit? (part 2)

Dr. David Alan Gilbert dave at treblig.org
Sat Feb 10 00:00:01 UTC 2024


* Escuelas Linux (escuelaslinux at gmail.com) wrote:
> Thanks to Dan Horák and Rene Engelhard for their answers!

Best to keep the reply on the thread!

> Dan said:
> 
> 
> -"Because 32-bit system means max 4GB address space for a process and ld
> runs as a single process".
> 
> 
> I installed a PAE kernel, so it can effectively use more than 4 GB.

PAE isn't quite that powerful.  It can let the system use more than 4GB
total, but any one process can't use more than 2 or 3GB.  So it doesn't
help if, say your linker process, decides it needs loads of RAM.
Fundamentally that's a limit of using 32bit address space.

> 
> -"You can try disabling or reducing the size of debuginfo to reduce the
> size of the *.o files if it's used, you can disable LTO and there are some
> options for ld to reduce its memory usage a bit".
> 
> 
> I tried several permutations to reduce the amount of memory used. One of
> them was to reduce the number of processors in my autogen.input:
> 
> 
> --with-parallelism=1

Good.

> Another one was to add this parameter when running make:
> 
> 
> make LDFLAGS="-Wl,--reduce-memory-overheads"

That looks like it's a specific trade off; not any of the specific
things mentioned about debuginfo and ensuring LTO is disabled.

If possible you should probably also include the exact command line
of the process that dies.

> 
> I also increased the available memory on the VM from 12 to 15 GB. But no
> results, always got the exhausted memory message.

Right, see what I said above about PAE not being that smart.

> I also tried several other possible solutions, but it feels like going on a
> wild goose chase without knowing exactly what to do, relying on some
> general random advices found on the web.

Dave

> 
> -------------
> 
> Rene said:
> 
> 
> -"Debian still ships LibreOffice on 32bit archs, as do other distributions."
> 
> 
> Oh! Thanks for the tip! I was not aware that Debian even has binary
> LibreOffice 24.2 32-bit packages, albeit in the unstable branch.
> 
> I was even able to build LibreOffice from source:
> 
> 
> apt-get --build source libreoffice
> 
> 
> This proves to me that the LibreOffice source code has not dropped 32-bit
> support, but I still don't know why my own compilation attempts always
> failed with a memory exhausted message, even with the same VM configuration.
> 
> Would it be possible for me to just use the Debian LibreOffice 24.2
> binaries or its source packages? Not quite, as they also have a lot of
> dependencies on packages that are only available in the unstable branch, so
> they would not be suitable for a distribution intended for a stable Debian
> 12 bookworm base.
> 
> 
> -"I do -g1 in Debian. LTO works".
> 
> 
> Where should I add the -g1 parameter?
> 
> 
> -"make check fails. I do a minimal set (testtools bridgetest, smoketest,
> sal, the other public libraries) to at least not get something
> fundamentally broken".
> 
> 
> My autogen.input file is:
> 
> --with-parallelism=16
> 
> --with-distro=LibreOfficeLinux
> 
> --with-lang=es
> 
> --with-myspell-dicts
> 
> --enable-release-build
> 
> --with-package-format=deb
> 
> --disable-dependency-tracking
> 
> --with-jdk-home=/usr/lib/jvm/java-11-openjdk-i386/
> 
> --with-privacy-policy-url=NO-URL
> 
> 
> -"And somehow the testtools bridgetest fails when building with gcc >= 13,
> 12 works. Haven't found a solution yet.)"
> 
> 
> I'm using gcc 13! Maybe this could be the cause of my compilation failures?
> 
> I'll make some more attempts to compile LibreOffice 32-bit now using gcc
> 12, any additional ideas or suggestions would be more than welcome.
> 
> 
> Thanks again.
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


More information about the LibreOffice mailing list