Experiences building LO from scratch as a "new" developer

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

Experiences building LO from scratch as a "new" developer

Hi everyone,

You may know me from doing marketing work and videos for TDF. But a
while back I was talking to some developers and we had an idea: I should
try to build LO from scratch (something I've never done before), using
our existing documentation, to find out what could be improved.

I'm pretty geeky (been using Linux since 1998, know my way around the
Bash prompt, and have written programming tutorials for magazines) so
I'm probably quite representative of a typical new LO developer.

I've described my findings below, running a fresh installation of
Xubuntu 17.04. Overall the process wasn't too complicated, although
there are some rather confusing bits, and places where we could provide
more info. Let me know what you think!


STEPS I TOOK

1. I go to Google and type "How to build LibreOffice".


2. The first hit is
https://wiki.documentfoundation.org/Development/BuildingOnLinux - so I
go there.


3. First job is build dependencies. I execute the command specified in
the bullet point:

 sudo apt-get build-dep libreoffice

An error comes up: "E: You must put some 'source' URIs in your
sources.list". I Googled the error and fixed this by checking "Source
code" in the software-properties-gtk tool

I ran the command again and it worked. It could be noted in the wiki
that it installs around 1GB of dependencies (of course that will vary
from distro to distro).


4. Next is this bullet point:

"With modern releases, use autogen to select a newer gstreamer, or
install the old package with: sudo apt install libgstreamer0.10-dev
libgstreamer-plugins-base0.10-dev"

I don't know what "modern" is here - I'm assuming my distro is modern as
it's just a few months old. But it's very vague. I click the link which
takes me to
https://wiki.documentfoundation.org/Development/Linux_Build_Dependencies#Debian
- but there's no anchor for that so I just see the top of the page

I scroll down to "Debian / Ubuntu" and run the command specified:

 sudo apt-get install git gstreamer1.0-libav libkrb5-dev nasm

In point 2 I'm told:

"To run build-dep your repository source should contain source-code
repository source"

It looks like this fixes the problem I encountered earlier, in the first
step of BuildingOnLinux, but I wasn't told until now. The wording here
is very confusing with "source" three times in one sentence - one
referring to repositories, and one to source code.

The following steps on that page just repeat what I did before as well.


5. I'm done with dependencies, so I go back to the BuildingOnLinux page.
I look again at:

 "With modern releases, use autogen to select a newer gstreamer"

But I don't know how to do that, and I can't recall using autogen to
select anything; I only installed gstreamer1.0-libav. I try entering
"autogen" but I'm told it's not installed. Looking back in
Linux_Build_Dependencies, I see "When you use autogen.sh" under the
"Older Ubuntu" section - but the previous page said "With *modern*
releases, use autogen"

So now I'm *totally confused* about when and where to use autogen, or
autogen.sh - if I should use it at all!


6. I decide to continue with the "Cloning and building" part. I run:

 git clone git://anongit.freedesktop.org/libreoffice/core libreoffice

NOTE: This requires 2.4GB of disk space - it's worth mentioning in the
wiki before the command. (I discover later that this info is buried
under "Details, Tips, Tricks and Hints" further down the page, but IMO
it should be higher.)

I'm assuming this is the master (very latest) LibreOffice source code,
but it could also be from the latest stable release. Might be good to
clarify this here.


7. Next, I cd into libreoffice and then I see the autogen.sh command in
the instructions - which I'm assuming is what was mentioned before. So I
run this, and it appears to work fine.


8. Then I run "make" which starts downloading more stuff from the
internet. It's probably worth mentioning this, for devs who want to work
offline or when travelling, and assume they don't need net access after
the "git clone" bit.

Question: does parallel make (eg "make -j 2") have any effect here on
multi-core systems?

Thought: it would be useful to have some rough benchmarks for how long
the build process takes. eg "Dual-core Intel i5 2.4GHz: around X hours".
It doesn't need to be very specific, but it should give new developers a
rough indication.

It has been building for a few hours now, so I thought I'd post this
instead of waiting further. My next task is to fix a minor bug (or
translate some German comments), and submit a patch, to see how that
process works.

--
Mike Saunders, Marketing & PR
The Document Foundation
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Caolán McNamara Caolán McNamara
Reply | Threaded
Open this post in threaded view
|

Re: Experiences building LO from scratch as a "new" developer

On Thu, 2017-08-03 at 17:10 +0200, Mike Saunders wrote:
>  sudo apt-get build-dep libreoffice
>
> An error comes up: "E: You must put some 'source' URIs in your
> sources.list". I Googled the error and fixed this by checking "Source
> code" in the software-properties-gtk tool

