Building on Windows

Introduction

This page gives instructions for building Virtuoso Open-Source Edition on Windows 32- or 64-bit platforms.

Note: The build process on Windows is rather more complex than on other platforms, so we make pre-built Windows packages available in the SourceForge Project. We recommend you use the latest build available for your platform. As of 2018-02-01, the latest available VOS binaries for Windows are 64-bit (x86_64) version 7.2.4.2 (built 2016-04-25) and 32-bit (x86) version 6.1.8 (built 2013-12-11).

Prerequisites

You must have the following development tools and software installed:

Optionally, you may want to also install:

Building the openssl library

The OpenSSL library must be built as a static library using Visual Studio. Detailed instructions for this build can be found in the INSTALL.W32 document in the OpenSSL source distribution.

IMPORTANT: by default the OpenSSL library is built using MSVCRT compile flags, which lead to conflicts when linking the Virtuoso Open-Source binaries. To resolve these conflicts, after unpacking the OpenSSL source tarball, you must edit the <OpenSSL dir</util/pl/VC-32.pl and change the "cflags" to use the "/MT" and "/MTd" compiler switches instead of "/MD" and "/MDd".

Finally, the libeay32.lib and ssleay32.lib from <OpenSSL dir>/out32 and files from <OpenSSL dir>/inc32/openssl must be copied to <Virtuoso Open Source dir>/win32/openssl/.

Microsoft Visual Studio settings

For Visual Studio to find the Cygwin developer tools (gawk, bison, flex), the path to the Cygwin programs (e.g., c:\cygwin\bin) must be added to standard settings.

To do this, execute the following steps:

  1. Open the IDE
  2. Open "Tools", then "Options"
  3. In the "Options" menu select "Projects" settings
  4. From "Projects" settings select "VC++ Directories"
  5. Add the Cygwin programs path to the list for "Executable files", before <WIN>/system32, so VS will use cygwin's "find" command
  6. Confirm the changes.

Known issues

Build targets

Core components

Optional components

Building Virtuoso Open Source with Microsoft Visual Studio

  1. Open the IDE.
  2. Open the appropriate solution file
    • For 32-bit, from <Virtuoso Open Source dir>/win32/virtuoso-opensource.sln.
    • For 64-bit, from <Virtuoso Open Source dir>/win64/virtuoso-opensource.sln.
  3. Select desired configuration (Debug or Release).
  4. Build the solution.

Building optional components

PHP4 library notes

The following directories with the header files from the PHP4 source tree need to be placed under <Virtuoso Open Source dir>/win32/php4/:

To the same directory (<Virtuoso Open Source dir>/win32/php4/), you should also copy the following:

Building the Virtuoso Open-Source Java hosting binary under Microsoft Visual Studio 2003

  1. Make sure that JDK 1.4 or later is installed. (A JRE is not sufficient.)
  2. Add environment setting JDK_PATH with value of JDK installation directory (e.g., c:\jdk1.5).
  3. Start the Visual Studio IDE and enable the virtuoso_javavm_t target in the solution.
  4. Build the virtuoso_javavm_t target.

Building the Virtuoso Open-Source Perl hosting plugin

  1. Make sure Active Perl is installed.
  2. From the VS.NET 2003 command prompt, go to <Virtuoso Open Source dir>/win32.
  3. Run 'perl mkperlenv.pl'; this should produce output like:

    PERL_CFLAGS=... PERL_LDFLAGS=...

  4. Add the PERL_CFLAGS and PERL_LDFLAGS in the environment with values printed from the step above.
  5. Start the Visual Studio IDE and enable the hosting_perl target in the solution.
  6. Build the hosting_perl plugin.

Building the Virtuoso Open-Source Python hosting plugin

  1. Make sure Active Python is installed
  2. From the VS.NET 2003 command prompt, go to <Virtuoso Open Source dir>/win32.
  3. Run 'python mkpythonenv.py'; this should produce output like:

    PYTHON_CFLAGS=... PYTHON_LDFLAGS=...

  4. add the PYTHON_CFLAGS and PYTHON_LDFLAGS in the environment with values printed from the step above
  5. Start the Visual Studio IDE and enable the hosting_python target in the solution.
  6. Build the hosting_python plugin

Building the Virtuoso Open-Source Imagemagick plugin

  1. Install the ImageMagick library, available from http://www.imagemagick.org/
  2. add the IM_PATH in the environment with a value of ImageMagick installation directory
  3. Start the Visual Studio IDE and enable the im target in the solution
  4. Build the ImageMagick plugin

