Compiling LilyPond on Linux Mint 19.1

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

Compiling LilyPond on Linux Mint 19.1

Lukas-Fabian Moser
Folks,

this is mostly to give a reference to those who might hit the same
problems that I had:

I decided to switch from my ancient Linux Mint 17.3 to Linux Mint 19.1
yesterday. In order to set up a working build environment, I had to
provide a working Guile 1.8 which seems not to be in the repositories
any more.

So in addition to following the instructions given in
http://lilypond.org/doc/v2.19/Documentation/contributor/requirements-for-compiling-lilypond#linux-mint 
I also followed the most recent one of the various variations of steps
for compiling Guile 1.8 that Federico Bruni gave in October 2017
(http://lilypond.1069038.n5.nabble.com/compiling-lilypond-in-debian-stretch-with-self-compiled-guile-1-8-td206683.html)

git clone https://git.savannah.gnu.org/git/guile.git
cd guile
git checkout branch_release-1-8
./autogen.sh
./configure --disable-error-on-warning --prefix=/usr/local
make
sudo make install
sudo ldconfig

echo "GUILE_CONFIG=/usr/local/bin/guile-config" >> ~/.bashrc

Then, after restarting Bash, I could proceed to
http://lilypond.org/doc/v2.19/Documentation/contributor/configuring-make 
and successfully compile current Master.

(On my system, the echo [...] >> ~/.bashrc command added the given line
without any new-line or whitespace, so I had to insert a newline in an
editor.)


Probably these instructions would need some more
testing/polishing/adjusting to other distributions before they could
reasonably be added to the Contributor's Guide, so I just thought it
might be helpful to collect them once more here. (In fact I did run into
a bit of trouble tonight, but this seems to have been because I wanted
to re-use my old lilypond git directory which had been used for
compiling on my old system, so it wasn't really a clean start. This
might also mean my procedure can't be guaranteed to work on a really
fresh Lilypond git folder, but I think they should - I removed the old
build/ folder before the first succesful compile, so there shouldn't
have been any remnants of earlier successful compilations.)

Or would there have been a much easier way to success?

(The upside for me: Now I have the necessary Python/Qt/Lilypond bindings
to also run current Frescobaldi from the git repository following Urs's
excellent instructions on
https://github.com/wbsoft/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux.)

Best
Lukas


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Compiling LilyPond on Linux Mint 19.1

Urs Liska-3
Hi Lukas,

thanks for putting this together. Indeed since installing a distro that
doesn't Guile 1.8 anymore I hadn't been able to compile LilyPond
anymore. Once I managed to compile Guile 1.8 and do a build but for some
reason I lost this option. I think the point was that after compiling
Guile I had to actually change the way LilyPond's make was handled -
which of course isn't sustainable.

I'm also running Linux Mint 19.1, and followed your command list (and
the previous instructions from the CG). Except that I already had some
of the dependencies installed everything worked flawlessly, and I could
run a make to compile LilyPond, register that in Frescobaldi and compile
a .ly file with it. A warning about missing URW fonts was the only issue
I encountered. make doc took the expected ages but worked without errors
too!

So I can confirm that the steps work on Linux Mint 19.

Janek Wachoł has written a few scripts to help managing multiple
LilyPond builds, which I really appreciated when I had them working.
Basically they provide a configuration layer around the compilation,
then create a local clone of the main code repository and build from
that copy. That makes it possible to have multiple different builds from
different branches (or even states of a branch) in parallel. I will see
if I can integrate that with compiling through a self-compiled Guile and
report back. Maybe these scripts are of use for others as well.

Best
Urs

Am 20.12.18 um 12:21 schrieb Lukas-Fabian Moser:

> Folks,
>
> this is mostly to give a reference to those who might hit the same
> problems that I had:
>
> I decided to switch from my ancient Linux Mint 17.3 to Linux Mint 19.1
> yesterday. In order to set up a working build environment, I had to
> provide a working Guile 1.8 which seems not to be in the repositories
> any more.
>
> So in addition to following the instructions given in
> http://lilypond.org/doc/v2.19/Documentation/contributor/requirements-for-compiling-lilypond#linux-mint 
> I also followed the most recent one of the various variations of steps
> for compiling Guile 1.8 that Federico Bruni gave in October 2017
> (http://lilypond.1069038.n5.nabble.com/compiling-lilypond-in-debian-stretch-with-self-compiled-guile-1-8-td206683.html)
>
> git clone https://git.savannah.gnu.org/git/guile.git
> cd guile
> git checkout branch_release-1-8
> ./autogen.sh
> ./configure --disable-error-on-warning --prefix=/usr/local
> make
> sudo make install
> sudo ldconfig
>
> echo "GUILE_CONFIG=/usr/local/bin/guile-config" >> ~/.bashrc
>
> Then, after restarting Bash, I could proceed to
> http://lilypond.org/doc/v2.19/Documentation/contributor/configuring-make 
> and successfully compile current Master.
>
> (On my system, the echo [...] >> ~/.bashrc command added the given
> line without any new-line or whitespace, so I had to insert a newline
> in an editor.)
>
>
> Probably these instructions would need some more
> testing/polishing/adjusting to other distributions before they could
> reasonably be added to the Contributor's Guide, so I just thought it
> might be helpful to collect them once more here. (In fact I did run
> into a bit of trouble tonight, but this seems to have been because I
> wanted to re-use my old lilypond git directory which had been used for
> compiling on my old system, so it wasn't really a clean start. This
> might also mean my procedure can't be guaranteed to work on a really
> fresh Lilypond git folder, but I think they should - I removed the old
> build/ folder before the first succesful compile, so there shouldn't
> have been any remnants of earlier successful compilations.)
>
> Or would there have been a much easier way to success?
>
> (The upside for me: Now I have the necessary Python/Qt/Lilypond
> bindings to also run current Frescobaldi from the git repository
> following Urs's excellent instructions on
> https://github.com/wbsoft/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux.)
>
> Best
> Lukas
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Compiling LilyPond on Linux Mint 19.1

Federico Bruni-2


Il giorno ven 21 dic 2018 alle 9:06, Urs Liska <[hidden email]>
ha scritto:
> [...]
> A warning about missing URW fonts was the only issue I encountered.
> make doc took the expected ages but worked without errors too!
>
> So I can confirm that the steps work on Linux Mint 19.
>

Hi Urs

this was discussed before but you might have missed it.

You can use part of this script:
https://github.com/fedelibre/LilyDevOS/blob/master/mkosi/debian/mkosi.extra/etc/skel/setup.sh#L39

to download the needed .otf files.

AFAIK, only Fedora (?) includes .otf files in its URW fonts package,
because I asked for it:
https://bugzilla.redhat.com/show_bug.cgi?id=1496466#c18

Fedora packager wrote that OTF files are not too big and decided that
they can be distributed along with .t1 and .afm files.
If somebody asked Debian to do the same for fonts-urw-base35 package,
above script would be not necessary anymore - for Debian nor its
derivatives (Ubuntu, Mint, etc.).




_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Compiling LilyPond on Linux Mint 19.1

Urs Liska-3
Hi Federico and Lukas,

Am 21.12.18 um 09:59 schrieb Federico Bruni:

>
>
> Il giorno ven 21 dic 2018 alle 9:06, Urs Liska <[hidden email]>
> ha scritto:
>> [...]
>> A warning about missing URW fonts was the only issue I encountered.
>> make doc took the expected ages but worked without errors too!
>>
>> So I can confirm that the steps work on Linux Mint 19.
>>
>
> Hi Urs
>
> this was discussed before but you might have missed it.
>
> You can use part of this script:
> https://github.com/fedelibre/LilyDevOS/blob/master/mkosi/debian/mkosi.extra/etc/skel/setup.sh#L39 
>
>
> to download the needed .otf files.
>
> AFAIK, only Fedora (?) includes .otf files in its URW fonts package,
> because I asked for it:
> https://bugzilla.redhat.com/show_bug.cgi?id=1496466#c18
>

Thanks, this seems to have worked.


> Fedora packager wrote that OTF files are not too big and decided that
> they can be distributed along with .t1 and .afm files.
> If somebody asked Debian to do the same for fonts-urw-base35 package,
> above script would be not necessary anymore - for Debian nor its
> derivatives (Ubuntu, Mint, etc.).


But until that happens this information should be added to any CG.
Although if I'm not mistaken this is not related to the "Linux Mint"
part of the section, isn't it?

Best
Urs

>
>
>

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Compiling LilyPond on Linux Mint 19.1

Urs Liska-3
In reply to this post by Urs Liska-3

Am 21.12.18 um 09:06 schrieb Urs Liska:

> Hi Lukas,
>
> thanks for putting this together. Indeed since installing a distro
> that doesn't Guile 1.8 anymore I hadn't been able to compile LilyPond
> anymore. Once I managed to compile Guile 1.8 and do a build but for
> some reason I lost this option. I think the point was that after
> compiling Guile I had to actually change the way LilyPond's make was
> handled - which of course isn't sustainable.
>
> I'm also running Linux Mint 19.1, and followed your command list (and
> the previous instructions from the CG). Except that I already had some
> of the dependencies installed everything worked flawlessly, and I
> could run a make to compile LilyPond, register that in Frescobaldi and
> compile a .ly file with it. A warning about missing URW fonts was the
> only issue I encountered. make doc took the expected ages but worked
> without errors too!
>
> So I can confirm that the steps work on Linux Mint 19.
>
> Janek Wachoł has written a few scripts to help managing multiple
> LilyPond builds, which I really appreciated when I had them working.
> Basically they provide a configuration layer around the compilation,
> then create a local clone of the main code repository and build from
> that copy. That makes it possible to have multiple different builds
> from different branches (or even states of a branch) in parallel. I
> will see if I can integrate that with compiling through a
> self-compiled Guile and report back. Maybe these scripts are of use
> for others as well.


I have looked again into these scripts and found that they (still) work
well.
The script that I suggest looking into is located at
https://github.com/jan-warchol/cli-tools/blob/master/lilypond/build-lily.sh

However, when it is considered of general use I'll ask Janek to extract
the script from his scripts collection.

In order to use the script two environment variables have to be exported
(presumably from .bashrc):

LILYPOND_GIT=/path/to/lilypond/source/repository
LILYPOND_BUILD_DIR=/path/to/root/of/lilypond-builds

When invoked without arguments the script will clone the source
repository in its current state to the "current" subdirectory of
LILYPOND_BUILD_DIR and build it from there.
Settings to build other branches (or combinations of branches) to other
target directories are described at the beginning of the script.

Does this look interesting to anybody?
Urs

>
> Best
> Urs
>
> Am 20.12.18 um 12:21 schrieb Lukas-Fabian Moser:
>> Folks,
>>
>> this is mostly to give a reference to those who might hit the same
>> problems that I had:
>>
>> I decided to switch from my ancient Linux Mint 17.3 to Linux Mint
>> 19.1 yesterday. In order to set up a working build environment, I had
>> to provide a working Guile 1.8 which seems not to be in the
>> repositories any more.
>>
>> So in addition to following the instructions given in
>> http://lilypond.org/doc/v2.19/Documentation/contributor/requirements-for-compiling-lilypond#linux-mint 
>> I also followed the most recent one of the various variations of
>> steps for compiling Guile 1.8 that Federico Bruni gave in October
>> 2017
>> (http://lilypond.1069038.n5.nabble.com/compiling-lilypond-in-debian-stretch-with-self-compiled-guile-1-8-td206683.html)
>>
>> git clone https://git.savannah.gnu.org/git/guile.git
>> cd guile
>> git checkout branch_release-1-8
>> ./autogen.sh
>> ./configure --disable-error-on-warning --prefix=/usr/local
>> make
>> sudo make install
>> sudo ldconfig
>>
>> echo "GUILE_CONFIG=/usr/local/bin/guile-config" >> ~/.bashrc
>>
>> Then, after restarting Bash, I could proceed to
>> http://lilypond.org/doc/v2.19/Documentation/contributor/configuring-make 
>> and successfully compile current Master.
>>
>> (On my system, the echo [...] >> ~/.bashrc command added the given
>> line without any new-line or whitespace, so I had to insert a newline
>> in an editor.)
>>
>>
>> Probably these instructions would need some more
>> testing/polishing/adjusting to other distributions before they could
>> reasonably be added to the Contributor's Guide, so I just thought it
>> might be helpful to collect them once more here. (In fact I did run
>> into a bit of trouble tonight, but this seems to have been because I
>> wanted to re-use my old lilypond git directory which had been used
>> for compiling on my old system, so it wasn't really a clean start.
>> This might also mean my procedure can't be guaranteed to work on a
>> really fresh Lilypond git folder, but I think they should - I removed
>> the old build/ folder before the first succesful compile, so there
>> shouldn't have been any remnants of earlier successful compilations.)
>>
>> Or would there have been a much easier way to success?
>>
>> (The upside for me: Now I have the necessary Python/Qt/Lilypond
>> bindings to also run current Frescobaldi from the git repository
>> following Urs's excellent instructions on
>> https://github.com/wbsoft/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux.)
>>
>> Best
>> Lukas
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> [hidden email]
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Compiling LilyPond on Linux Mint 19.1

H. S. Teoh
On Fri, Dec 21, 2018 at 07:06:43PM +0100, Urs Liska wrote:

>
> Am 21.12.18 um 09:06 schrieb Urs Liska:
> > Hi Lukas,
> >
> > thanks for putting this together. Indeed since installing a distro
> > that doesn't Guile 1.8 anymore I hadn't been able to compile
> > LilyPond anymore. Once I managed to compile Guile 1.8 and do a build
> > but for some reason I lost this option. I think the point was that
> > after compiling Guile I had to actually change the way LilyPond's
> > make was handled - which of course isn't sustainable.

Some time ago I ran into the same problem with Guile 1.8 no longer being
the default version of Guile in my distro (and in fact, not even
installable anymore from the official repo), but Lilypond does not work
with newer versions of Guile.  Furthermore, Python 2.7 is also no longer
the default in my distro, which is an added level of pain, though
luckily I can still install Python 2.7, it's just not the default Python
that would get invoked.

Fortunately, I can compile my own version of Guile 1.8 as you did.  Once
that is done, I found that I actually don't need to change LilyPond's
makefile; all I needed was to set $PATH and re-run LilyPond's autogen.sh
with the appropriate customizations, like this:

        PATH=/usr/src/guile-1.8/bin:$PATH ./autogen.sh \
                --with-python-include=/usr/include/python2.7/ \
                CFLAGS="-Wno-sequence-point" \
                LDFLAGS="-Wl,-rpath,/usr/src/guile-1.8/lib"

Of course, replace /usr/src/guile-1.8 with the path to wherever you
compiled Guile 1.8 (you don't actually need to install Guile 1.8
anywhere on your system; autogen.sh appeared smart enough to pick up the
right files from Guile's source directory once that's built, and once
you hacked $PATH to pick up Guile 1.8 before anything else); and replace
/usr/include/python2.7 with wherever your distro installed Python 2.7's
include files.

After running this step, you should be able to just run make as usual,
and it should be able to build Lilypond successfully.

(I have put the above autogen.sh invocation in a script that I keep with
my lilypond git clone, so that I don't have to type all of that every
time!  Though, truth be told, you really only need to re-run autogen.sh
if you have a fresh git clone / source download, or you did a deep
cleaning of the source tree. I found that I could still just run make
after `git pull` without needing to run autogen.sh again.)

Hope this info helps.


T

--
Leather is waterproof.  Ever see a cow with an umbrella?

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Compiling LilyPond on Linux Mint 19.1

Knut Petersen
In reply to this post by Lukas-Fabian Moser
On 20.12.18 12:21, Lukas-Fabian Moser wrote:
> Folks,
>
> this is mostly to give a reference to those who might hit the same problems that I had:
>
> I decided to switch from my ancient Linux Mint 17.3 to Linux Mint 19.1 yesterday. In order to set up a working build environment, I had to provide a working Guile 1.8 which seems not to be in the repositories any more.

Have a look at the build script attached to https://lists.gnu.org/archive/html/bug-lilypond/2017-08/msg00038.html

Knut



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user