Show
Ignore:
Timestamp:
12/09/02 17:24:17 (10 years ago)
Author:
ahu
Message:

heap of solaris work

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/docs/pdns.sgml

    r15 r61  
    1616    </author> 
    1717     
    18     <PubDate>v2.1 $Date: 2002/11/28 14:38:00 $</PubDate> 
     18    <PubDate>v2.1 $Date: 2002/12/09 16:24:17 $</PubDate> 
    1919     
    2020    <Abstract> 
     
    65446544  <appendix id="compiling-powerdns"><title>Compiling PowerDNS</title> 
    65456545    <para> 
    6546       The PowerDNS source is separated from many of its modules. The main PowerDNS source tree however is able 
    6547       to pull in certain files for creating packaged releases. 
     6546      For now, see <ulink url="http://www.powerdns.org">the Open Source PowerDNS site</ulink>.  
     6547      <command>./configure --enable-mysql ; make ; make install</command> will do The Right Thing for most people. 
    65486548    </para> 
    6549     <para> 
    6550       First download the source or retrieve from anoncvs.powerdns.com (module 'powerdns'). If from cvs, you need to execute  
    6551       <filename>./bootstrap</filename> to have the GNU autotools build the configure script and the Makefiles. 
    6552     </para> 
    6553     <para> 
    6554       The run ./configure, followed by 'make'. PowerDNS prefers being compiled with GCC 3.2 but 2.95.4 and 3.0.4 will also work on most systems. 
    6555       It will not compile on Debian Potato because that lacks the <filename>sstream</filename> include file. 
    6556     </para> 
    6557     <para> 
    6558       After compiling, the <filename>./installer</filename> script can be used to install.  
    6559     </para> 
    6560     <sect1><title>Configuring external modules with PowerDNS</title> 
    6561         <para> 
    6562         A module needs to see the PowerDNS sources. See the INSTALL file of a module on how to configure this. 
    6563         </para> 
     6549    <sect1 id="on-windows"><title>Compiling PowerDNS on Windows</title> 
     6550      <para> 
     6551        By Michael Stol (<email>michael@physos.info</email>). 
     6552      <sect2><title>Assumptions</title> 
     6553        <para> 
     6554          I will assume these things from you:       
     6555        </para> 
     6556        <variablelist> 
     6557          <varlistentry> 
     6558            <term> 
     6559              You have the PowerDNS sources. 
     6560            </term> 
     6561            <listitem>         
     6562              <para> 
     6563                There's not much to compile without the source files, eh? :) 
     6564              </para> 
     6565            </listitem> 
     6566          </varlistentry> 
     6567 
     6568          <varlistentry>       
     6569            <term> 
     6570              You are using Microsoft Visual C++. If you get it to compile using a free compiler, please let us know! 
     6571            </term> 
     6572            <listitem>         
     6573              <para> 
     6574                From the day that we began porting the <acronym>UNIX</acronym> PowerDNS sources to Microsoft Windows 
     6575                we used Microsoft Visual C++ as our development environment of choice.             
     6576              </para> 
     6577               
     6578              <para> 
     6579                We used Visual C++ 6.0 to compile all sources (both standard version and SP5). Other versions 
     6580                (including Visual C++ .NET) are untested. 
     6581              </para> 
     6582            </listitem> 
     6583          </varlistentry> 
     6584           
     6585          <varlistentry> 
     6586            <term> 
     6587              You are using Microsoft Windows NT, 2000 or XP 
     6588            </term> 
     6589            <listitem>         
     6590              <para> 
     6591                I will assume that the system where you want to compile the sources on is running 
     6592                Microsoft Windows NT, 2000 or XP. These are the operating systems that where found 
     6593                running PowerDNS for Windows. 
     6594                 
     6595              </para>           
     6596               
     6597              <note> 
     6598                <para> 
     6599                  You probably can compile the sources on other Windows versions too, but that is currently untested. 
     6600                </para> 
     6601              </note> 
     6602            </listitem> 
     6603          </varlistentry> 
     6604           
     6605          <varlistentry>       
     6606            <term> 
     6607              You are using an English Windows version. 
     6608            </term> 
     6609            <listitem>         
     6610              <para> 
     6611                Troughout this document I will use the English names for menu items, names etc., so if you are 
     6612                running a non-English Windows or <acronym>MSVC</acronym> version you have to translate those things yourself. But  
     6613                I don't think that would be a big problem. 
     6614              </para>           
     6615            </listitem> 
     6616          </varlistentry> 
     6617           
     6618        </variablelist> 
     6619         
     6620      </sect2> 
     6621       
     6622      <sect2> 
     6623        <title>Prequisites</title> 
     6624         
     6625        <para> 
     6626          Although we tried to keep PowerDNS for Windows' dependencies down to a minimum, you will still need some 
     6627          programs and libraries to be able to compile the sources. 
     6628        </para> 
     6629         
     6630      <sect3> 
     6631        <title>pthreads for Windows</title> 
     6632         
     6633        <para> 
     6634          The pthreads for Windows library is a Windows implementation of the <acronym>POSIX</acronym> threads 
     6635          specification, which is used a lot in <acronym>UNIX</acronym> programs. 
     6636        </para> 
     6637         
     6638        <para> 
     6639          PowerDNS uses pthreads too, and to ease the porting process we decided not to reinvent the wheel, 
     6640          but to use pthreads for Windows instead. 
     6641        </para> 
     6642         
     6643        <sect4> 
     6644          <title>Getting pthreads for Windows</title> 
     6645           
     6646          <para> 
     6647            Pthreads for Windows is available from anonymous ftp at <ulink url="ftp://sources.redhat.com/pub/pthreads-win32/">ftp://sources.redhat.com/pub/pthreads-win32/</ulink>. 
     6648            You should download the latest <filename>pthreads-YYYY-MM-DD.exe</filename> file. 
     6649          </para> 
     6650           
     6651          <note> 
     6652            <para> 
     6653              PowerDNS for Windows was tested with the snapshot of 2002-03-02 of the library. 
     6654            </para> 
     6655          </note> 
     6656           
     6657          <para> 
     6658            For more information you can visit the pthreads for Windows homepage at <ulink url="http://sources.redhat.com/pthreads-win32/">http://sources.redhat.com/pthreads-win32/</ulink> 
     6659          </para>           
     6660        </sect4> 
     6661         
     6662        <sect3> 
     6663          <title>Installing pthreads for Windows</title> 
     6664           
     6665          <para> 
     6666            To install the pthreads for Windows library you have to locate your <filename>pthreads-YYYY-MM-DD.exe</filename>  
     6667            file and start it. 
     6668          </para> 
     6669           
     6670          <para> 
     6671            After starting the executable a self-extractor dialog will show up where you can specify where to extract 
     6672            the contents of the file. When you selected a location you can press the <guibutton>Extract</guibutton> button 
     6673            to extract all content to the target directory. 
     6674          </para> 
     6675           
     6676          <para> 
     6677            The library is now installed, we still have to tell Visual C++ where it's located though, more 
     6678            on that later. 
     6679          </para>         
     6680        </sect3> 
     6681         
     6682      </sect2> 
     6683       
     6684      <sect2> 
     6685        <title>Nullsoft Installer</title> 
     6686         
     6687        <para> 
     6688          For our installation program we used Nullsoft's Installer System (<acronym>NSIS</acronym>). We used  
     6689          <acronym>NSIS</acronym> because it's easy to use, versatile and free (and it uses <acronym><trademark>SuperPiMP</trademark></acronym> technology, but 
     6690          they refuse to tell us what it is ;)). If the name Nullsoft rings a bell, it's because they're the guys who made 
     6691          <ulink url="http://www.winamp.com/">winamp</ulink>. 
     6692        </para> 
     6693         
     6694        <sect3> 
     6695          <title>Getting the Nullsoft Installer</title> 
     6696           
     6697          <para> 
     6698            The Nullsoft Installer can be downloaded at their website, which is 
     6699            located at <ulink url="http://www.nullsoft.com/free/nsis/">http://www.nullsoft.com/free/nsis/</ulink>. 
     6700            The file that you should download is called <filename>nsisXXX.exe</filename> (where XXX is the latest version). 
     6701          </para> 
     6702           
     6703          <note> 
     6704            <para> 
     6705              You can find the <acronym>NSIS</acronym> documentation at that website too. 
     6706            </para> 
     6707          </note> 
     6708        </sect3> 
     6709         
     6710        <sect3> 
     6711          <title> Installing the Nullsoft Installer</title> 
     6712           
     6713          <para> 
     6714            Installing <acronym>NSIS</acronym> is easy. All there is to it is locating the installer and execute it. 
     6715            Then just follow the installation steps. 
     6716          </para> 
     6717        </sect3> 
     6718         
     6719      </sect2> 
     6720       
     6721    <sect2> 
     6722      <title>Setting up the build-environment</title> 
     6723       
     6724      <para> 
     6725        Before starting Microsoft Visual C++ and compile PowerDNS for Windows, you first 
     6726        have to set up your build environment. 
     6727      </para> 
     6728       
     6729      <sect3> 
     6730        <title>Make Microsoft Visual C++ recognize <filename>*.cc</filename> and <filename>*.hh</filename> (optional)</title> 
     6731         
     6732        <para> 
     6733          All PowerDNS source files are in the form <filename>name.cc</filename>, and all header files in the form 
     6734          <filename>name.hh</filename>. These extensions aren't recognized by <acronym>MSVC</acronym> by default, so 
     6735          you might want to change that first. 
     6736        </para> 
     6737         
     6738        <note> 
     6739          <para> 
     6740            Only perform this step if you want to be able to edit the <filename>*.cc</filename>  
     6741            and <filename>*.hh</filename> files in <acronym>MSVC</acronym>. 
     6742          </para> 
     6743        </note> 
     6744         
     6745        <caution> 
     6746          <para> 
     6747            If you decide to perform this step, remember that it requires modification of the Windows registry,  
     6748            always make a backup before modifying! 
     6749          </para> 
     6750        </caution> 
     6751         
     6752        <para> 
     6753          Ok, after that word of caution we can now proceed. You have to follow these steps: 
     6754        </para> 
     6755 
     6756        <orderedlist> 
     6757           
     6758          <listitem> 
     6759            <para> 
     6760              Start the registry editor by entering <filename>regedit.exe</filename> in the run prompt 
     6761              (<guimenu>Start-&gt;Run...</guimenu>). 
     6762            </para> 
     6763          </listitem> 
     6764 
     6765          <listitem> 
     6766            <para> 
     6767              Right click on <filename>HKEY_CLASSES_ROOT</filename> and select <guimenu>New-&gt;Key</guimenu>.  
     6768              A new key will appear, change that key to <quote><filename>.cc</filename></quote>, then change the default 
     6769              value to <quote>cppfile</quote> 
     6770            </para> 
     6771 
     6772            <para> 
     6773              Then perform the same step for <quote><filename>.hh</filename></quote> (use <quote>hfile</quote> instead of <quote>cppfile</quote>). 
     6774            </para> 
     6775          </listitem> 
     6776 
     6777          <listitem> 
     6778            <para> 
     6779              Go to <filename>HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Tools\32-bit C/C++ Compiler for 80x86</filename>. And 
     6780              add <quote>;*.cc</quote> to the <filename>Input_Spec</filename> value (so that it becomes <quote>*.c;*.cpp;*.cxx;*.cc</quote>). 
     6781            </para> 
     6782 
     6783            <note> 
     6784              <para> 
     6785                If you happen to use another platform (like alpha) to compile the sources, you have to do the step above for that platform. 
     6786              </para> 
     6787            </note> 
     6788          </listitem> 
     6789 
     6790          <listitem> 
     6791            <para> 
     6792              Go to <filename>HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Search</filename>. And 
     6793              add <quote>;*.cc;*.hh</quote> to the <filename>FIF_Filter</filename> value (so that it becomes <quote>*.c;*.cpp;*.cxx;*.tli;*.h;*.tlh;*.inl;*.rc;*.cc;*.hh</quote>). 
     6794            </para> 
     6795          </listitem> 
     6796 
     6797          <listitem> 
     6798            <para> 
     6799              Finally change <filename>HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++</filename>. And 
     6800              add <quote>;cc;hh</quote> to the <filename>FileExtensions</filename> value (so that it becomes <quote>cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;hh;cc</quote>). 
     6801            </para> 
     6802          </listitem> 
     6803           
     6804          <listitem> 
     6805            <para> 
     6806              Close the registry editor. 
     6807            </para> 
     6808          </listitem> 
     6809           
     6810        </orderedlist>        
     6811         
     6812        <para> 
     6813          Now should <acronym>MSVC</acronym> properly recognize the files as being C++. 
     6814        </para> 
     6815         
     6816      </sect3> 
     6817       
     6818      <sect3> 
     6819        <title>Setting Microsoft Visual C++'s directories</title> 
     6820         
     6821        <para> 
     6822          <acronym>MSVC</acronym> needs to locate some include files, libraries and executables 
     6823          when it has to build PowerDNS for Windows. We are now going to tell <acronym>MSVC</acronym> where 
     6824          to find those. 
     6825        </para> 
     6826         
     6827        <para> 
     6828          To enter the directory dialog you have to go to <guimenu>Tools-&gt;Options...-&gt;Directories</guimenu>. 
     6829        </para> 
     6830         
     6831        <sect4> 
     6832          <title>Setting the pthreads directories</title> 
     6833           
     6834          <para> 
     6835            When you are in the directory dialog you can add the pthreads for Windows directory. 
     6836          </para> 
     6837           
     6838          <para> 
     6839            First add the include directory, to do this you have to select <guilabel>Include files</guilabel> 
     6840            from the <guilabel>Show directories for:</guilabel> combobox. Then press the <guibutton>New</guibutton> 
     6841            button and browse to the <emphasis>include</emphasis> directory of pthreads (ie. <filename>C:\pthreads\include</filename>). 
     6842          </para> 
     6843           
     6844          <para> 
     6845            Then switch to <guilabel>Library files</guilabel> and add the <emphasis>library</emphasis> directory 
     6846            (ie. <filename>C:\pthreads\lib</filename>) using the same method as above. 
     6847          </para>         
     6848        </sect4> 
     6849         
     6850        <sect4> 
     6851          <title>Setting the Nullsoft Installer directory</title> 
     6852           
     6853          <para> 
     6854            While still being in the directory dialog, switch to <guilabel>Executable files</guilabel> 
     6855            and add the Nullsoft Installer directory (ie. <filename>C:\Program Files\NSIS</filename>) to the list. 
     6856          </para> 
     6857        </sect4> 
     6858         
     6859       
     6860    </sect3> 
     6861      </sect2> 
     6862     
     6863    <sect2> 
     6864      <title>Compilation</title> 
     6865       
     6866      <para> 
     6867        Finally, after all the reading, installing and configuring we are ready to start compiling 
     6868        PowerDNS for Windows. 
     6869      </para> 
     6870       
     6871      <sect3> 
     6872        <title>Starting the compilation</title>   
     6873         
     6874        <para> 
     6875          To start the compilation you first have to open the PowerDNS workspace (<filename>powerdns.dsw</filename>) using explorer or 
     6876          from the <guimenu>File-&gt;Open Workspace...</guimenu> menu in <acronym>MSVC</acronym>. 
     6877        </para> 
     6878         
     6879        <para> 
     6880          After you opened the workspace you can start compiling. Check all the checkboxes in the 
     6881          <guimenu>Build-&gt;Batch Build...</guimenu> menu and press the <guibutton>Build</guibutton> button. 
     6882        </para> 
     6883         
     6884        <para> 
     6885          Now cross your fingers and go make some coffee or tea while compiling PowerDNS for Windows. :) 
     6886        </para> 
     6887         
     6888      </sect3> 
     6889       
     6890      <sect3> 
     6891        <title>Yay! It compiled</title> 
     6892         
     6893        <para> 
     6894          Congratulations, you have now compiled PowerDNS for Windows! 
     6895        </para> 
     6896         
     6897        <para> 
     6898          All the release builds of the binaries are in the <filename>Release</filename> directory (including the 
     6899          generated installer). The debug builds are in the, guess what, <filename>Debug</filename> directory. 
     6900        </para> 
     6901         
     6902        <para> 
     6903          Now you can start installing PowerDNS, but that's beyond the scope of this document. See 
     6904          the <ulink url="http://downloads.powerdns.com/documentation/html/">online documentation</ulink> for 
     6905          more information about that. 
     6906        </para> 
     6907      </sect3> 
     6908       
     6909      <sect3> 
     6910        <title>What if it went wrong?</title> 
     6911         
     6912        <para> 
     6913          If the compilation fails, then try reading this article again, and again to see if you did something wrong. 
     6914        </para> 
     6915         
     6916        <para> 
     6917          If you are pretty sure that it's a bug, either in the PowerDNS sources, the build 
     6918          system or in this article, then please send an e-mail to <email>powerdns-dev@mailman.powerdns.com</email> describing your 
     6919          problem. We will then try to fix it. 
     6920        </para> 
     6921         
     6922      </sect3> 
     6923       
     6924    </sect2> 
     6925     
     6926    <sect2> 
     6927      <title>Miscellaneous</title> 
     6928 
     6929      <para> 
     6930        Some miscellaneous information. 
     6931      </para> 
     6932       
     6933      <sect3> 
     6934        <title>Credits</title> 
     6935 
     6936        <variablelist> 
     6937          <title>Michel Stol would like to thank these people:</title> 
     6938           
     6939          <varlistentry> 
     6940            <term> 
     6941              Bert Hubert 
     6942            </term> 
     6943            <listitem> 
     6944              <para> 
     6945                For writing the wonderfull PowerDNS software and learning me stuff 
     6946                that I'd otherwise never had learned. 
     6947              </para> 
     6948            </listitem> 
     6949          </varlistentry> 
     6950 
     6951          <varlistentry> 
     6952            <term> 
     6953              PowerDNS B.V. 
     6954            </term> 
     6955            <listitem> 
     6956              <para> 
     6957                For being great colleagues. 
     6958              </para> 
     6959            </listitem> 
     6960          </varlistentry> 
     6961 
     6962          <varlistentry> 
     6963            <term> 
     6964              The pthreads-win32 crew (see the pthreads-win32 <filename>CONTRIBUTORS</filename> file). 
     6965            </term> 
     6966            <listitem> 
     6967              <para> 
     6968                For easing our porting process by writing a great Windows implementation of pthreads. 
     6969              </para> 
     6970            </listitem> 
     6971          </varlistentry> 
     6972 
     6973          <varlistentry> 
     6974            <term> 
     6975              The guys over at Nullsoft. 
     6976            </term> 
     6977            <listitem> 
     6978              <para> 
     6979                For creating the Nullsoft Installer System (<acronym>NSIS</acronym>), and Winamp, the program we use every 
     6980                day to make a lot of noise in the office. 
     6981              </para> 
     6982            </listitem> 
     6983          </varlistentry> 
     6984           
     6985        </variablelist> 
     6986         
     6987      </sect3> 
     6988       
     6989      <sect3> 
     6990        <title>Contact information</title> 
     6991         
     6992        <para> 
     6993          If you have a comment, or a bug report concerning either this document or the PowerDNS sources 
     6994          you can contact <email>powerdns-dev@mailman.powerdns.com</email> 
     6995        </para> 
     6996         
     6997        <para> 
     6998          For general information about PowerDNS, the pdns server, express, documentation etc. I advice you to visit 
     6999          <ulink url="http://www.powerdns.com/">http://www.powerdns.com/</ulink> 
     7000        </para> 
     7001 
     7002        <para> 
     7003          If you are interested in buying PowerDNS you can send a mail to <email>sales@powerdns.com</email> 
     7004          or you can visit the PowerDNS website at <ulink url="http://www.powerdns.com/pdns/">http://www.powerdns.com/pdns/</ulink> 
     7005        </para>       
     7006         
     7007        <para> 
     7008          If you want to praise my work, ask me to marry you, deposit $1.000.000 on my bank account or flame me to death, then  
     7009          you can mail me at <email>michel@physos.info</email> :) 
     7010        </para> 
     7011         
     7012      </sect3> 
     7013       
     7014      <sect3> 
     7015        <title>Legal information</title> 
     7016         
     7017        <para> 
     7018          Microsoft, Visual C++, Windows, Windows NT, Windows 2000, Windows XP and Win32 are  
     7019          either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries. 
     7020        </para> 
     7021         
     7022        <para> 
     7023          Other product and company names mentioned herein may be the trademarks of their respective owners. 
     7024        </para> 
     7025         
     7026        </sect3> 
     7027       
     7028      </sect2> 
    65647029    </sect1> 
     7030 
    65657031  </book>