Testing your build

  1. Make sure that following binaries exist in <Virtuoso Open Source dir>/win32/[Release|Debug]:
    • virtuoso-t.exe
    • isql.exe
    • blobs.exe
    • ins.exe
    • scroll.exe
  2. Open a Cygwin bash shell
  3. Change directory to <Virtuoso Open Source dir>/
  4. Execute the following commands (Note: replace in $PATH the 'Release' with 'Debug' if you are going to run the tests using debug binaries.)

    export HOME=`pwd` export PATH=$HOME/win32/Release:$PATH export BLOBS=blobs.exe export INS=ins.exe export ISQL=isql.exe export PORT=5555 export ENABLE_MTS_TEST=0 export SCROLL=scroll.exe export GETDATA=getdata.exe

  5. Change directory to <Virtuoso Open Source dir>/binsrc/tests/suite
  6. Run the tests:

    ./test_server virtuoso-t

Installation

ODBC Driver registration

Perform the following steps to register the ODBC Driver for Virtuoso:

  1. Open a Command prompt
  2. Navigate to the directory where the virtodbc.dll (Virtuoso Open Source ODBC Driver) is built.
  3. execute:

    regsvr32 virtodbc.dll

  4. A confirmation dialog stating that the driver was registered should be displayed.

Running the Demo Database

  1. Make a folder, e.g., c:\dbs\virtuoso.
  2. Copy the Demo database (demo.db) and default demo.ini file to the new directory.

    cd c: cd \dbs\virtuoso copy <Virtuoso Open Source dir>\binsrc\samples\demo\demo.db copy <Virtuoso Open Source dir>\binsrc\samples\demo\demo.ini

  3. Create a Windows service to run the Virtuoso Open-Source server:

    SET PATH=%PATH%;<irtuoso Open Source dir>\win32\Release virtuoso-t -c demo -I Demo -S create virtuoso-t -c demo -I Demo -S start

    To connect with the command line SQL tool,

    isql 1112 dba dba

    gives a SQL> prompt.

To switch to the demo database, containing the Microsoft Northwind sample tables, type:


    SQL> use Demo;

The help command in iSQL can give further instructions.

To use a web admin interface, point the browser to http://localhost:8890/conductor .

To read the online documentation: http://localhost:8890/doc/html

To experiment with online tutorials, http://localhost:8890/tutorial

For VAD Packages, read the README file for Linux.

.NET CLR hosting server

In order to run the .NET CLR hosting server (virtuoso-clr-t),

  1. Make a folder, e.g., c:\dbs\virtuoso
  2. Copy the Demo database (demo.db) and default demo.ini file to the new directory.

    cd c: cd \dbs\virtuoso copy <Virtuoso Open Source dir>\binsrc\samples\demo\demo.db copy <Virtuoso Open Source dir>\binsrc\samples\demo\demo.ini

  3. Register the virt_http.dll in the GAC:

    gacutil /i <Virtuoso Open Source dir>\win32\Release\virt_http.dll

  4. Make sure virtclr.dll and virtuoso-clr-t are in the search path.
  5. To try the tutorial examples, Point.dll and tax.dllmust be copied from <Virtuoso Open Source dir>\binsrc\tutorial\hosting\ho_s_2 to <Virtuoso Open Source dir>\win32\Release\:

    SET PATH=%PATH%;<Virtuoso Open Source dir>\win32\Release virtuoso-clr-t -c demo -I Demo -S create virtuoso-clr-t -c demo -I Demo -S start

    IMPORTANT: The current version of the .NET CLR hosting server is supported in .NET Framework v1.1 environment.

Java hosting server

In order to run the Java hosting server (virtuoso-javavm-t),

  1. Make a folder, e.g., c:\dbs\virtuoso
  2. Copy the Demo database (demo.db) and default demo.ini file to the new directory.

    cd c: cd \dbs\virtuoso copy <Virtuoso Open Source dir>\binsrc\samples\demo\demo.db copy <Virtuoso Open Source dir>\binsrc\samples\demo\demo.ini

  3. Set the CLASSPATH to the place where Java classes are.
  4. Make sure virtuoso-javavm-t is in the search path

    set CLASSPATH=<Virtuoso Open Source dir>\binsrc\tutorial\hosting\ho_s_1;%CLASSPATH% SET PATH=%PATH%;<Virtuoso Open Source dir>\win32\Release virtuoso-javavm-t -c demo -I Demo -S create virtuoso-javavm-t -c demo -I Demo -S start