Building on Windows
- Introduction
- Prerequisites
- Build targets
- Building Virtuoso Open Source with Microsoft Visual Studio
- Building optional components
- PHP4 library notes
- Building the Virtuoso Open-Source Java hosting binary under Microsoft Visual Studio 2003
- Building the Virtuoso Open-Source Perl hosting plugin
- Building the Virtuoso Open-Source Python hosting plugin
- Building the Virtuoso Open-Source Imagemagick plugin
- Testing your build
- Installation
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:
- Microsoft Visual Studio 2003 or later for 32-bit builds; 2005 or later for 64-bit builds
Note: The Virtuoso projects and solution are maintained under VS 2003, so they must be converted to the VS 2005 format if you are using VS 2005 or later. To do this, just open the solution with your VS, and you will be asked to confirm project conversion. Then follow the instructions on screen. - Cygwin bash with developer tools (gawk, flex, bison) installed.
- Bison must be version 1.875b; newer versions (2.x+) are not compatible.
- Active Perl, available from http://www.activestate.com/ActivePerl
- OpenSSL version 0.97 static libraries for Windows and header files.
Optionally, you may want to also install:
- Java Development Kit (JDK) for Windows version 1.4 or above, available from http://java.com/
- PHP library for Windows version 4 and header files.
- Active Python, available from http://www.activestate.com/ActivePython
- ImageMagick library, available from http://www.imagemagick.org/
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.
<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:
- Open the IDE
- Open "Tools", then "Options"
- In the "Options" menu select "Projects" settings
- From "Projects" settings select "VC++ Directories"
- Add the Cygwin programs path to the list for "Executable files", before
<WIN>/system32
, so VS will use cygwin's "find
" command - Confirm the changes.
Known issues
- Bison version 2.1 that comes with Cygwin bash generates buggy code.
To resolve this, you must either
- install an older version of bison (1.875b is recommended) or
- edit the generated files (
sql3.c
andturtle_p.c
in<Virtuoso Open Source dir>/libsrc/Wi
) and remove the ';' after the start of the 'yyparse
' function:
... #else int yyparse () ; <-- remove this #endif #endif ...
- The OLE DB Provider for Virtuoso cannot be built under VS 2005; it should be disabled.
Build targets
Core components
-
virtuoso_t
- the Virtuoso Server -
isql
,isqlo
- SQL command line tools -
virtoledb
- Virtuoso OLEDB provider -
wi
,wic
,dk1t
,dksrv
,threads
,threadw
,xml
,zlib
,tidy
,util
- library modules
Optional components
-
tpcc
,blobs
,scroll
,burstoff
,cutter
,cursor
- test suite programs -
libvirtuoso_t
- the Virtuoso server shared object, needed for hosting servers -
virtodbc
- Virtuoso ODBC Driver -
virtuoso_clr_t
- .NET CLR-hosting server (requires .NET Framework SDK v1.1) -
virtuoso_javavm_t
- Java hosting server (requires Java SDK) -
virtuoso_php_t
- PHP4 hosting server (requires PHP4 library) -
virtuoso_sample_t
- sample of the Virtuoso server with extensions -
hosting_perl
- Perl hosting plugin (requires Active Perl) -
hosting_python
- Python hosting plugin (requires Active Python) -
wikiv
- Virtuoso Wiki plugin -
im
-ImageMagick?
plugin (requiresImageMagick?
library)
Building Virtuoso Open Source with Microsoft Visual Studio
- Open the IDE.
- 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
.
- For 32-bit, from
- Select desired configuration (Debug or Release).
- 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/
:
-
ext/
-
main/
-
regex/
-
TSRM/
-
win32/
-
Zend/
To the same directory (<Virtuoso Open Source dir>/win32/php4/
), you should also copy the following:
-
php4ts.dll
-
php4ts.lib
-
php_version.h
Building the Virtuoso Open-Source Java hosting binary under Microsoft Visual Studio 2003
- Make sure that JDK 1.4 or later is installed. (A JRE is not sufficient.)
- Add environment setting
JDK_PATH
with value of JDK installation directory (e.g.,c:\jdk1.5
). - Start the Visual Studio IDE and enable the
virtuoso_javavm_t
target in the solution. - Build the
virtuoso_javavm_t
target.
Building the Virtuoso Open-Source Perl hosting plugin
- Make sure Active Perl is installed.
- From the VS.NET 2003 command prompt, go to
<Virtuoso Open Source dir>/win32
. - Run '
perl mkperlenv.pl
'; this should produce output like:
PERL_CFLAGS=... PERL_LDFLAGS=...
- Add the
PERL_CFLAGS
andPERL_LDFLAGS
in the environment with values printed from the step above. - Start the Visual Studio IDE and enable the
hosting_perl
target in the solution. - Build the
hosting_perl
plugin.
Building the Virtuoso Open-Source Python hosting plugin
- Make sure Active Python is installed
- From the VS.NET 2003 command prompt, go to
<Virtuoso Open Source dir>/win32
. - Run '
python mkpythonenv.py
'; this should produce output like:
PYTHON_CFLAGS=... PYTHON_LDFLAGS=...
- add the
PYTHON_CFLAGS
andPYTHON_LDFLAGS
in the environment with values printed from the step above - Start the Visual Studio IDE and enable the
hosting_python
target in the solution. - Build the
hosting_python
plugin
Building the Virtuoso Open-Source Imagemagick plugin
- Install the ImageMagick library, available from http://www.imagemagick.org/
- add the
IM_PATH
in the environment with a value of ImageMagick installation directory - Start the Visual Studio IDE and enable the
im
target in the solution - Build the ImageMagick plugin
Testing your build
- 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
-
- Open a Cygwin bash shell
- Change directory to
<Virtuoso Open Source dir>/
- 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
- Change directory to
<Virtuoso Open Source dir>/binsrc/tests/suite
- Run the tests:
./test_server virtuoso-t
Installation
ODBC Driver registration
Perform the following steps to register the ODBC Driver for Virtuoso:
- Open a Command prompt
- Navigate to the directory where the
virtodbc.dll
(Virtuoso Open Source ODBC Driver) is built. - execute:
regsvr32 virtodbc.dll
- A confirmation dialog stating that the driver was registered should be displayed.
Running the Demo Database
- Make a folder, e.g.,
c:\dbs\virtuoso
. - 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
- 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 aSQL>
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
),
- Make a folder, e.g.,
c:\dbs\virtuoso
- 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
- Register the
virt_http.dll
in the GAC:
gacutil /i <Virtuoso Open Source dir>\win32\Release\virt_http.dll
- Make sure
virtclr.dll
andvirtuoso-clr-t
are in the search path. - To try the tutorial examples,
Point.dll
andtax.dll
must 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
),
- Make a folder, e.g.,
c:\dbs\virtuoso
- 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
- Set the
CLASSPATH
to the place where Java classes are. - 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