Building from source svk-0.30 (step-by-step instructions) [Kiliman]
You need to download and install following prerequisites:
- Install into C:\Perl\
- Subversion should be in your path. Leave .DLLs in C:\Program Files\Subversion\bin\
- This part was tricky, since Perl expects these things to be in a specific place
- Copy swigpl.dll to C:\Perl\bin\
- Copy libsvn_swig_perl-1.dll to C:\Program Files\Subversion\bin\ (to keep svn stuff together)
- Copy *.pm to C:\Perl\site\lib\SVN\
- Copy _Client.dll to C:\Perl\site\lib\auto\SVN\_Client\ (make folder for each .DLL)
- Copy _Core.dll to C:\Perl\site\lib\auto\SVN\_Core\
- Do this for each _*.dll (make a separate folder for each .DLL)
- Optional: Pre-built dependent modules
- It appears that some modules have to be compiled into a .DLL which requires a C compiler. If you don't have one, you can download this zip and extract it to C:\Perl\. It will create the proper folder structure.
- The following pre-built modules are included:
- Clone
- PerlIO::eol
- Term::ReadKey
- SVN (I included the SVN Perl modules as well, so you won't have to create the folder structure explained above.
- Once you unzip these files, you should be able to build the rest from CPAN (see below).
Now you are ready to build svk:
- Download svk-0.30
- Unzip into working folder
- Build makefile
> perl Makefile.PL
- With a fresh Perl install, you should have a lot of missing dependencies
- Answer yes to Auto-install all mandatory modules from CPAN (including SVN::Mirror, even though it says optional)
- Configure CPAN for first time use
- When CPAN is run for the first time, you must answer some questions. When it asks you for paths to some tools, make sure that any paths with spaces are quoted, or simply use the filename if the excecutable is in your PATH. I had this problem with nmake.exe, which was in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\. The install was blowing up because CPAN was trying to run nmake using the full pathname (without quotes), and it was complaining the 'C:\Program' was not a valid command. DOH! You can modify the file C:\Perl\lib\CPAN\Config.pm to update these values.
- Once the makefile is created, you can build and install dependencies
> nmake
> nmake install
- NOTE: YAML and SVN::Mirror do not pass tests so you will need to force the install. I'm not a Perl expert so I'm not sure if there is an easier way to do this, but I simply used CPAN interactively to install these modules. SVN::Mirror will also require Term::ReadKey so force install that as well (answer yes at prompt).
> perl -MCPAN -e "shell"
cpan> force install YAML
cpan> force install SVN::Mirror
cpan> quit
- At this point, you should have a working copy of svk 0.30. You can try to run the tests. However, you will want to make a change to C:\Perl\lib\File\Spec\Win32.pm at line 273, otherwise you'll get a bunch of warnings about use of undefined variable.
+ $volume = "" unless defined $volume;
$volume .= $1
- If you run the tests you should get the following output. I'm not sure if these errors are bad or not:
> nmake test
...
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/07smerge-external.t 2 512 25 2 8.00% 3-4
t/11checkout.t 1 256 44 1 2.27% 37
t/70symlink.t 1 256 45 1 2.22% 24
t/71autovivify.t 9 2304 10 9 90.00% 1-2 4-10
t/72sign.t 7 1792 9 7 77.78% 1 3-7 9
4 tests and 4 subtests skipped.
Failed 5/65 test scripts, 92.31% okay. 20/1022 subtests failed, 98.04% okay.
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff'
Stop.
- Verify your install
> svk --version
> svk depotmap --init
- I hope to provide directions on how to build from trunk yet still maintain a working svk. Please modify these directions if you see any mistakes.
Currently it is only tested on Win2k and WinXP. The svk home folder
is at "C:\Document and Settings\Username\.svk\"; all the configuration
files and prompts should already be in native (crlf) line ending.
The editor is set to notepad.exe by default, but you can override it with
the EDITOR environment variable.
If you run into problems, please feed back to the mailing list, or to the IRC channel.
Kiliman Updated: 2005-03-16