VOSMake Building Virtuoso Open-Source EditionBuilding Virtuoso Open-Source Edition Introduction This document explains steps to take after obtaining a Virtuoso source snapshot or cvs checkout. These sections explain how to compile, test and install and what components are produced by the make process and how one can interact with them. Requirements Package Dependencies To generate the configure script and all other build files necessary, please make sure the following packages and recommended versions are installed on your system. <tgroup><thead /><tbody> <row /> <row><entry> autoconf </entry><entry> 2.57 </entry><entry> <ulink url="http://www.gnu.org/software/autoconf/">http://www.gnu.org/software/autoconf/</ulink> </entry></row> <row><entry> automake </entry><entry> 1.9 </entry><entry> <ulink url="http://www.gnu.org/software/automake/">http://www.gnu.org/software/automake/</ulink> </entry></row> <row><entry> libtool </entry><entry> 1.5 </entry><entry> <ulink url="http://www.gnu.org/software/libtool/">http://www.gnu.org/software/libtool/</ulink> </entry></row> <row><entry> flex </entry><entry> 2.5.33 </entry><entry> <ulink url="http://flex.sourceforge.net/">http://flex.sourceforge.net/</ulink> </entry></row> <row><entry> bison </entry><entry> 2.3 </entry><entry> <ulink url="http://www.gnu.org/software/bison/">http://www.gnu.org/software/bison/</ulink> </entry></row> <row><entry> gperf </entry><entry> 2.7.2 </entry><entry> <ulink url="http://www.gnu.org/software/gperf/">http://www.gnu.org/software/gperf/</ulink> </entry></row> <row><entry> gawk </entry><entry> 3.1.1 </entry><entry> <ulink url="http://www.gnu.org/software/gawk/">http://www.gnu.org/software/gawk/</ulink> </entry></row> <row><entry> m4 </entry><entry> 1.4.1 </entry><entry> <ulink url="http://www.gnu.org/software/m4/">http://www.gnu.org/software/m4/</ulink> </entry></row> <row><entry> make </entry><entry> 3.79.1 </entry><entry> <ulink url="http://www.gnu.org/software/make/">http://www.gnu.org/software/make/</ulink> </entry></row> <row><entry> <ulink url="OpenSSL">OpenSSL</ulink> </entry><entry> 0.9.7i </entry><entry> <ulink url="http://www.openssl.org/">http://www.openssl.org/</ulink> </entry></row> </tbody></tgroup></table> <para>and any further dependencies of these. The autogen.sh and configure scripts check for the presence and right version of some of the required components.</para> <para>The above version are the minimum recommended versions of these packages. Older version of these packages may sometimes be used, but could cause build problems.</para> <para>To check the version number of the tools installed on your system, use one of the following commands:</para> <itemizedlist mark="bullet" spacing="compact"><listitem><computeroutput>autoconf --version</computeroutput> </listitem> <listitem><computeroutput>automake --version</computeroutput> </listitem> <listitem><computeroutput>libtoolize --version</computeroutput> </listitem> <listitem><computeroutput>flex --version</computeroutput> </listitem> <listitem><computeroutput>bison --version</computeroutput> </listitem> <listitem><computeroutput>gperf --version</computeroutput> </listitem> <listitem><computeroutput>gawk --version</computeroutput> </listitem> <listitem><computeroutput>m4 --version</computeroutput> </listitem> <listitem><computeroutput>make --version</computeroutput> </listitem> <listitem><computeroutput>openssl version</computeroutput></listitem> </itemizedlist><para>If you have an older version than automake version 1.9 you can edit the configure.in script around line 47 using the examples provided for each version.</para> <para>Note that uptodate operating systems, particularly Debian GNU/Linux and Ubuntu, split some of these packages into runtime and development packages, so users of these platforms can run</para> <programlisting>sudo apt-get install libssl-dev </programlisting><para> Or on Redhat and <ulink url="CentOS">CentOS</ulink> systems run </para> <programlisting>sudo yum install openssl-devel </programlisting><para> to get the necessary development headers & libraries for <ulink url="OpenSSL">OpenSSL</ulink>.</para> <para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Diskspace Requirements</bridgehead> <para>The build produces a demo database and Virtuoso application packages that are quite large. At least 800 MB of free space should be available in the build file system.</para> <para>When running `make install', the target file system should have about 460 MB free. By default, the install target directories are under /usr/local/, but you can specify </para> <programlisting>./configure --prefix=/path/to/dir </programlisting><para>instead.</para> <para>The minimum working configuration consists of the server executable and config files plus database, no more than a few MB for the server executable, depending on platform and options.</para> <bridgehead class="http://www.w3.org/1999/xhtml:h2">Notes</bridgehead> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Configure Utility Directory Layout</bridgehead> <itemizedlist mark="bullet" spacing="compact"><listitem>Please see the <ulink url="VOSConfigureUtilityLayout">Configure Utility Directory Layout Guide</ulink></listitem> </itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3">The isql command</bridgehead> <para>Both Virtuoso and the unixODBC packages provide a command <computeroutput>isql</computeroutput>. This can lead to a clash as unixODBC's command is for talking to an ODBC driver manager while Virtuoso's <computeroutput>isql</computeroutput> talks to the data port in a Virtuoso instance.</para> <para>As such, if you know you're going to have both unixODBC and Virtuoso installed on the same machine, you have two ways to resolve the conflict:</para> <itemizedlist mark="bullet" spacing="compact"><listitem>install Virtuoso in a directory of its own (by default, it will choose /usr/local/) and use your PATH environment variable to set the order of bin/ directories searched </listitem> <listitem>you can rename Virtuoso's isql command, e.g. to isql-v; this can either be done after building by running <computeroutput>mv isql isql-v</computeroutput> in the <computeroutput>$PREFIX/bin/</computeroutput> directory, or even beforehand at configure-time with the command <programlisting>./configure --program-transform-name="s/isql/isql-v/" ..... </programlisting> </listitem> </itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Compiler Flags</bridgehead> <para>Some builds require additional C compiler and other environment flags to be set before running the configure command, specially when building 64-bit versions of the server. If your system is not in this list, please try to run the configure command without any environment settings.</para> <para>Warning: if VAD or other packages fail to be built, especially on 64-bit Linux platforms, ensure you're not using excessive optimization. CFLAGS="-O2" is known to work but there are reports of -O3 failing.</para> <para>If your system requires additional flags not listed below, please contact us at <vos.admin@openlinksw.com>.</para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Generic build environment</bridgehead> <programlisting>CC=cc CFLAGS="-O" export CFLAGS CC ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">AIX 4.x 32-bit</bridgehead> <programlisting> CC=cc_r7 CFLAGS="-O -q32" LDFLAGS="-brtl" OBJECT_MODE=32 export CC CFLAGS LDFLAGS OBJECT_MODE ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">AIX 4.x 64-bit</bridgehead> <programlisting> CC=cc_r7 CFLAGS="-O -q64" LDFLAGS="-brtl" OBJECT_MODE=64 export CC CFLAGS LDFLAGS OBJECT_MODE ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">AIX 5.x 32-bit</bridgehead> <programlisting> CC=cc_r CFLAGS="-O -q32" LDFLAGS="-brtl" OBJECT_MODE=32 export CC CFLAGS LDFLAGS OBJECT_MODE ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">AIX 5.x 32-bit</bridgehead> <programlisting> CC=cc_r CFLAGS="-O -q64" LDFLAGS="-brtl" OBJECT_MODE=64 export CC CFLAGS LDFLAGS OBJECT_MODE ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Digital Unix/OSF1 V5.0 64-bit</bridgehead> <programlisting> CFLAGS="-O" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">HP/UX 11.00 32-bit</bridgehead> <programlisting> CFLAGS="-O -Ae +DA1.1" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">HP/UX 11.00 64-bit</bridgehead> <programlisting> CFLAGS="-O -Ae +DA2.0W" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">HP/UX 11.23 Itanium 32-bit</bridgehead> <programlisting> CFLAGS="-O -Ae +DD32" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">HP/UX 11.23 Itanium 64-bit</bridgehead> <programlisting> CFLAGS="-O -Ae +DD64" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Linux 32-bit</bridgehead> <programlisting> CFLAGS="-O2" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Linux 64-bit</bridgehead> <programlisting> CFLAGS="-O2 -m64" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.2 and 10.3 PPC 32-bit</bridgehead> <programlisting> CFLAGS="-O -m32 -mmacosx-version-min=10.2" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.4 PPC 32-bit</bridgehead> <programlisting> CFLAGS="-O -m32 -mmacosx-version-min=10.2" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.4 PPC 64-bit</bridgehead> <programlisting> CFLAGS="-O -m64 -mmacosx-version-min=10.4" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.4 Universal 32-bit</bridgehead> <programlisting> CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4" export CFLAGS ./configure --disable-dependency-tracking ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.5 32-bit</bridgehead> <programlisting> CFLAGS="-O -m32 -mmacosx-version-min=10.5" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.5 64-bit</bridgehead> <programlisting> CFLAGS="-O -m64 -mmacosx-version-min=10.5" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.5 Universal</bridgehead> <programlisting> CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch ppc64 -arch x86_64 -mmacosx-version-min=10.5" export CFLAGS ./configure --disable-dependency-tracking ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.6 32-bit</bridgehead> <programlisting> CFLAGS="-O -m32 -mmacosx-version-min=10.6" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.6 64-bit</bridgehead> <programlisting> CFLAGS="-O -m64 -mmacosx-version-min=10.6" export CFLAGS ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Mac OS X 10.6 Universal</bridgehead> <programlisting> CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -mmacosx-version-min=10.6" export CFLAGS ./configure --disable-dependency-tracking ... </programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h3">Solaris 2.x i386 32-bit</bridgehead> <para>Note: on Solaris or Open Solaris we recommend you use gmake either from /usr/sfw/bin/ or install it from <ulink url="http://sunfreeware.com">sunfreeware</ulink>, as long as it's version 3.80 or better.</para> <programlisting> CC=cc CFLAGS="-O" PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH export CFLAGS CC PATH ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Solaris 2.10 Opteron 32-bit</bridgehead> <programlisting> CC=cc CFLAGS="-O -xtarget=opteron" PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH export CFLAGS CC PATH ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Solaris 2.10 Opteron 64-bit</bridgehead> <programlisting> CC=cc CFLAGS="-O -xtarget=opteron -xarch=amd64" PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH export CFLAGS CC PATH ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Solaris 2.8 and above SPARC 32-bit</bridgehead> <programlisting> CC=cc CFLAGS="-O" PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH export CFLAGS CC PATH ./configure ... </programlisting><para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Solaris 2.8 and above SPARC 64-bit</bridgehead> <programlisting> CC=cc CFLAGS="-O -xtarget=ultra -xarch=v9" PATH=/opt/SUNWspro/bin:/usr/ccs/bin:$PATH export CFLAGS CC PATH ./configure ... </programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h2">Build Recipe</bridgehead> <para>If you started from a CVS or GIT checkout, you must first run</para> <programlisting>./autogen.sh </programlisting><para> In the root directory of the checkout perform the following commands:</para> <programlisting>./configure make </programlisting><para> to produce the default binaries, VAD packages and demo database. This takes some time, principally due to building and filling the demo database, rendering the XML documentation into several target formats and composing various Virtuoso application packages. It takes about 30 minutes on a 2GHz machine.</para> <para>The default configure does not enable most of the runtime-hosting and extension features. See the links on the building page for instructions on how to enable these and what additional software is required.</para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">Test Suite</bridgehead> <para>Optionally, you can run</para> <programlisting>make check </programlisting><para> at the root of the build tree to start the automated test suite. This takes about an hour on a 2GHz machine and requires approximately 1 GB of free disk space.</para> <bridgehead class="http://www.w3.org/1999/xhtml:h2">Installation</bridgehead> <para>After running configure && make,</para> <programlisting>make install </programlisting><para> at the root of the build tree copies the files to the locations specified by the --prefix option to configure, by default, /usr/local/. You can override this by specifying `make install prefix=/home/virtuoso' instead, for example.</para> <para>These subdirectories are all appended to the specified prefix, i.e. /usr/local/ by default:</para> <itemizedlist mark="bullet" spacing="compact"><listitem>share/virtuoso/doc/html </listitem> <listitem>share/virtuoso/doc/pdf </listitem> <listitem>share/virtuoso/vad - VAD packages BPEL, Conductor, tutorials, documentation </listitem> <listitem>var/lib/virtuoso/db - Empty database </listitem> <listitem>var/lib/virtuoso/demo - Demo database - obsolete as of version 5.0.3 </listitem> <listitem>bin/ - The virtuoso-t, isql, isqlw, virt_mail, virtuoso-sample-t, inifile executables </listitem> <listitem>lib/ - libvirtuoso-t.a libvirtuoso-t.la virtodbc32.a virtodbc32.la virtodbc32 <emphasis>r.a virtodbc32_r.la virtodbc_r.so wikiv.so, plus any plugins that may be enabled. </emphasis></listitem> <listitem>lib/virtuoso - hosting <emphasis>sample.a hosting_sample.la hosting_sample.so plugin_sample.a plugin_sample.so</emphasis></listitem> </itemizedlist><para>Note: from version 5.0.2, the ./configure script supports different subdirectory structures with the <ulink url="VOSDirLayouts">--with-layout= parameter</ulink>. If you've specified something other than the default, the above may differ accordingly.</para> <para>As of version 5.0.3, the demo is a VAD package, not a separate directory.</para> <bridgehead class="http://www.w3.org/1999/xhtml:h2">Post-Installation</bridgehead> <para>The options:</para> <programlisting>./configure --with-layout --prefix </programlisting><para> will control where the bin/subdirectory appears. Please ensure you put the resultant bin/ directory in your shell PATH.</para> <bridgehead class="http://www.w3.org/1999/xhtml:h2">Getting Started</bridgehead> <para>Whatever prefix directory you chose above, please ensure the $PREFIX/bin directory is in your shell's PATH, e.g.</para> <programlisting>export PATH=$PATH:/usr/local/bin </programlisting><para> To start the server in the background,</para> <programlisting>cd var/lib/virtuoso/db virtuoso-t -f & </programlisting><para> This will not detach from the shell, so you see the startup messages.</para> <para>By default, when no -c parameter is specified, virtuoso will use the virtuoso.ini file in this directory, which is generated as part of `make install'.</para> <para>The first time it's run, it will create the empty database (no special commands required) and install the Conductor VAD package. From here, you can access <ulink url="http://localhost:8890/">http://localhost:8890/</ulink> and <ulink url="http://localhost:8890/conductor/">http://localhost:8890/conductor/</ulink> and use the System Administration / Packages page to install other packages such as Demo and the ODS suite (addressbook, weblog, feeds manager and other applications) etc. The default login is `dba' with a password of `dba' for the Conductor and isql (for DAV functions, the default login is `dav' with a password of `dav').</para> <para>You will see a checkpoint in the terminal for each package selected:</para> <programlisting>15:33:54 INFO: Checkpoint made, log reused </programlisting><para> To connect with the command line SQL tool, </para> <programlisting>isql 1111 dba dba </programlisting><para> gives a SQL> prompt.</para> <para>If you've installed the demo VAD above, type SQL> use Demo;</para> <para>to switch to the demo database, containing the Microsoft Northwind sample tables. The `help' command in isql gives further instructions.</para> <para>To use a web admin interface, point the browser to: <ulink url="http://localhost:8890/conductor">http://localhost:8890/conductor</ulink></para> <para>To read the documents online: <ulink url="http://localhost:8890/doc/html">http://localhost:8890/doc/html</ulink></para> <para>To experiment with online tutorials: <ulink url="http://localhost:8890/tutorial">http://localhost:8890/tutorial</ulink></para> <para> </para> <bridgehead class="http://www.w3.org/1999/xhtml:h3">VAD Packages</bridgehead> <para>The different VAD packages can be installed via ISQL using the following command (if the installation packages reside in the filesystem): </para> <programlisting>SQL> vad_install ('file/system/path/package-name.vad', 0); </programlisting><para> Alternatively, you can copy VAD packages to Virtuoso's DAV repository and then execute the following command (also from ISQL): </para> <programlisting>SQL> vad_install ('webdav/path>/package-name.vad', 1); </programlisting><para> at the isql command line. Note that the <ulink url="DirsAllowed">DirsAllowed</ulink> parameter of the Parameters section of the ini-file must allow access to the directory where the package file is located.</para> <para><ulink url="CategoryWebSite">CategoryWebSite</ulink> <ulink url="CategoryVirtuoso">CategoryVirtuoso</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink> </para> </section></docbook>