This used to be unnecessary, this changed in the Ubuntu/Debian
distribution at some point to not include the Source repositories by
default. That part of the docs precede that change so needs to be
updated.

> 4. Next is this bullet point:
>
> "With modern releases, use autogen to select a newer gstreamer, or
> install the old package with: sudo apt install libgstreamer0.10-dev
> libgstreamer-plugins-base0.10-dev"

I think configure will now try to build against gstreamer-1.0 and
gstreamer-0.1 and just pick whatever combo is possible to build against
so I think we can remove this line from the docs and rely on the
earlier lines that install the default dependencies of the distribution
libreoffice build to install something suitable.

> It looks like this fixes the problem I encountered earlier, in the
> first step of BuildingOnLinux, but I wasn't told until now.

Possibly the author of that bit wasn't brave enough to edit the
toplevel build page, feel free to edit the toplevel yourself to insert
some suitable step to enable the source repos under Ubuntu

> But I don't know how to do that, and I can't recall using autogen to
> select anything; I only installed gstreamer1.0-libav. I try entering
> "autogen" but I'm told it's not installed. Looking back in
> Linux_Build_Dependencies, I see "When you use autogen.sh" under the
> "Older Ubuntu" section - but the previous page said "With *modern*
> releases, use autogen"

If, after removing the gstreamer selection stuff, there's any mention
of autogen/autogen.sh then the correct scriptname that should be used
throughout is autogen.sh.

I think buovjaga is going to make some changes here along these lines
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Shinnok Shinnok
Reply | Threaded
Open this post in threaded view
|

Re: Experiences building LO from scratch as a "new" developer

In reply to this post by Mike Saunders
Hi Mike,

That's a pretty good report, surely all of that can and must be improved. I only did macOS builds so far but I'm going to setup a Linux one over the weekend.

On Aug 3, 2017, at 4:10 PM, Mike Saunders <[hidden email]> wrote:

Question: does parallel make (eg "make -j 2") have any effect here on
multi-core systems?

Regarding this, I had to use this to limit CPU usage and load, in my case it was overheating:
$make build-nocheck -j4 -l2

Limiting with -j2,4,n alone seemed to have no effect in my case either...

Shinnok

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Jan-Marek Glogowski Jan-Marek Glogowski
Reply | Threaded
Open this post in threaded view
|

Re: Experiences building LO from scratch as a "new" developer

Am 04.08.2017 um 15:40 schrieb Shinnok:

>> On Aug 3, 2017, at 4:10 PM, Mike Saunders
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Question: does parallel make (eg "make -j 2") have any effect here on
>> multi-core systems?
>
> Regarding this, I had to use this to limit CPU usage and load, in my
> case it was overheating:
> $make build-nocheck -j4 -l2
>
> Limiting with -j2,4,n alone seemed to have no effect in my case either...

export PARALLELISM=<no of processes>

LO uses its own management of parallel builds, so a manual "make -j"
doesn't work.

Jan-Marek

P.S. There is a "make help" target with more infos.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
jan-3 jan-3
Reply | Threaded
Open this post in threaded view
|

Re: Experiences building LO from scratch as a "new" developer

In reply to this post by Mike Saunders
Hi Mike,

Thanks a lot for doing this. Excellent idea!

Jan

Am 03.08.2017 um 17:10 schrieb Mike Saunders:

> Hi everyone,
>
> You may know me from doing marketing work and videos for TDF. But a
> while back I was talking to some developers and we had an idea: I should
> try to build LO from scratch (something I've never done before), using
> our existing documentation, to find out what could be improved.
>
> I'm pretty geeky (been using Linux since 1998, know my way around the
> Bash prompt, and have written programming tutorials for magazines) so
> I'm probably quite representative of a typical new LO developer.
>
> I've described my findings below, running a fresh installation of
> Xubuntu 17.04. Overall the process wasn't too complicated, although
> there are some rather confusing bits, and places where we could provide
> more info. Let me know what you think!
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Jean-Baptiste Faure-3 Jean-Baptiste Faure-3
Reply | Threaded
Open this post in threaded view
|

Re: Experiences building LO from scratch as a "new" developer

In reply to this post by Shinnok
Hi,

Le 04/08/2017 à 15:40, Shinnok a écrit :
[...]
>> Question: does parallel make (eg "make -j 2") have any effect here on
>> multi-core systems?
>
> Regarding this, I had to use this to limit CPU usage and load, in my
> case it was overheating:
> $make build-nocheck -j4 -l2

For me using
--with-parallelism=2
in my autogen.input file
works fine

Best regards.
JBF

--
Seuls des formats ouverts peuvent assurer la pérennité de vos documents.
Disclaimer: my Internet Provider being located in France, each of our
exchanges over Internet will be scanned by French spying services.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice