1 article(LilyPond on W32)
2 (Jan Nieuwenhuizen and Jeffrey Reed)
5 No, there's no reason to be concered, Lily should work in
6 Windows-NT(/95/98?) too. The setup may not be easy or smooth. This
7 document will help you getting started.
11 If you have the Cygnus gnu-windows32 port of the GNU utils, LilyPond
12 will work in Windows-NT (/95/98?).
14 We still recommend you use Unix. In particular, use GNU/Linux: We've
15 been there, and we've seen it happen several times. It is bf(much)
16 easier and quicker to install RedHat Linux and LilyPond than to
17 obtain, compile and install all the necessary tools to compile and run
20 ``Ok, thanks for the suggestions. I can't run Linux or I don't want
21 to run Unix. What can I expect?''
24 it()LilyPond development is moving quite fast, and all developers use Unix.
25 Newly added features may require some attention to get them to work.
26 it()LilyPond depends on a number of other packages that usually are
27 available on Unix boxes, but are not installed by default on Windows.
32 Like Yodl, LilyPond will now install/extract in a unix-like tree:
35 usr/[local/]share/lilypond/*
39 Both Yodl and Lily run in a the unix-like Cygnus gnu-windows environment;
40 hopefully Cygnus will adopt the file(/usr/[local/]) tree too.
43 If you really don't want usr/ in your root directory, but rather scatter
44 your programs and packages all over your harddisk, do something like:
48 unzip ../lilypond-0.1.77.exe.zip
50 and add file(lilypond/usr/bin) to your file(PATH) and
51 file(lilypond/usr/share/lilypond) to your file(LILYINCLUDE).
54 subsect(BUILDING LILYPOND)
56 If you've received a binary release of LilyPond (file(.exe.zip)),
57 you may skip the following sections.
61 It can be done! Occasionally, the Cygnus b19.1 cross compiler and
62 utilities under GNU/Linux are used to make the binary file(.exe.zip)
63 releases (some makefile hacking was needed to build this stuff). Jeffrey
64 Reed tries to keep-up with LilyPond development, and is doing quite
65 well. His latest release is available on
66 lurl(http://www.realtime.net/~daboys/lilypond/).
70 I have heard of such tools that think they're probably much smarter than the
71 packager and thus decide for themselves that they don't need to unpack certain
72 files (e.g., empty directories such as bin/out).
74 To unpack the lilypond sources, you should do something like: verb(
75 tar zxf releases/lilypond-x.y.z.tar.gz
80 If you're familiar with the GNU/Cygnus development package, you may skip
85 /start/settings/control-panel/system/environment/system-variables:
86 GCC_EXEC_PREFIX=/Cygnus/b19/H-i386-cygwin32/lib/gcc-lib/
89 You want to run bash, while building Lily:
94 The install instructions mention something like:
101 Now for a small UNIX lesson: The current working directory (cwd) is
102 by default not in your PATH, like it is under DOS (for security reasons).
103 Check this by looking at the output of:
107 The cwd looks like code('::') or code(':.'). If it's not there, you may
108 add the cwd to your path:
112 or you must use './' when issuing a command in th cwd, try:
118 sect(LILYPOND Windows-NT Support -- by Jeffrey Reed)
120 My point of reference comes from 15 odd years working with a variety
121 of tt(UNIX) platforms. I am relatively new to Windows-NT and, even
122 though I am a card carrying tt(UNIX) bigot, I am excited about the
123 NT OS. My goals for lilypond are to give back to the Free Software
124 Foundation a little of what they have given me over the years and to
125 contribute to the lilypond project by supporting a Windows-NT port. I
126 hope that someday we can distribute and run lilypond on the NT OS in a
127 much more native fashion.
130 it()link(Building lilypond on tt(Windows-NT))(build)
131 it()link(Maintaining lilypond on tt(Windows-NT))(maintain)
132 it()link(Running lilypond on tt(Windows-NT))(run)
136 subsect(Building lilypond on Windows-NT) label(build)
137 Currently as stated above lilypond is primarily a tt(UNIX) thing.
138 The Windows-NT port is based on the tt(UNIX) environment provided by
139 url(Cygnus)(http://www.cygnus.com). Therefore the first step is to
140 download and install the Cygnus development kit:
142 subsubsect(Cygnus Development Kit)
143 lurl(http://www.cygnus.com/misc/gnu-win32/)
146 Please follow the documentation Cygnus has on there web site for
147 downloading and installing. The important part is that you down load
148 the entire development kit. I believe it is file(cdk.exe). The
149 installation will ask you where you want to install it. I will refer
150 to Cygnus installation directory as file(/gnuwin32/b19). There should be a
151 file(README) file that contains installation instructions. After the
152 installation is complete you should have a em(Cygnus) shortcut in your
153 em(Program) section of your em(Start Menu). This shortcut is your
154 door to the tt(UNIX) world and I will refer to the resulting window
155 as a file(bash) shell.
157 The shortcut points to file(/gnuwin32/b19/cygnus.bat). The following
158 is my file(cygnus.bat) file.
162 rem default environment
164 rem GNU cygnus installation
168 SET LOCAL_ROOT=d:\gnuwin32
169 SET LOCAL_FS=d:/gnuwin32
170 SET LOCAL_DIR=/gnuwin32
171 SET CYGROOT=%LOCAL_ROOT%\b19
172 SET CYGFS=%LOCAL_FS%/b19
173 SET GCC_EXEC_PREFIX=%CYGROOT%\H-i386-cygwin32\lib\gcc-lib\
174 SET TCL_LIBRARY=%CYGROOT%\share\tcl8.0\
175 SET GDBTK_LIBRARY=%CYGFS%/share/gdbtcl
177 rem This was not in the original but is needed by lots of packages
178 SET BISON_SIMPLE=%CYGFS%/share/bison.simple
180 rem I place the cygnus stuff in front of /WINNT
181 SET PATH=d:\bin;%CYGROOT%\H-i386-cygwin32\bin;%PATH%
182 SET MANPATH=%LOCAL_ROOT%\man;%LOCAL_ROOT%\b19\man;%LOCAL_ROOT%\b19\cdk-man\man;%LOCAL_ROOT%\a2ps-4.10\man
183 SET INFOPATH=%LOCAL_FS%/b19/cdk-man/info;%LOCAL_FS%/b19/info;%LOCAL_DIR%/info
184 SET PATH=%PATH%;%LOCAL_ROOT%\bin
187 rem General tools not included with Cygnus Development Kit
192 SET PATH=%PATH%;%LOCAL_ROOT%\cvs-1.9.28\bin
193 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/cvs-1.9.28/info
194 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\cvs-1.9.28\man
198 SET PATH=%PATH%;%LOCAL_ROOT%\emacs-19.34\bin
199 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/emacs-19.34/info
203 SET VIM=%LOCAL_ROOT%\vim-4.6\doc
204 SET PATH=%PATH%;%LOCAL_ROOT%\vim-4.6
208 SET PATH=%PATH%;%LOCAL_ROOT%\texmf\miktex\bin
212 SET PATH=%PATH%;%LOCAL_ROOT%\a2ps-4.10\bin
213 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/a2ps-4.10/info
214 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\a2ps-4.10\man
218 SET PATH=%PATH%;\Program Files\Python
226 SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.30.0.pre10\bin
227 set MANPATH=%MANPATH%;%LOCAL_ROOT%\yodl-1.30.0.pre10\man
233 Please look over this carefully. Be careful with the forward and
234 backward slash notations. The paths specified were done for good
235 reasons. Maybe someday we will all be using code(UNC). Note the
236 tt(BISON) entry and the tt(PATH) ordering in particular. Also note
237 that the generic file(cygnus.bat) you will be looking at does not
238 include alot of the packages listed. We will be installing some of
241 There is also some discussion of how you want to em(mount) the Cygnus
242 development kit. em(mount) is a tt(UNIX) term that refers to the
243 mechanism used to provide a disk resource to the filesystem. Cygnus
244 supplies a mechinism for em(mounting) a filesystem as a tt(DOS) like
245 resource or a tt(UNIX) like resource. Among other things this
246 attempts to deal with the text file carriage return line feed on
247 tt(DOS) versus the line feed on tt(UNIX) and the issue that tt(DOS)
248 has two file types, text and binary. Where tt(UNIX) deals with a
249 single streams type. I have used the default out of the box
250 configuration with no problems. We will however later discuss
251 mounting a directory as a binary resource ref(binary).
253 The installation also suggests that you create a directory file(/bin)
254 and copy file(/gnuwin32/b19/H-i386-cygwin32/bin/sh.exe) to file(/bin).
255 The file(sh.exe) shell provided by Cygnus is a descendant of the
256 file(ash) shell and I have found that some of the tt(GNU) products
257 configure/installations work better with the file(bash) shell. So
258 this is my recommendation for post installation steps. From a
265 it()code(cp /gnuwin32/b19/H-i386-cygwin32/bin/bash.exe sh.exe)
268 it()code(chmod a+rwx tmp)
271 it()code(mkpasswd -l > passwd)
272 it()code(mkgroup -l > group)
275 subsubsect(Ecgs Compiler, assembler, and linker)
276 lurl(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html)
279 Cygnus recommends using the ecgs compiler. I do too. Follow the
280 instructions from the above site to install ecgs compiler/linker and
281 the gas assembler. We have attempted to compile lilypond with the
282 Cygnus default compiler/linker with poor results. So for lilypond
283 anyway this step is a requirement.
285 I took the following steps to download and install the ecgs suite.
286 Keep in mind that it is better to follow the instructions from the
291 url(egcs-1.0.2-cygb19.tar.gz)(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/b19-releases/egcs-1.0.2-cygb19.tar.gz)
294 url(gas-980303-cygb19.tar.gz)(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/b19-releases/gas-980303-cygb19.tar.gz)
297 url(INSTALL)(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-cygb19-install.html)
302 it() cd $CYGFS/include
305 it() tar zxf /tmp/gas-980303-cygb19.tar.gz
306 it() tar zxf /tmp/egcs-1.0.2-cygb19.tar.gz
309 You now have a compiler, assembler, linker combination capable of
312 subsubsect(bf(GNU)'s Internationalization Package)
313 lurl(http://www.gnu.org/order/ftp.html)
315 Considering the origin of the major contributors of lilypond, this is a
316 must. However before we actually do a bf(GNU) build we have to
317 discuss some caveats of the Windows-NT OS in particular the naming of
318 executable files. tt(Windows-NT) uses a .exe extension where tt(UNIX)
319 does not use an extension. This causes a problem during the
320 installation portion of a bf(GNU) build. The following script can be
321 used to help alleviate this problem.
326 realinstall=/gnuwin32/b19/H-i386-cygwin32/bin/install.exe
331 -*CHAR(41) args="$args $1"
334 *CHAR(41) if [ -f $1.exe ]; then
347 I place this in script file(~/bin). The LilyPond configure, build,
348 and install process handles this with it's own install script. In
349 addition there are patches to the cygnus install command that also
350 deals with this problem. Having said that, here is how one
351 might build the em(gettext) package.
354 it() download the package from one of the ftp sites.
355 it() From a bash shell, cd ~/usr/src.
356 it() tar zxf gettext-0.10.tar.gz
358 it() ./configure --prefix=$CYGFS/H-i386-cygwin32
363 subsubsect(bf(GNU)'s roff package)
364 lurl(http://www.gnu.org/order/ftp.html)
366 Following the instructions for em(gettext) package to download, build,
367 and install the em(groff) package.
369 subsubsect(Python Programing Language)
370 lurl(http://www.python.org)
372 Python is the scripting language of choice for a lilypond build.
373 There is a native tt(Windows-NT) self extracting binary distribution
374 available. I recommend installing Python in a directory that does
375 bf(not) have spaces. And then place it in the bash shell path by
376 editing $CYGFS/cygnus.bat.
378 subsubsect(Perl Programing Language)
379 lurl(http://www.cpan.org)
381 I believe perl is used in some legacy scripts to date. There is a
382 native tt(Windows-NT) self extracting binary distribution available.
383 I recommend installing Perl in a directory that does bf(not) have
384 spaces. And then place it in the bash shell path by editing
387 subsubsect(Yodl Document Language)
388 lurl(http://www.xs4all.nl/~jantien/yodl/)
390 Yodl for documentation in LilyPond. It is currently being updated by
391 Jan Nieuwenhuizen. The development methodology of em(Yodl) as well as
392 em(LilyPond) relies on a the following directory structure:
404 dit(releases/) Downloaded and generated releases live here. For
405 example file(yodl-1.30.0.pre12.tar.gz) and
406 file(lilypond-0.1.81.tar.gz).
408 dit(patches/) Downloaded and generated patches live here. For
409 example file(yodl-1.30.0.pre12.diff.gz) and
410 file(lilypond-0.1.81.diff.gz).
412 dit(test/) This directory is used to generate releases and patches.
416 I strongly recommend using this file structure to build em(yodl) and
420 it() download the package from
421 lurl(http://www.xs4all.nl/~jantien/yodl/) to
422 file($HOME/usr/src/releases).
423 it() From a bash shell, cd file($HOME/usr/src).
424 it() tar zxf releases/yodl-em(<version>).tar.gz
425 it() cd yodl-em(<version>)
426 it() ./configure --prefix=/gnuwin32/yodl-em(<version>) --srcdir=.
427 Since em(yodl) is under development I choose to install it in a
428 version rooted directory. This allows me to test newly released
429 versions without losing a known working version.
432 it() place it in the bash shell path by editing $CYGFS/cygnus.bat.
437 SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.30.0.pre12\bin
442 subsubsubsect(Yodl build CAVEAT)
444 em(yodl) uses the em(stepmake) package for it's build methodology.
445 The build of em(stepmake) documentation will fail due to the fact
446 that em(yodl) is not yet installed. This is normal and shouldn't be a
449 subsubsect(LilyPond) label(lilybuild)
451 it() download the package from
452 lurl(http://www.cs.uu.nl/people/hanwen/lilypond/) to
453 file($HOME/usr/src/releases).
454 it() From a bash shell, cd file($HOME/usr/src).
455 it() tar zxf releases/lilypond-em(<version>).tar.gz
456 it() cd lilypond-em(<version>)
457 it() ./configure --prefix=/gnuwin32/lilypond-em(<version>) \ nl()
459 --enable-tex-prefix=/gnuwin32/lilypond-em(<version>)/texmf \ nl()
460 --enable-tex-dir=/gnuwin32/lilypond-em(<version>)/texmf/tex \ nl()
461 --enable-mf-dir=/gnuwin32/lilypond-em(<version>)/texmf/mf nl()
462 Since em(lilypond) is under development I choose to install it in a
463 version rooted directory. This allows me to test newly released
464 versions without losing a known working version.
467 it() place it in the bash shell path by editing $CYGFS/cygnus.bat.
472 SET PATH=%PATH%;%LOCAL_ROOT%\lilypond-0.1.80\bin
477 subsect(Maintaining lilypond on Windows-NT) label(maintain)
479 If you have built em(lilypond) on tt(Windows-NT) using the directory
480 structure described link(previously)(dirstr) and the process described
481 in section ref(lilybuild), then you are ready to maintain
482 em(lilypond). It can not be that easy!? Well, there is one caveat.
483 Currently to use the file(stepmake/bin/release.py) and
484 file(stepmake/bin/package-diff.py) scripts you need to obtain/build a
485 version of em(python) that was built with bf(Cygnus) development kit.
486 The process I used is as follows:
489 it() obtain python source from lurl(http://www.python.org)
490 it() tar zxf /tmp/python-em(<version>).tar.gz
491 it() cd python-em(<version>)
492 it() configure --prefix=/gnuwin32/python-em(<version>)
493 it() edit toplevel file(Makefile) code(EXE) macro so it reads code(EXE=.exe)
496 it() place it in the bash shell path by editing $CYGFS/cygnus.bat.
501 SET PATH=%PATH%;%LOCAL_ROOT%\python-1.5.1\bin
506 I choose to build em(lilypond) with the standard tt(Windows-NT)
507 em(python) and use the bf(Cygnus) version for using the release
508 scripts. This way I can make sure the tt(Windows-NT) em(python)
509 version is able to build em(lilypond). Currently there are several
510 issues with the release scripts. Using code(os.link) and
511 code(os.system(set -x;...)) are to name a few.
513 To generate a new release and patch you must use the directory
514 structure described link(previously)(dirstr). And follow the
515 instructions found in file(PATCH.txt). Editing
516 file(Documentation/AUTHORS.yo), file(VERSION), and file(NEWS) is also
517 required. When my edits are complete and tested I:
520 it() Edit file(config.make) and change em(python) path to the
521 bf(Cygnus) version: code(PYTHON=/gnuwin32/Python-1.5.1/bin/python).
525 The new release is placed in file(releases) directory and the patch is
526 placed in the file(patches) directory. I email the new patch to
527 email(gnu-music-discuss@gnu.org). More than one patch a day can be
531 it() cd $HOME/usr/src
532 it() tar zxf releases/lilypond-em(<version>).em(<patchlevel>)
533 it() use your normal configure
535 it() Change file(VERSION) to increment em(<patchlevel>)
536 it() Change file(NEWS)
540 subsect(Running lilypond on Windows-NT) label(run)
542 We are now distributing a formated binary distribution for
543 Windows-NT. Please refer to
544 lurl(http://www.realtime.net/~daboys/lilypond/) for current news,
545 download, installation, and running information.
547 Jeffrey B. Reed email(daboys@bga.com)
550 sect(RUNNING LILYPOND -- by Dominique Cretel)
552 You may want to refer to section ref(run), for more current
553 information about downloading, installing, and running the Windows-NT
557 eit() First, I have download tha 0.1.64 version of LilyPond music software.
559 eit() Then I extract it in a temp directory, and I move the directory
560 "lilypond-0.1.64" to the root directory of my D drive.
562 eit() I go to the D:\Lilypond-0.1.64\tex directory to modify the
563 lilyponddefs.tex file (lines 75 and 84), and comment all
564 cmbx15 ans cmbx14, and replace them by cmbx12.
566 eit() build a command file like this:
567 Note: I use MiKTeX to process the tex file generated.
573 set path=%path%;d:\lilypond-%ver%\bin
574 lilypond -I d:\lilypond-%ver%\init %1
577 set path=c:\texmf\miktex\bin;%path%
578 set TEXINPUTS=%TEXINPUTS%;d:\lilypond-%ver%\tex
579 set MFINPUTS=%MFINPUTS%;d:\lilypond-%ver%\mf
586 set path=%path%;d:\gstools\gsview
591 eit() execute lilypond by doing:
599 You'll better have to put the SET commands lines in a separate command
600 file to avoid consumming each time environnment ressources.
603 Dominique Cretel email(dominique.cretel@cfwb.be)
606 sect(PROBLEMS AND ANWSWERS)
608 subsect(CONFIGURE AND INSTALL)
609 This is all to confusing. I have:
611 eit() downloaded file(/tmp/lilypond-0.1.78.tar.gz)
616 tar zxf /tmp/lilypond-0.1.78.tar.gz
619 ./configure --prefix=/users/jeff/lilypond-0.1.78 \\\
621 --enable-tex-prefix=/users/jeff/lilypond-0.1.78/texmf \\\
623 --enable-tex-dir=/users/jeff/lilypond-0.1.78/texmf/tex \\\
625 --enable-mf-dir=/users/jeff/lilypond-0.1.78/texmf/mf
635 I did have a problem with lilypond.info. And I will look into this
636 further. After mending lilypond.info issue, it compiled and install
639 I have 64 Meg of physical memory and 64 Meg of swap. Actually I need
640 to increase the swap space. If a memory problem is occuring it most
641 likely is during the link process of lilypond. There is a boat load
644 Jan the mount -b stuff is confussing to me. I have the entire system
645 mounted _without_ -b and only use -b on certain paths for programs
646 that create binary files that do not use O_BINARY open option. By the
647 way the midi file open is one of these cases, I need to look into
648 that. I have had no problems with this methodology.
653 The windows multiroot filesystem is an utterly broken concept. Please
654 do everything on one (urg) drive, C:.
658 > creating cache ./config.cache
660 > creating config.make
662 > cd: lstat /d failed
665 Ok, this looks like another stupid windows problem.
666 You're working on 'drive D:', right?
668 I can think of some solutions, but i don't know if they work;
669 i just had to do some work in windows some time ago. If you
670 have problems with this, please ask email(gnu-win32@cygnus.com).
671 I'll start with the simplest:
673 it() do everything on drive C:, or
674 it() explicitely mount drive d:, work from there:
678 cd /mnt/d/lilypond-x.y.z/
680 it() make d:/ the root of cygnus, in cmd.exe/command.exe do:
688 subsect(INSTALLING TOOLS)
690 > - First I have installed Python (for win32) "Pyth151.exe" and "Configure
692 > don't find it. I had to put it in the path for configure find it?
695 Yes, of course. It should be possible to have different versions of tools
696 installed (e.g. perl 4 and perl 5). The best way to tell people (or tools
697 like configure) which one to use is to put it in the path?
699 Another small unix lesson: Where under dos each program installs itself
700 into a nice directory
704 under unix, installation is handled centrally. Executables go in
705 file(/usr/bin) (or file(/usr/local/bin)), and are always in your path.
707 subsect(VIRTUAL MEMORY)
710 > 4. make -C lily don't work. I get an error (see below). I get several
711 > object files in the ./lily/out directory (34 files: 17 *.dep, 16 *.o,
714 > include/engraver-group.hh:35: virtual memory exhausted
715 > make: *** [out/bar-grav.o] Error 1
720 Ok, so everything works now, there's only some error with one of the
721 source files. Lets see which one (and now the cc's now why they're
724 It looks like you've run out of memory. You should compile without
725 optimisation, gcc/egcs need a lot of memory for optimising.
726 Reconfigure without optimisation:
728 configure --disable-optimise
730 or edit file(config.make):
732 ## USER_CXXFLAGS = -g # -O no optimise!
736 There are some other things to look at: how much RAM do you have
737 (please say something > 8Mb :-)? Although it might be an egcs bug,
738 you should have a look at the size of your swap file.
739 For an US version of windows, you should find it here:
741 /start/settings/control-panel/system/performance/virtual-memory
743 you see, amongst others, these entries:
745 paging file size for selected drive:
751 total paging file size for all drives
753 currently allocated: xx
762 it() maximum-size >= 128 Mb
763 it() urrently-allocated + space-available >= 128 Mb