Building libreoffice on linux

Building libreoffice on linux

You are using an outdated browser. Please upgrade your browser or activate Google Chrome Frame to improve your experience.

  • Discover
    • What is LibreOffice?
    • LibreOffice vs OpenOffice
    • LibreOffice Technology
    • New Features
    • Writer – word processor
    • Calc – spreadsheet
    • Impress – presentations
    • Draw – diagrams
    • Base – database
    • Math – formula editor
    • Charts
    • What is OpenDocument?
    • Templates & Extensions
    • Who uses LibreOffice?
    • Screenshots
    • Download LibreOffice
    • Business users: click here
    • LibreOffice for Android and iOS
    • App Stores and Chromebooks
    • Release Notes
    • Development versions
    • Portable versions
    • LibreOffice as Flatpak
    • LibreOffice as Snap
    • LibreOffice as AppImage
    • LibreOffice Impress Remote
    • LibreOffice Online
    • Feedback
    • Community Assistance
    • Documentation
    • Installation Instructions
    • Professional Support
    • System Requirements
    • Accessibility
    • Mailing Lists
    • Frequently Asked Questions
    • Join us – start here!
    • What can you do for LibreOffice?
    • Design
    • Developers
    • Docs Team
    • Infrastructure
    • Localization
    • Marketing
    • Native-Lang Projects
    • Testing — QA
    • Wiki
    • Community map
    • Grant Request
    • Who are we?
    • Governance
    • Advisory Board Members
    • LibreOffice Certification
    • Licenses
    • Source Code
    • Security
    • Imprint
    • Credits
    • LibreOffice Timeline
    • Privacy Policy
    • Foundation’s Reports
    • Merchandise
    • Read our blog

    Source Code

    How to build LibreOffice

    • Read our documentation on how to build LibreOffice
    • Read our overview of the build system
    • Watch a quick video intro on how to build LibreOffice
    • Watch a video tutorial on hacking LibreOffice with Kdevelop

    There are three ways to get the source code:

    • Clone from Gerrit (our code review tool): git clone https://git.libreoffice.org/core
    • Clone from the anongit repository: git clone https://anongit.freedesktop.org/git/libreoffice/core.git
    • As a final fallback, download the tarball (in case the Git server is experiencing problems). After downloading the tarball, follow these steps in your command line (for Windows it is assumed you are using cygwin shell):
    1. unpack the archive by running tar xvf libreoffice-core.tar.bz2
    2. change directory to «libo»
    3. run git checkout -f
    4. run git pull -r to get most recent commits
    • Release tarballs are only for people building LibreOffice for *nix distributions. Please find the latest versions (usually near the bottom)

    Build and run it

    These instructions are primarily aimed at a GNU/Linux user. Bootstrap your system by installing all the packages required to build your distribution’s LibreOffice package. Refer to the article about building on Linux to make sure you get everything you need.

    Then download the complete source code and build it:

    ./autogen.sh
    make

    Start the program by running: instdir/program/soffice

    Or use this command to start LibreOffice under the gdb debugger:

    make debugrun

    If you have problems with the build, don’t be put off — get in touch with us on IRC, and/or read the wiki page How to build.

    Источник

    ProLibreOffice

    В целях проверки изменений, которые вы захотите внести в код LibreOffice, вам в обязательном порядке потребуется собственная сборка на основе самого свежего исходного кода проекта (ветка core).

    Мне нужна была своя сборка в Linux (Kubuntu 18.10), поэтому я ниже опишу те несколько команд, используя которые, я получил свою сборку LibreOffice:

    Самое первое — нужно подключить репозитории с исходным кодом (которые по умолчанию в убунте отключены). Запускаем Пакетный менеджер Muon (в Ubuntu и Xubuntu это будет Synaptic), выбираем пункт меню «Настройка->Настроить источники программ», вводим пароль, в диалоге «Источники приложений» ставим галочку на опции «Исходный код». Закрываем диалог. Система должна обновить список пакетов с сервера обновлений. Если этого не случилось, то в консоли (которая всё равно далее потребуется) даем команду sudo apt-get update.

    Третье — устанавливаем ещё зависимости командой sudo apt-get install git gstreamer1.0-libav libkrb5-dev nasm graphviz ccache

    Четвёртое — находим свободного места гигабайт около 30, создаём каталог, где будет лежать исходный код LibreOffice (у меня это был просто /home/roman) и даём следующие команды git config —global protocol.version 2 (эта команда включает новый протокол git, который в десяток раз уменьшает нагрузку на сервер) и затем git clone https://gerrit.libreoffice.org/core libreoffice (которая у меня в каталоге /home/roman создала подкаталог /home/roman/libreoffice и развернула там исходный код проекта). Есть и альтернативный способ получения исходного кода, я написал об этом отдельно.

    Пятое — после завершения предыдущей команды, переходим в каталог libreoffice, дав команду cd libreoffice

    Шестое — даём команду ./autogen.sh (заметьте, безо всякого sudo!). Тут возможно задать кучу различных опций, например отключить использование Java или использовать библиотеки из дистрбутива, чтобы их не собирать заново при компиляции.

    Седьмое — если предыдущая команда завершилась без ошибок и предупреждений, то последняя команда — это make (также без sudo).

    Далее придется ждать от 2-х до 8-9 часов. Это очень сильно зависит от вашего процессора и дисковой подсистемы (крайне желательно разворачивать дерево исходников на SSD). Чем более многоядерный и высокочастотный процессор и чем быстрее диск, тем быстрее пройдет сборка.

    Восьмое — после успешного окончания работы команды make, LibreOffice можно запустить командой instdir/program/soffice.

    Источник

    Building LibreOffice

    The packaging build is not much different from any other Ubuntu/Debian Packaging. However, will need around 30GB of discspace and a lot of time for it as it comes with everything and the kitchen sink.

    • it makes it easy to contribute patches upstream
    • it is smaller and thus builds quicker
    • it has fewer dependencies and thus is less fragile

    Packaging build

    A basic packaging build is done with these instuctions:

    apt-get build-dep libreoffice apt-get source libreoffice cd libreoffice* dpkg-buildpackage -uc -us

    You will need about 30GB of discspace. The build takes about ~2.5 hours on my current notebook (i7-2720QM with 16GB RAM on a SSD with ccache).

    It usually makes sense to use ccache:

    apt-get install ccache export CCACHE_DIR=$/.ccache_distro36 export DEB_BUILD_OPTIONS="ccache parallel=9" export CCACHE_BASEDIR=`readlink -f .` ccache -M10G

    so repeated builds will not take that long.

    Upstream developer build

    To do a upstream developer build do:

    apt-get install git && apt-get build-dep libreoffice git clone git://anongit.freedesktop.org/libreoffice/core cd core ./autogen.sh --without-help --without-myspell-dicts make make check

    This will build the current (unstable) upstream master. Thats good if you want to contribute a patch or feature for the next stable major release as you can then directly push your patch (or submit it for review, however if you just want to debug an specific issue you might want to do so on a specific version of LibreOffice. To build LibreOffice 4.2.7 final release for example, do a:

    git checkout libreoffice-4.2.7.2

    after the clone (this will give you the rc2 = final of 4.2.7). An upstream developer build is much faster (~1-2 hours without ccache) since it leaves out l10n and lots of other stuff which is usually not needed for debugging or coding. Still ccache helps here too (~5-10 minutes on the same hardware):

    apt-get install ccache export CCACHE_DIR=$/.ccache_upstream export CCACHE_BASEDIR=`readlink -f .` ccache -M10G

    BuildingLibreOffice (последним исправлял пользователь bjoern-michaelsen 2014-10-21 19:03:33)

    Источник

    Читайте также:  Добавить виртуальный диск linux
Оцените статью
Adblock
detector