In order to install Virtuoso on my MacOS X environment, i used the brew port, that is:
brew install virtuoso
$ brew link unixodbc
Error: Could not symlink bin/isql
is a symlink belonging to virtuoso. You can unlink it:
brew unlink virtuoso
To force the link and overwrite all conflicting files:
brew link --overwrite unixodbc
To list all files that would be deleted:
brew link --overwrite --dry-run unixodbc
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --with-virtuoso --with-odbc=/usr/local/Cellar/virtuoso/126.96.36.199
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --with-virtuoso --with-iodbc=/usr/local/Cellar/virtuoso/188.8.131.52
world = librdf_new_world();
storage = librdf_new_storage(world,"virtuoso",graphName.c_str(),"dsn='Local Virtuoso',user='dba',password='dba'");
model = librdf_new_model(world,storage,NULL);
context_node = librdf_new_node_from_uri_string(world,(const unsigned char*)defaultContext.c_str());
/* librdf_model_transaction_commit(this->super->model) */
rc = SQLDriverConnect(connection->hdbc, 0,(UCHAR *) context->conn_str,
$ isql localhost:1111 dba dba
Connected to OpenLink Virtuoso
Driver: 07.20.3217 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
All those troubles were due to a configuration issue that AFIK was described in no guide (Correct me if I'm wrong, I'd like to find more details on both Virtuoso and Redland/librdf). Hereby, as I told in the comments, the problem was in ODBC, but the reason was that there is no mention in no Virtuoso guide how to configure their driver. This is the way to go:
[ODBC Data Sources] VOS = virtuoso-odbc [VOS] Driver = /usr/local/Cellar/virtuoso/184.108.40.206/lib/virtodbc.so Description = Virtuoso Open-Source Edition Address = localhost:1111 UserName = dba User = dba
[ODBC Drivers] virtuoso-odbc = Installed [virtuoso-odbc] Driver = /usr/local/Cellar/virtuoso/220.127.116.11/lib/virtodbc.so
Consequently, even the configuration parameters required to access through Redland has to change.
Where VOS is the configuration definition within ODBC. Moreover, the specific ContextNode specifies which is the Named Graph to be used.