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 well.
68 I have heard of such tools that think they're probably much smarter than the
69 packager and thus decide for themselves that they don't need to unpack certain
70 files (e.g., empty directories such as bin/out).
72 To unpack the lilypond sources, you should do something like: verb(
73 tar zxf releases/lilypond-x.y.z.tar.gz
78 If you're familiar with the GNU/Cygnus development package, you may skip
83 /start/settings/control-panel/system/environment/system-variables:
84 GCC_EXEC_PREFIX=/Cygnus/b19/H-i386-cygwin32/lib/gcc-lib/
87 You want to run bash, while building Lily:
92 The install instructions mention something like:
99 Now for a small UNIX lesson: The current working directory (cwd) is
100 by default not in your PATH, like it is under DOS (for security reasons).
101 Check this by looking at the output of:
105 The cwd looks like code('::') or code(':.'). If it's not there, you may
106 add the cwd to your path:
110 or you must use './' when issuing a command in th cwd, try:
116 sect(LILYPOND Windows-NT Support -- by Jeffrey Reed)
118 My point of reference comes from 15 odd years working with a variety
119 of tt(UNIX) platforms. I am relatively new to Windows-NT and, even
120 though I am a card carrying tt(UNIX) bigot, I am excited about the
121 NT OS. My goals for lilypond are to give back to the Free Software
122 Foundation a little of what they have given me over the years and to
123 contribute to the lilypond project by supporting a Windows-NT port. I
124 hope that someday we can distribute and run lilypond on the NT OS in a
125 much more native fashion.
128 it()link(Building lilypond on tt(Windows-NT))(build)
129 it()link(Maintaining lilypond on tt(Windows-NT))(maintain)
130 it()link(Running lilypond on tt(Windows-NT))(run)
134 subsect(Building lilypond on Windows-NT) label(build)
135 Currently as stated above lilypond is primarily a tt(UNIX) thing.
136 The Windows-NT port is based on the tt(UNIX) environment provided by
137 url(Cygnus)(http://www.cygnus.com). Therefore the first step is to
138 download and install the Cygnus development kit:
140 subsubsect(Cygnus Development Kit)
141 lurl(http://www.cygnus.com/misc/gnu-win32/)
144 Please follow the documentation Cygnus has on there web site for
145 downloading and installing. The important part is that you down load
146 the entire development kit. I believe it is file(cdk.exe). The
147 installation will ask you where you want to install it. I will refer
148 to Cygnus installation directory as file(/gnuwin32/b19). There should be a
149 file(README) file that contains installation instructions. After the
150 installation is complete you should have a em(Cygnus) shortcut in your
151 em(Program) section of your em(Start Menu). This shortcut is your
152 door to the tt(UNIX) world and I will refer to the resulting window
153 as a file(bash) shell.
155 The shortcut points to file(/gnuwin32/b19/cygnus.bat). The following
156 is my file(cygnus.bat) file.
160 rem default environment
162 rem GNU cygnus installation
166 SET LOCAL_ROOT=d:\gnuwin32
167 SET LOCAL_FS=d:/gnuwin32
168 SET LOCAL_DIR=/gnuwin32
169 SET CYGROOT=%LOCAL_ROOT%\b19
170 SET CYGFS=%LOCAL_FS%/b19
171 SET GCC_EXEC_PREFIX=%CYGROOT%\H-i386-cygwin32\lib\gcc-lib\
172 SET TCL_LIBRARY=%CYGROOT%\share\tcl8.0\
173 SET GDBTK_LIBRARY=%CYGFS%/share/gdbtcl
175 rem This was not in the original but is needed by lots of packages
176 SET BISON_SIMPLE=%CYGFS%/share/bison.simple
178 rem I place the cygnus stuff in front of /WINNT
179 SET PATH=d:\bin;%CYGROOT%\H-i386-cygwin32\bin;%PATH%
180 SET MANPATH=%LOCAL_ROOT%\man;%LOCAL_ROOT%\b19\man;%LOCAL_ROOT%\b19\cdk-man\man;%LOCAL_ROOT%\a2ps-4.10\man
181 SET INFOPATH=%LOCAL_FS%/b19/cdk-man/info;%LOCAL_FS%/b19/info;%LOCAL_DIR%/info
182 SET PATH=%PATH%;%LOCAL_ROOT%\bin
185 rem General tools not included with Cygnus Development Kit
190 SET PATH=%PATH%;%LOCAL_ROOT%\cvs-1.9.28\bin
191 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/cvs-1.9.28/info
192 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\cvs-1.9.28\man
196 SET PATH=%PATH%;%LOCAL_ROOT%\emacs-19.34\bin
197 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/emacs-19.34/info
201 SET VIM=%LOCAL_ROOT%\vim-4.6\doc
202 SET PATH=%PATH%;%LOCAL_ROOT%\vim-4.6
206 SET PATH=%PATH%;%LOCAL_ROOT%\texmf\miktex\bin
210 SET PATH=%PATH%;%LOCAL_ROOT%\a2ps-4.10\bin
211 SET INFOPATH=%INFOPATH%;%LOCAL_FS%/a2ps-4.10/info
212 SET MANPATH=%MANPATH%;%LOCAL_ROOT%\a2ps-4.10\man
216 SET PATH=%PATH%;\Program Files\Python
224 SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.30.0.pre10\bin
225 set MANPATH=%MANPATH%;%LOCAL_ROOT%\yodl-1.30.0.pre10\man
231 Please look over this carefully. Be careful with the forward and
232 backward slash notations. The paths specified were done for good
233 reasons. Maybe someday we will all be using code(UNC). Note the
234 tt(BISON) entry and the tt(PATH) ordering in particular. Also note
235 that the generic file(cygnus.bat) you will be looking at does not
236 include alot of the packages listed. We will be installing some of
239 There is also some discussion of how you want to em(mount) the Cygnus
240 development kit. em(mount) is a tt(UNIX) term that refers to the
241 mechanism used to provide a disk resource to the filesystem. Cygnus
242 supplies a mechinism for em(mounting) a filesystem as a tt(DOS) like
243 resource or a tt(UNIX) like resource. Among other things this
244 attempts to deal with the text file carriage return line feed on
245 tt(DOS) versus the line feed on tt(UNIX) and the issue that tt(DOS)
246 has two file types, text and binary. Where tt(UNIX) deals with a
247 single streams type. I have used the default out of the box
248 configuration with no problems. We will however later discuss
249 mounting a directory as a binary resource ref(binary).
251 The installation also suggests that you create a directory file(/bin)
252 and copy file(/gnuwin32/b19/H-i386-cygwin32/bin/sh.exe) to file(/bin).
253 The file(sh.exe) shell provided by Cygnus is a descendant of the
254 file(ash) shell and I have found that some of the tt(GNU) products
255 configure/installations work better with the file(bash) shell. So
256 this is my recommendation for post installation steps. From a
263 it()code(cp /gnuwin32/b19/H-i386-cygwin32/bin/bash.exe sh.exe)
266 it()code(chmod a+rwx tmp)
269 it()code(mkpasswd -l > passwd)
270 it()code(mkgroup -l > group)
273 subsubsect(Ecgs Compiler, assembler, and linker)
274 lurl(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html)
277 Cygnus recommends using the ecgs compiler. I do too. Follow the
278 instructions from the above site to install ecgs compiler/linker and
279 the gas assembler. We have attempted to compile lilypond with the
280 Cygnus default compiler/linker with poor results. So for lilypond
281 anyway this step is a requirement.
283 I took the following steps to download and install the ecgs suite.
284 Keep in mind that it is better to follow the instructions from the
289 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)
292 url(gas-980303-cygb19.tar.gz)(ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin32/b19-releases/gas-980303-cygb19.tar.gz)
295 url(INSTALL)(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-cygb19-install.html)
300 it() cd $CYGFS/include
303 it() tar zxf /tmp/gas-980303-cygb19.tar.gz
304 it() tar zxf /tmp/egcs-1.0.2-cygb19.tar.gz
307 You now have a compiler, assembler, linker combination capable of
310 subsubsect(bf(GNU)'s Internationalization Package)
311 lurl(http://www.gnu.org/order/ftp.html)
313 Considering the origin of the major contributors of lilypond, this is a
314 must. However before we actually do a bf(GNU) build we have to
315 discuss some caveats of the Windows-NT OS in particular the naming of
316 executable files. tt(Windows-NT) uses a .exe extension where tt(UNIX)
317 does not use an extension. This causes a problem during the
318 installation portion of a bf(GNU) build. The following script can be
319 used to help alleviate this problem.
324 realinstall=/gnuwin32/b19/H-i386-cygwin32/bin/install.exe
329 -*CHAR(41) args="$args $1"
332 *CHAR(41) if [ -f $1.exe ]; then
345 I place this in script file(~/bin). Having said that here is how one
346 might build the em(gettext) package.
349 it() download the package from one of the ftp sites.
350 it() From a bash shell, cd ~/usr/src.
351 it() tar zxf gettext-0.10.tar.gz
353 it() ./configure --prefix=$CYGFS/H-i386-cygwin32
358 subsubsect(bf(GNU)'s roff package)
359 lurl(http://www.gnu.org/order/ftp.html)
361 Following the instructions for em(gettext) package to download, build,
362 and install the em(groff) package.
364 subsubsect(Python Programing Language)
365 lurl(http://www.python.org)
367 Python is the scripting language of choice for a lilypond build.
368 There is a native tt(Windows-NT) self extracting binary distribution
369 available. I recommend installing Python in a directory that does
370 bf(not) have spaces. And then place it in the bash shell path by
371 editing $CYGFS/cygnus.bat.
373 subsubsect(Perl Programing Language)
374 lurl(http://www.cpan.org)
376 I believe perl is used in some legacy scripts to date. There is a
377 native tt(Windows-NT) self extracting binary distribution available.
378 I recommend installing Perl in a directory that does bf(not) have
379 spaces. And then place it in the bash shell path by editing
382 subsubsect(Yodl Document Language)
383 lurl(http://www.digicash.com/~jan/yodl/)
385 Yodl for documentation in Lilypond. It is currently being updated by
386 Jan Nieuwenhuizen. The development methodology of em(Yodl) as well as
387 em(LilyPond) relies on a the following directory structure:
399 dit(releases/) Downloaded and generated releases live here. For
400 example file(yodl-1.30.0.pre12.tar.gz) and
401 file(lilypond-0.1.81.tar.gz).
403 dit(patches/) Downloaded and generated patches live here. For
404 example file(yodl-1.30.0.pre12.diff.gz) and
405 file(lilypond-0.1.81.diff.gz).
407 dit(test/) This directory is used to generate releases and patches.
411 I strongly recommend using this file structure to build em(yodl) and
415 it() download the package from
416 lurl(http://www.digicash.com/~jan/yodl/) to
417 file($HOME/usr/src/releases).
418 it() From a bash shell, cd file($HOME/usr/src).
419 it() tar zxf releases/yodl-em(<version>).tar.gz
420 it() cd yodl-em(<version>)
421 it() ./configure --prefix=/gnuwin32/yodl-em(<version>) --srcdir=.
422 Since em(yodl) is under development I choose to install it in a
423 version rooted directory. This allows me to test newly released
424 versions without losing a known working version.
427 it() place it in the bash shell path by editing $CYGFS/cygnus.bat.
432 SET PATH=%PATH%;%LOCAL_ROOT%\yodl-1.30.0.pre12\bin
437 subsubsubsect(Yodl build CAVEAT)
439 em(yodl) uses the em(stepmake) package for it's build methodology.
440 The build of em(stepmake) documentation will fail due to the fact
441 that em(yodl) is not yet installed. This is normal and shouldn't be a
444 subsubsect(Lilypond) label(lilybuild)
446 it() download the package from
447 lurl(http://www.cs.uu.nl/people/hanwen/lilypond/) to
448 file($HOME/usr/src/releases).
449 it() From a bash shell, cd file($HOME/usr/src).
450 it() tar zxf releases/lilypond-em(<version>).tar.gz
451 it() cd lilypond-em(<version>)
452 it() ./configure --prefix=/gnuwin32/lilypond-em(<version>) \ nl()
454 --enable-tex-prefix=/gnuwin32/lilypond-em(<version>)/texmf \ nl()
455 --enable-tex-dir=/gnuwin32/lilypond-em(<version>)/texmf/tex \ nl()
456 --enable-mf-dir=/gnuwin32/lilypond-em(<version>)/texmf/mf nl()
457 Since em(lilypond) is under development I choose to install it in a
458 version rooted directory. This allows me to test newly released
459 versions without losing a known working version.
462 it() place it in the bash shell path by editing $CYGFS/cygnus.bat.
467 SET PATH=%PATH%;%LOCAL_ROOT%\lilypond-0.1.80\bin
472 subsect(Maintaining lilypond on Windows-NT) label(maintain)
474 If you have built em(lilypond) on tt(Windows-NT) using the directory
475 structure described link(previously)(dirstr) and the process described
476 in section ref(lilybuild), then you are ready to maintain
477 em(lilypond). It can not be that easy!? Well, there is one caveat.
478 Currently to use the file(stepmake/bin/release.py) and
479 file(stepmake/bin/package-diff.py) scripts you need to obtain/build a
480 version of em(python) that was built with bf(Cygnus) development kit.
481 The process I used is as follows:
484 it() obtain python source from lurl(http://www.python.org)
485 it() tar zxf /tmp/python-em(<version>).tar.gz
486 it() cd python-em(<version>)
487 it() configure --prefix=/gnuwin32/python-em(<version>)
488 it() edit toplevel file(Makefile) code(EXE) macro so it reads code(EXE=.exe)
491 it() place it in the bash shell path by editing $CYGFS/cygnus.bat.
496 SET PATH=%PATH%;%LOCAL_ROOT%\python-1.5.1\bin
501 I choose to build em(lilypond) with the standard tt(Windows-NT)
502 em(python) and use the bf(Cygnus) version for using the release
503 scripts. This way I can make sure the tt(Windows-NT) em(python)
504 version is able to build em(lilypond). Currently there are several
505 issues with the release scripts. Using code(os.link) and
506 code(os.system(set -x;...)) are to name a few.
508 To generate a new release and patch you must use the directory
509 structure described link(previously)(dirstr). And follow the
510 instructions found in file(PATCH.txt). Editing
511 file(Documentation/AUTHORS.yo), file(VERSION), and file(NEWS) is also
512 required. When my edits are complete and tested I:
515 it() Edit file(config.make) and change em(python) path to the
516 bf(Cygnus) version: code(PYTHON=/gnuwin32/Python-1.5.1/bin/python).
520 The new release is placed in file(releases) directory and the patch is
521 placed in the file(patches) directory. I email the new patch to
522 email(gnu-music-discuss@gnu.org). More than one patch a day can be
526 it() cd $HOME/usr/src
527 it() tar zxf releases/lilypond-em(<version>).em(<patchlevel>)
528 it() use your normal configure
530 it() Change file(VERSION) to increment em(<patchlevel>)
531 it() Change file(NEWS)
535 subsect(Running lilypond on Windows-NT) label(run)
539 Jeffrey B. Reed email(daboys@bga.com)
542 sect(RUNNING LILYPOND -- by Dominique Cretel)
545 eit() First, I have download tha 0.1.64 version of Lilypond music software.
547 eit() Then I extract it in a temp directory, and I move the directory
548 "lilypond-0.1.64" to the root directory of my D drive.
550 eit() I go to the D:\Lilypond-0.1.64\tex directory to modify the
551 lilyponddefs.tex file (lines 75 and 84), and comment all
552 cmbx15 ans cmbx14, and replace them by cmbx12.
554 eit() build a command file like this:
555 Note: I use MiKTeX to process the tex file generated.
561 set path=%path%;d:\lilypond-%ver%\bin
562 lilypond -I d:\lilypond-%ver%\init %1
565 set path=c:\texmf\miktex\bin;%path%
566 set TEXINPUTS=%TEXINPUTS%;d:\lilypond-%ver%\tex
567 set MFINPUTS=%MFINPUTS%;d:\lilypond-%ver%\mf
574 set path=%path%;d:\gstools\gsview
579 eit() execute lilypond by doing:
587 You'll better have to put the SET commands lines in a separate command
588 file to avoid consumming each time environnment ressources.
591 Dominique Cretel email(dominique.cretel@cfwb.be)
594 sect(PROBLEMS AND ANWSWERS)
596 subsect(CONFIGURE AND INSTALL)
597 This is all to confusing. I have:
599 eit() downloaded file(/tmp/lilypond-0.1.78.tar.gz)
604 tar zxf /tmp/lilypond-0.1.78.tar.gz
607 ./configure --prefix=/users/jeff/lilypond-0.1.78 \\\
609 --enable-tex-prefix=/users/jeff/lilypond-0.1.78/texmf \\\
611 --enable-tex-dir=/users/jeff/lilypond-0.1.78/texmf/tex \\\
613 --enable-mf-dir=/users/jeff/lilypond-0.1.78/texmf/mf
623 I did have a problem with lilypond.info. And I will look into this
624 further. After mending lilypond.info issue, it compiled and install
627 I have 64 Meg of physical memory and 64 Meg of swap. Actually I need
628 to increase the swap space. If a memory problem is occuring it most
629 likely is during the link process of lilypond. There is a boat load
632 Jan the mount -b stuff is confussing to me. I have the entire system
633 mounted _without_ -b and only use -b on certain paths for programs
634 that create binary files that do not use O_BINARY open option. By the
635 way the midi file open is one of these cases, I need to look into
636 that. I have had no problems with this methodology.
641 The windows multiroot filesystem is an utterly broken concept. Please
642 do everything on one (urg) drive, C:.
646 > creating cache ./config.cache
648 > creating config.make
650 > cd: lstat /d failed
653 Ok, this looks like another stupid windows problem.
654 You're working on 'drive D:', right?
656 I can think of some solutions, but i don't know if they work;
657 i just had to do some work in windows some time ago. If you
658 have problems with this, please ask email(gnu-win32@cygnus.com).
659 I'll start with the simplest:
661 it() do everything on drive C:, or
662 it() explicitely mount drive d:, work from there:
666 cd /mnt/d/lilypond-x.y.z/
668 it() make d:/ the root of cygnus, in cmd.exe/command.exe do:
676 subsect(INSTALLING TOOLS)
678 > - First I have installed Python (for win32) "Pyth151.exe" and "Configure
680 > don't find it. I had to put it in the path for configure find it?
683 Yes, of course. It should be possible to have different versions of tools
684 installed (e.g. perl 4 and perl 5). The best way to tell people (or tools
685 like configure) which one to use is to put it in the path?
687 Another small unix lesson: Where under dos each program installs itself
688 into a nice directory
692 under unix, installation is handled centrally. Executables go in
693 file(/usr/bin) (or file(/usr/local/bin)), and are always in your path.
695 subsect(VIRTUAL MEMORY)
698 > 4. make -C lily don't work. I get an error (see below). I get several
699 > object files in the ./lily/out directory (34 files: 17 *.dep, 16 *.o,
702 > include/engraver-group.hh:35: virtual memory exhausted
703 > make: *** [out/bar-grav.o] Error 1
708 Ok, so everything works now, there's only some error with one of the
709 source files. Lets see which one (and now the cc's now why they're
712 It looks like you've run out of memory. You should compile without
713 optimisation, gcc/egcs need a lot of memory for optimising.
714 Reconfigure without optimisation:
716 configure --disable-optimise
718 or edit file(config.make):
720 ## USER_CXXFLAGS = -g # -O no optimise!
724 There are some other things to look at: how much RAM do you have
725 (please say something > 8Mb :-)? Although it might be an egcs bug,
726 you should have a look at the size of your swap file.
727 For an US version of windows, you should find it here:
729 /start/settings/control-panel/system/performance/virtual-memory
731 you see, amongst others, these entries:
733 paging file size for selected drive:
739 total paging file size for all drives
741 currently allocated: xx
750 it() maximum-size >= 128 Mb
751 it() urrently-allocated + space-available >= 128 Mb