User Tools

Site Tools


en:developer:install_svn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:developer:install_svn [2017/07/25 05:48] – [OpenSSL, Scons, Serf - for newer versions of Subversion (e.g. 1.8.18)] anupamaen:developer:install_svn [2023/03/13 01:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== SVN Installation ====== 
  
-===== Windows ===== 
  
  
-===== Mac =====+====== SVN Installation ====== 
 + 
 +===== Windows =====
  
-===== Linux =====+===== Linux and Mac =====
  
 This covers installing subversion from a source tarball, for client-type uses. This document is based on an install of Subversion-1.4.3.tar.gz, but the install procedure should be similar for other versions as well. This does NOT cover installing Subversion as a server - some other steps are required for that. And it does not cover the procedure for compiling the 'bleeding-edges' version of subversion, which is a little different and more complicated (starting with the fact that you need subversion already installed in order to do it...?) This covers installing subversion from a source tarball, for client-type uses. This document is based on an install of Subversion-1.4.3.tar.gz, but the install procedure should be similar for other versions as well. This does NOT cover installing Subversion as a server - some other steps are required for that. And it does not cover the procedure for compiling the 'bleeding-edges' version of subversion, which is a little different and more complicated (starting with the fact that you need subversion already installed in order to do it...?)
Line 95: Line 95:
 ''#include<zlib.h>'' as the first line. If it compiles without error, zlib is installed. If not, installation instructions can be found at [[http://www.zlib.net/|the zlib website]]. ''#include<zlib.h>'' as the first line. If it compiles without error, zlib is installed. If not, installation instructions can be found at [[http://www.zlib.net/|the zlib website]].
  
 +==== Installing older versions of Subversion ====
 === Install Neon === === Install Neon ===
 Check if you have neon by running: Check if you have neon by running:
Line 106: Line 107:
 If you have a suitable version of neon, make a note of the neon home directory for use in the last step, [[#Intall_Subersion_itself|Install Subversion Itself]]. If you have a suitable version of neon, make a note of the neon home directory for use in the last step, [[#Intall_Subersion_itself|Install Subversion Itself]].
  
-If you don't have neon, or need to install a newer version, get a recent copy it from the [[http://webdav.org/neon/|WebDAV website]] in a ''.tar.gz'' archive. Install it with:+If you don't have neon, or need to install a newer version, get a recent copy it from the [[http://webdav.org/neon/|WebDAV website]] or [[http://www.linuxfromscratch.org/blfs/view/svn/basicnet/neon.html|alt link]] in a ''.tar.gz'' archive. Install it with:
 <code> <code>
 cd /research/oranfry/sources cd /research/oranfry/sources
Line 143: Line 144:
 After following these instructions in the fail message, re-run the configure step and then proceed to make and make install. After following these instructions in the fail message, re-run the configure step and then proceed to make and make install.
  
-For subversion 1.8.18, follow the instructions that the configure error message provides:+Now, subversion is installed in ''/research/oranfry/subversion''. To use the ''svn'' command, put ''/research/oranfry/subversion/bin'' into your path: 
 +<code> 
 +export PATH=/research/oranfry/subversion/bin:$PATH 
 +</code> 
 + 
 +==== Installing newer versions of Subversion like Subversion 1.8.18 ==== 
 +You'd need apr and apr-util built and installed, as described further above. 
 + 
 +I'm assuming we unpack the following tar.gz files into a ''sources'' folder and put their built installed versions into a ''packages'' folder. 
 + 
 +1. **Scons**\\ Grab the tar.gz file at https://sourceforge.net/projects/scons/files/scons-local/2.3.0/ 
 +and unpack into a ''scons'' folder. (Unpacking the tar.gz file directly will put the script files at the same level as the tar.gz.) 
 + 
 +<code> 
 +cd sources 
 +mkdir scons 
 +mv scons-local-2.3.0.tar.gz scons/. 
 +cd scons 
 +tar -xvzf scons-local-2.3.0.tar.gz 
 +(You can put the tar file back to where it used to be) 
 +</code> 
 + 
 +2. **OpenSSL**\\ Grab openssl from https://www.openssl.org/source/ (https://www.openssl.org/source/old/1.0.2/ - grab 1.0.2l for Litre) and unpack into ''sources'' folder. 
 + 
 +<code> 
 +cd sources 
 +tar -xvzf openssl-1.0.2l.tar.gz 
 +cd openssl-1.0.2l 
 + 
 +export CFLAGS="-fPIC $CFLAGS"  
 +  # the above may or may not be needed for successfully compiling up Serf in step 3. 
 +  # However the ''shared'' flag to the ./config command below is definitely 
 +  # the solution that fixed Serf compile failures  
 + 
 +./config --openssldir=/Scratch/ak19/packages/openssl1.0.2l shared 
 +[For macs, do instead: 
 +./Configure darwin64-x86_64-cc --openssldir=/Path/To/packages/openssl1.0.2l shared] 
 +make 
 +make install 
 +</code> 
 + 
 +The ''shared'' flag is necessary to successfully compile up serf against openssl hereafter. See the note in the Serf section. 
 + 
 +//**Notes:**// \\ When building openssl for GS, need to create static libs and disable shared libs:\\ ''./config %%--%%openssldir=/Scratch/ak19/packages/openssl1.0.2l no-shared'' 
 + 
 +''%%--%%openssldir'' works like ''%%--%%prefix'', but additionally puts ''bin'', ''include'', ''lib'' dirs with the ''openssl'' dir (which includes manuals) in the directory set with ''%%--%%openssldir''
 + 
 +''no-shared'' builds as static, turns off shared. So this represents the usual combination of ''%%--%%enable-static %%--%%disable-shared''. See https://wiki.openssl.org/index.php/Compilation_and_Installation or run ''./configure %%--%%help'' 
 + 
 + 
 +3. **Serf**\\ Grab and unpack serf from http://serf.apache.org/download \\ Then use the unpacked ''scons'' from step 2 to compile and install Serf. 
 + 
 +<code> 
 +cd sources 
 +tar -xvjf serf-1.3.9.tar.bz2 
 +cd serf-1.3.9 
 + 
 +export CFLAGS="-fPIC $CFLAGS" 
 +  # flow on effect from OpenSSL, may not be required there nor here. 
 + 
 +../scons/scons.py APR=/Scratch/ak19/packages/apr1.6.2 APU=/Scratch/ak19/packages/apr-util1.6.2 OPENSSL=/Scratch/ak19/packages/openssl1.0.2l PREFIX=/Scratch/ak19/packages/serf1.3.9 
 + 
 +../scons/scons.py install 
 +</code> 
 +Between the configure and scons install steps, you may not need to bother doing the scons check step in the Serf README:\\ ''../scons/scons.py check'' \\ 
 +The ''scons.py check'' step results in lots of failures, but it may not be essential, see 
 +https://stackoverflow.com/questions/34231885/serf-1-3-8-install-using-scons-is-failing 
 +https://www.mail-archive.com/[email protected]/msg01219.html 
 + 
 + 
 +At the end of installing serf, the installed version of serf should contain ''lib'' and ''includes'' folders. 
 + 
 +//**Note:**// When compiling up serf, if it fails with the error message 
 +<code> 
 + /usr/bin/ld: /Scratch/ak19/packages/openssl1.0.2l/lib/libssl.a(s23_clnt.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC 
 + /Scratch/ak19/packages/openssl1.0.2l/lib/libssl.a: error adding symbols: Bad value 
 +</code> 
 +then it may have nothing to do with exporting CFLAGS with ''-fPIC'' set, since setting this was at least insufficient to make the error go away.\\ Instead, it means that OpenSSL should have been compiled with ''enable-shared'' turned on, i.e. ''./config shared ...'' or ''./config %%--%%shared ...'' in step 2. See https://stackoverflow.com/questions/1147890/relocation-r-x86-64-32-against-a-local-symbol-error 
 + 
 +4. **Subversion**\\ Can now at last compile up a new version of subversion //with serf//: 
 + 
 +<code> 
 +cd sources 
 +tar -xvzf subversion-1.8.18.tar.gz 
 +cd subversion-1.8.18 
 +</code> 
 + 
 +[BEGIN: NOT FOR SVN 1.9.9 AND/OR MAC OSX 
 + 
 +If you try configuring SVN 1.8.18, you may get an error about missing sql-lite. For subversion 1.8.18, follow the instructions that the configure error message provides:
 <code>get the sqlite 3.7.15.1 amalgamation from: <code>get the sqlite 3.7.15.1 amalgamation from:
     http://www.sqlite.org/sqlite-amalgamation-3071501.zip     http://www.sqlite.org/sqlite-amalgamation-3071501.zip
Line 150: Line 240:
 /Scratch/ak19/sources/subversion-1.8.18/sqlite-amalgamation /Scratch/ak19/sources/subversion-1.8.18/sqlite-amalgamation
 </code> </code>
-Then re-run the configure command and onwards.+Then you're-run the configure command and onwards.
  
-Now, subversion is installed in ''/research/oranfry/subversion''. To use the ''svn'' command, put ''/research/oranfry/subversion/bin'' into your path.+Alternativelyyou can prepare your subversion package before configuring:
  
 +<code>
 +cd sources
 +wget http://www.sqlite.org/sqlite-amalgamation-3071501.zip
 +unzip sqlite-amalgamation-3071501.zip
 +mv sqlite-amalgamation-3071501 subversion-1.8.18/sqlite-amalgamation
 +  #needs to be renamed
 +</code>
  
 +END] 
 +
 +Now proceed with the usual configure, make and make install. There are two locations in the configure command where Serf should be specified:
 +
 +<code>
 +export CFLAGS="-fPIC $CFLAGS"
 +  # flow on effect from OpenSSL, may not be required there nor here.
 +
 +LDFLAGS="-Wl,-rpath,/Scratch/ak19/packages/serf1.3.9/lib $LDFLAGS" ./configure --prefix=/Scratch/ak19/packages/subversion1.8.18 --without-apxs --with-apr=/Scratch/ak19/packages/apr1.6.2/bin/apr-1-config --with-apr-util=/Scratch/ak19/packages/apr-util1.6.2/bin/apu-1-config --with-serf=/Scratch/ak19/packages/serf1.3.9 [--disable-neon-version-check --with-neon=/Scratch/ak19/packages/neon]
 +[--disable-neon-version-check and --with-neon are no longer recognised.]
 +Try adding: --enable-shared
 +
 +make
 +make install
 +</code>
 +
 +//**Note:**// You //need// to prepend to the ''./configure'' command the ''LDFLAGS'' set to the installed Serf's ''lib'' subfolder, else you'll be stuck always exporting ''LD_LIBRARY_PATH'' when running SVN, or exporting ''LD_LIBRARY_PATH'' from ''~/.bashrc''. Explained at https://stackoverflow.com/questions/28663316/svn-error-while-loading-shared-libraries-libserf-1-so-1-cannot-open-shared-ob
 +
 +5. Add the installed SVN's bin folder to the PATH, such as by exporting it in ''~/.bashrc'', before running svn commands. In ''~/.bashrc'':
 +<code>
 +export PATH=/path/to/installed/svn/bin:$PATH
 +(export LD_LIBRARY_PATH=/Scratch/ak19/packages/serf1.3.9/lib:$LD_LIBRARY_PATH
 +  ## stuck doing this only if you didn't compile up Subversion with the 
 +  ## configure command's LDFLAGS set to Serf's ''lib'' folder.)
 +</code>
 ===== Installing Perl: compiling perl from source ===== ===== Installing Perl: compiling perl from source =====
 The instructions are from https://perlmaven.com/how-to-build-perl-from-source-code The instructions are from https://perlmaven.com/how-to-build-perl-from-source-code
en/developer/install_svn.1500961716.txt.gz · Last modified: 2017/07/25 05:48 by anupama