1*983afe33SPhil Shafer 2*983afe33SPhil Shafer.. index:: Getting libxo 3*983afe33SPhil Shafer 4*983afe33SPhil ShaferGetting libxo 5*983afe33SPhil Shafer============= 6*983afe33SPhil Shafer 7*983afe33SPhil Shaferlibxo now ships as part of the FreeBSD Operating System (as of Release 8*983afe33SPhil Shafer11). 9*983afe33SPhil Shafer 10*983afe33SPhil Shaferlibxo source code lives on github: 11*983afe33SPhil Shafer 12*983afe33SPhil Shafer https://github.com/Juniper/libxo 13*983afe33SPhil Shafer 14*983afe33SPhil ShaferThe latest release of libxo is available at: 15*983afe33SPhil Shafer 16*983afe33SPhil Shafer https://github.com/Juniper/libxo/releases 17*983afe33SPhil Shafer 18*983afe33SPhil ShaferWe're using `Semantic Versioning`_ to number our releases. libxo is 19*983afe33SPhil Shaferopen source, distributed under the BSD license. We follow the 20*983afe33SPhil Shaferbranching scheme from `A Successful Git Branching Model`_: 21*983afe33SPhil Shaferwe do development under the "*develop*" branch, and release from 22*983afe33SPhil Shaferthe "*master*" branch. To clone a developer tree, run the following 23*983afe33SPhil Shafercommand:: 24*983afe33SPhil Shafer 25*983afe33SPhil Shafer git clone https://github.com/Juniper/libxo.git -b develop 26*983afe33SPhil Shafer 27*983afe33SPhil Shafer.. _Semantic Versioning: http://semver.org/spec/v2.0.0.html 28*983afe33SPhil Shafer.. _A Successful Git Branching Model: 29*983afe33SPhil Shafer http://nvie.com/posts/a-successful-git-branching-model 30*983afe33SPhil Shafer 31*983afe33SPhil ShaferIssues, problems, and bugs should be directly to the issues page on 32*983afe33SPhil Shaferour github site. 33*983afe33SPhil Shafer 34*983afe33SPhil ShaferDownloading libxo Source Code 35*983afe33SPhil Shafer----------------------------- 36*983afe33SPhil Shafer 37*983afe33SPhil ShaferYou can retrieve the source for libxo in two ways: 38*983afe33SPhil Shafer 39*983afe33SPhil ShaferA. Use a "distfile" for a specific release. We use github to maintain 40*983afe33SPhil Shafer our releases. Visit the `release page`_ to see the list of 41*983afe33SPhil Shafer releases. To download the latest, look for the release witeh the 42*983afe33SPhil Shafer green "Latest release" button and the green "libxo-RELEASE.tar.gz" 43*983afe33SPhil Shafer button under that section. 44*983afe33SPhil Shafer 45*983afe33SPhil Shafer.. _release page: https://github.com/Juniper/libxo/releases 46*983afe33SPhil Shafer 47*983afe33SPhil Shafer After downloading that release's distfile, untar it as follows:: 48*983afe33SPhil Shafer 49*983afe33SPhil Shafer tar -zxf libxo-RELEASE.tar.gz 50*983afe33SPhil Shafer cd libxo-RELEASE 51*983afe33SPhil Shafer 52*983afe33SPhil Shafer .. admonition:: Solaris Users 53*983afe33SPhil Shafer 54*983afe33SPhil Shafer Note: for Solaris users, your "`tar`" command lacks the "-z" flag, 55*983afe33SPhil Shafer so you'll need to substitute "`gzip -dc $file | tar xf -`" instead 56*983afe33SPhil Shafer of "`tar -zxf $file`". 57*983afe33SPhil Shafer 58*983afe33SPhil ShaferB. Use the current build from github. This gives you the most recent 59*983afe33SPhil Shafer source code, which might be less stable than a specific release. To 60*983afe33SPhil Shafer build libxo from the git repo:: 61*983afe33SPhil Shafer 62*983afe33SPhil Shafer git clone https://github.com/Juniper/libxo.git 63*983afe33SPhil Shafer cd libxo 64*983afe33SPhil Shafer 65*983afe33SPhil Shafer .. admonition:: Be Aware 66*983afe33SPhil Shafer 67*983afe33SPhil Shafer The github repository does **not** contain the files generated by 68*983afe33SPhil Shafer "*autoreconf*", with the notable exception of the "*m4*" directory. 69*983afe33SPhil Shafer Since these files (depcomp, configure, missing, install-sh, etc) are 70*983afe33SPhil Shafer generated files, we keep them out of the source code repository. 71*983afe33SPhil Shafer 72*983afe33SPhil Shafer This means that if you download the a release distfile, these files 73*983afe33SPhil Shafer will be ready and you'll just need to run "configure", but if you 74*983afe33SPhil Shafer download the source code from svn, then you'll need to run 75*983afe33SPhil Shafer "*autoreconf*" by hand. This step is done for you by the "*setup.sh*" 76*983afe33SPhil Shafer script, described in the next section. 77*983afe33SPhil Shafer 78*983afe33SPhil Shafer.. _building: 79*983afe33SPhil Shafer 80*983afe33SPhil ShaferBuilding libxo 81*983afe33SPhil Shafer-------------- 82*983afe33SPhil Shafer 83*983afe33SPhil ShaferTo build libxo, you'll need to set up the build, run the "*configure*" 84*983afe33SPhil Shaferscript, run the "*make*" command, and run the regression tests. 85*983afe33SPhil Shafer 86*983afe33SPhil ShaferThe following is a summary of the commands needed. These commands are 87*983afe33SPhil Shaferexplained in detail in the rest of this section:: 88*983afe33SPhil Shafer 89*983afe33SPhil Shafer sh bin/setup.sh 90*983afe33SPhil Shafer cd build 91*983afe33SPhil Shafer ../configure 92*983afe33SPhil Shafer make 93*983afe33SPhil Shafer make test 94*983afe33SPhil Shafer sudo make install 95*983afe33SPhil Shafer 96*983afe33SPhil ShaferThe following sections will walk through each of these steps with 97*983afe33SPhil Shaferadditional details and options, but the above directions should be all 98*983afe33SPhil Shaferthat's needed. 99*983afe33SPhil Shafer 100*983afe33SPhil ShaferSetting up the build 101*983afe33SPhil Shafer~~~~~~~~~~~~~~~~~~~~ 102*983afe33SPhil Shafer 103*983afe33SPhil Shafer.. admonition: Note 104*983afe33SPhil Shafer 105*983afe33SPhil Shafer If you downloaded a distfile, you can skip this step. 106*983afe33SPhil Shafer 107*983afe33SPhil ShaferRun the "*setup.sh*" script to set up the build. This script runs the 108*983afe33SPhil Shafer"*autoreconf*" command to generate the "*configure*" script and other 109*983afe33SPhil Shafergenerated files:: 110*983afe33SPhil Shafer 111*983afe33SPhil Shafer sh bin/setup.sh 112*983afe33SPhil Shafer 113*983afe33SPhil ShaferNote: We're are currently using autoreconf version 2.69. 114*983afe33SPhil Shafer 115*983afe33SPhil ShaferRunning the "configure" Script 116*983afe33SPhil Shafer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 117*983afe33SPhil Shafer 118*983afe33SPhil ShaferConfigure (and autoconf in general) provides a means of building 119*983afe33SPhil Shafersoftware in diverse environments. Our configure script supports 120*983afe33SPhil Shafera set of options that can be used to adjust to your operating 121*983afe33SPhil Shaferenvironment. Use "`configure --help`" to view these options. 122*983afe33SPhil Shafer 123*983afe33SPhil ShaferWe use the "*build*" directory to keep object files and generated files 124*983afe33SPhil Shaferaway from the source tree. 125*983afe33SPhil Shafer 126*983afe33SPhil ShaferTo run the configure script, change into the "*build*" directory, and 127*983afe33SPhil Shaferrun the "*configure*" script. Add any required options to the 128*983afe33SPhil Shafer"`../configure`" command line:: 129*983afe33SPhil Shafer 130*983afe33SPhil Shafer cd build 131*983afe33SPhil Shafer ../configure 132*983afe33SPhil Shafer 133*983afe33SPhil ShaferExpect to see the "*configure*" script generate the following error:: 134*983afe33SPhil Shafer 135*983afe33SPhil Shafer /usr/bin/rm: cannot remove `libtoolT': No such file or directory 136*983afe33SPhil Shafer 137*983afe33SPhil ShaferThis error is harmless and can be safely ignored. 138*983afe33SPhil Shafer 139*983afe33SPhil ShaferBy default, libxo installs architecture-independent files, including 140*983afe33SPhil Shaferextension library files, in the /usr/local directories. To specify an 141*983afe33SPhil Shaferinstallation prefix other than /usr/local for all installation files, 142*983afe33SPhil Shaferinclude the --prefix=prefix option and specify an alternate 143*983afe33SPhil Shaferlocation. To install just the extension library files in a different, 144*983afe33SPhil Shaferuser-defined location, include the "*--with-extensions-dir=dir*" option 145*983afe33SPhil Shaferand specify the location where the extension libraries will live:: 146*983afe33SPhil Shafer 147*983afe33SPhil Shafer cd build 148*983afe33SPhil Shafer ../configure [OPTION]... [VAR=VALUE]... 149*983afe33SPhil Shafer 150*983afe33SPhil ShaferRunning the "make" Command 151*983afe33SPhil Shafer++++++++++++++++++++++++++ 152*983afe33SPhil Shafer 153*983afe33SPhil ShaferOnce the "*configure*" script is run, build the images using the 154*983afe33SPhil Shafer"`make`" command:: 155*983afe33SPhil Shafer 156*983afe33SPhil Shafer make 157*983afe33SPhil Shafer 158*983afe33SPhil ShaferRunning the Regression Tests 159*983afe33SPhil Shafer++++++++++++++++++++++++++++ 160*983afe33SPhil Shafer 161*983afe33SPhil Shaferlibxo includes a set of regression tests that can be run to ensure 162*983afe33SPhil Shaferthe software is working properly. These test are optional, but will 163*983afe33SPhil Shaferhelp determine if there are any issues running libxo on your 164*983afe33SPhil Shafermachine. To run the regression tests:: 165*983afe33SPhil Shafer 166*983afe33SPhil Shafer make test 167*983afe33SPhil Shafer 168*983afe33SPhil ShaferInstalling libxo 169*983afe33SPhil Shafer~~~~~~~~~~~~~~~~ 170*983afe33SPhil Shafer 171*983afe33SPhil ShaferOnce the software is built, you'll need to install libxo using the 172*983afe33SPhil Shafer"`make install`" command. If you are the root user, or the owner of 173*983afe33SPhil Shaferthe installation directory, simply issue the command:: 174*983afe33SPhil Shafer 175*983afe33SPhil Shafer make install 176*983afe33SPhil Shafer 177*983afe33SPhil ShaferIf you are not the "*root*" user and are using the "*sudo*" package, use:: 178*983afe33SPhil Shafer 179*983afe33SPhil Shafer sudo make install 180*983afe33SPhil Shafer 181*983afe33SPhil ShaferVerify the installation by viewing the output of "`xo --version`":: 182*983afe33SPhil Shafer 183*983afe33SPhil Shafer % xo --version 184*983afe33SPhil Shafer libxo version 0.3.5-git-develop 185*983afe33SPhil Shafer xo version 0.3.5-git-develop 186